/**
 * Google Pay WooCommerce Gateway Styles
 */

/**
 * Google Pay WooCommerce Gateway Styles
 * Strictly adheres to Google Pay Brand Guidelines:
 * - Size: Proportional to surrounding checkout elements (100% fill, min-height 48px)
 * - Color Contrast: High contrast black button on light background
 * - Clear Space: Minimum 16px clear space perimeter on all sides
 */

.wc-googlepay-container {
    margin: 16px 0 !important;
    padding: 16px 20px !important;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
}

.wc-googlepay-description {
    font-size: 14px;
    color: #475569;
    margin-bottom: 16px !important;
    line-height: 1.5;
}

/* Official Google Pay Button Slot with Guaranteed Clear Space */
.wc-googlepay-button-slot {
    min-height: 48px !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 16px 0 !important;
    padding: 2px 0 !important;
    width: 100% !important;
    clear: both;
}

/* Ensure Google Pay button fills the slot proportionally matching WooCommerce Place Order button */
.wc-googlepay-button-slot > button,
.wc-googlepay-button-slot > div,
.wc-googlepay-button-slot iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 240px;
    height: 48px !important;
    min-height: 48px !important;
    display: block !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
}

.wc-googlepay-badges-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
}

.wc-googlepay-coexistence-note {
    font-size: 11px;
    color: #0284c7;
}

.wc-googlepay-status {
    margin-top: 12px;
    padding: 10px 14px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    border-radius: 6px;
}

/* Cart Page Express Checkout Wrapper - Proportional with Proceed to Checkout button */
.wc-googlepay-cart-express-wrapper {
    margin: 20px 0 24px 0 !important;
    padding: 18px 20px !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

/* Guard: If a theme template renders duplicate cart express wrappers, display only the first one */
.wc-googlepay-cart-express-wrapper ~ .wc-googlepay-cart-express-wrapper {
    display: none !important;
}

/* Fallback: Hide any cart wrapper if its button slot is empty */
.wc-googlepay-cart-express-wrapper:has(#wc-googlepay-cart-slot:empty) {
    display: none !important;
}

.wc-googlepay-cart-express-wrapper .wc-googlepay-button-slot {
    justify-content: center;
    margin: 14px 0 8px 0 !important;
    width: 100% !important;
}

/* Official Google Pay Acceptance Mark in payment methods list */
.wc-googlepay-mark {
    height: 24px !important;
    max-height: 24px !important;
    width: auto !important;
    vertical-align: middle !important;
    margin-left: 8px !important;
    display: inline-block !important;
    border: none !important;
    box-shadow: none !important;
}

li.payment_method_google_pay label {
    display: inline-flex !important;
    align-items: center !important;
}

li.payment_method_google_pay label img {
    height: 24px !important;
    max-height: 24px !important;
    width: auto !important;
    vertical-align: middle !important;
    margin-left: 8px !important;
}
