/* ==========================================================================
   PTP Frontend Styles — v1.1.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   Checkout — Hide payment section (classic shortcode checkout only)

   IMPORTANT: We do NOT use a blanket CSS rule here because it would also
   affect the order-pay page (#payment is reused there).
   Instead, the JS (ptp-checkout.js) adds .ptp-hide-payment to <body>
   only on the correct page, and we target that class here.
   -------------------------------------------------------------------------- */
/* Classic checkout : cache les méthodes, PAS le bloc entier (le bouton y est) */
body.ptp-hide-payment ul.wc_payment_methods,
body.ptp-hide-payment ul.payment_methods,
body.ptp-hide-payment #payment .payment_box {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Thank-you page message
   -------------------------------------------------------------------------- */
.ptp-thankyou-message {
    background: #f0f8ff;
    border-left: 4px solid #2271b1;
    padding: 20px 24px;
    margin: 20px 0;
    border-radius: 4px;
}

.ptp-thankyou-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.ptp-order-ref {
    font-size: 13px;
    color: #666;
    margin-top: 12px;
}

.ptp-account-link {
    margin-top: 10px;
    display: inline-block;
}

/* --------------------------------------------------------------------------
   Notice d'information — affichée AU-DESSUS du bouton Commander
   Le client voit l'explication avant de cliquer.
   -------------------------------------------------------------------------- */
.ptp-checkout-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #eef6fb;
    border: 1px solid #b3d9ef;
    border-radius: 5px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #1a4a6b;
}

.ptp-checkout-notice__icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1.4;
}

.ptp-checkout-notice p {
    margin: 0;
}

/* --------------------------------------------------------------------------
   Icônes de paiement — affichées sous le bouton Commander (classic + blocks)
   -------------------------------------------------------------------------- */
.ptp-checkout-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 6px 0;
    opacity: 0.85;
}

.ptp-checkout-icons img {
    height: 28px;
    width: auto;
    border-radius: 3px;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   My Account — Pay Now block (order details page)
   -------------------------------------------------------------------------- */
.ptp-pay-now-block {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 20px 24px;
    margin: 20px 0;
}

.ptp-pay-now-block h3 {
    color: #155724;
    margin-top: 0;
}

.ptp-expires-notice {
    color: #856404;
    font-size: 13px;
    font-weight: 600;
}

.ptp-pay-button {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
    font-size: 16px !important;
    padding: 12px 24px !important;
    margin-top: 6px;
}

.ptp-pay-button:hover {
    background: #218838 !important;
    border-color: #1e7e34 !important;
}

/* --------------------------------------------------------------------------
   Modification notice (order details)
   -------------------------------------------------------------------------- */
.ptp-modification-notice {
    background: #cce5ff;
    border: 1px solid #b8daff;
    border-radius: 6px;
    padding: 20px 24px;
    margin: 20px 0;
}

.ptp-modification-notice h3 {
    color: #004085;
    margin-top: 0;
}

.ptp-modification-notice .button {
    margin-right: 10px;
    margin-top: 8px;
}

/* --------------------------------------------------------------------------
   WC Blocks checkout — hide payment method list
   The JS auto-selects ptp_no_payment, so we hide the selector UI.
   -------------------------------------------------------------------------- */
/* WC Blocks : cache le sélecteur de méthodes, PAS le bloc entier (contient le bouton) */
body.ptp-hide-payment .wc-block-components-payment-methods,
body.ptp-hide-payment .wc-block-components-radio-control-accordion-item,
body.ptp-hide-payment .wc-block-checkout__payment-method {
    display: none !important;
}
