/**
 * Checkout Styles
 */
#ss-paypal-iframe-container {
    width: 100%;
    min-height: 100px;
}

#ss-paypal-iframe {
    width: 100%;
    min-height: 100px;
    border: none;
}

#ss-paypal-iframe.loading {
    opacity: 0.5;
}

/* Full-screen iframe khi PayPal SDK hiện overlay interstitial (chủ yếu trên mobile).
   Overlay "Continue" được PayPal chèn vào trong iframe với position:fixed; khi iframe
   chỉ cao bằng nút (~100px) thì overlay bị cắt. Phóng iframe full màn hình để overlay
   hiển thị đầy đủ và bấm được. z-index dưới #ss-paypal-loader (99999) để loader vẫn che
   được sau khi popup mở. */
#ss-paypal-iframe-container.ss-iframe-fullscreen {
    position: fixed;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 99990;
    background: #fff;
}

#ss-paypal-iframe.ss-iframe-fullscreen {
    width: 100% !important;
    height: 100% !important;
}

body.ss-iframe-fullscreen-lock {
    overflow: hidden;
}

/* Validation Errors */
.ss-checkout-errors {
    margin-top: 15px;
    margin-bottom: 25px;
}

.ss-checkout-errors.woocommerce-error {
    border-top: 3px solid #b21f1f;
    background-color: #fcf1f1;
    color: #b21f1f;
    padding: 1em 2em;
    list-style: none outside;
    width: 100%;
}

.ss-checkout-errors ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ss-checkout-errors li {
    margin-bottom: 5px;
}

.ss-checkout-errors li:last-child {
    margin-bottom: 0;
}

/* ===== Loader / Spinner ===== */
#ss-paypal-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.ss-paypal-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: 0.9;
}

.ss-paypal-loader-content {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
}

.ss-paypal-loader-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border: 5px solid rgba(0, 0, 0, 0.15);
    border-top-color: #0070ba;
    border-radius: 50%;
    animation: ss-loader-spin 0.7s linear infinite;
}

@keyframes ss-loader-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ss-paypal-loader-message {
    font-size: 18px;
    color: #333;
    margin: 0 0 8px;
    font-weight: 600;
}

.ss-paypal-loader-warning {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ===== Express Checkout ===== */
.ss-express-checkout-wrapper {
    width: 100%;
    clear: both;
}

.ss-express-separator {
    position: relative;
}

.ss-express-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.ss-express-iframe-container {
    border-radius: 4px;
    overflow: hidden;
}

.ss-express-iframe {
    display: block;
}

/* Product page specific */
.ss-express-product {
    margin-top: 15px;
}

/* Cart page specific */
.ss-express-cart {
    margin-bottom: 10px;
}
/* Accepted card brand icons rendered next to the gateway title.
   Each <img> floats right; combined with the prepend build order in
   PaypalGateway::get_icon(), the visual left-to-right order matches
   the option array order. */
.ss-pg-payment-icon {
    float: right;
    max-height: 25px;
    border-radius: 2px;
    padding-top: 2px;
    margin-right: 4px;
}
.ss-pg-payment-icon--badge {
    max-height: 22px;
}

/* Block checkout: hide the standard "Place Order" button while the SuperShield PayPal
   method is selected — payment completes via the PayPal button inside the iframe (the
   block adapter toggles `body.ss-pg-hide-place-order`). Mirrors the classic flow which
   hides #place_order. Selectors cover current + legacy block class names. */
body.ss-pg-hide-place-order .wc-block-components-checkout-place-order-button,
body.ss-pg-hide-place-order .wp-block-woocommerce-checkout-actions-block button[type="submit"] {
    display: none !important;
}
