/*
 Theme Name:   Astra Child
 Theme URI:    https://wpastra.com/
 Description:  Astra Child Theme for IPTVPasses.net
 Author:       Local Store Admin
 Template:     astra
 Version:      1.0.1
*/

/* ==========================================================================
   1. GLOBAL MOBILE VIEWPORT & DARK MODE RESETS
   ========================================================================== */
html,
body {
    background-color: #020617 !important;
    color: #f8fafc !important;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.woocommerce,
body.woocommerce-page,
body.woocommerce-cart,
body.woocommerce-checkout,
body.single-product,
.ast-separate-container,
.site-content,
#content,
.ast-container,
#primary,
#main,
article {
    background-color: #020617 !important;
    color: #f8fafc !important;
}

/* Strip Astra Default Content Wrappers & Boxed Containers */
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.ast-separate-container .site-main > article,
.ast-separate-container .site-main,
.ast-container {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Eliminate Astra Default White Borders on Select & Currency Switchers */
#currency-selector,
select#currency-selector,
.currency-selector,
header select,
.site-header select,
nav select {
    border: none !important;
    border-width: 0 !important;
    border-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: transparent !important;
    color: #ffffff !important;
}

/* ==========================================================================
   2. CHECKOUT NOTICES & BANNERS (PREVENTS OVERLAPPING & MISMATCHED THEMES)
   ========================================================================== */
/* Suppress redundant "added to cart" success banners on checkout and across the store */
.woocommerce-message,
.woocommerce-message[role="alert"],
.woocommerce-notices-wrapper .woocommerce-message,
body.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-message {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.woocommerce-NoticeGroup,
.woocommerce-NoticeGroup-checkout,
.woocommerce-notice,
.woocommerce-info,
.woocommerce-error {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    background-color: #0b1329 !important;
    border: 1px solid #1e293b !important;
    border-radius: 0.875rem !important;
    color: #cbd5e1 !important;
    padding: 1rem 1.25rem !important;
    margin: 0 0 1.5rem 0 !important;
    font-size: 0.875rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
    z-index: 20 !important;
}

/* Fix notice icons so they NEVER overlap the quotation marks or text */
.woocommerce-NoticeGroup .woocommerce-error::before,
.woocommerce-NoticeGroup .woocommerce-info::before,
.woocommerce-NoticeGroup .woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-info::before,
.woocommerce-message::before {
    position: static !important;
    display: inline-block !important;
    margin-right: 0.75rem !important;
    float: none !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    font-size: 1.1rem !important;
}

.woocommerce-error {
    border-color: rgba(239, 68, 68, 0.4) !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #fca5a5 !important;
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
    color: #60a5fa !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    margin-left: auto !important;
}

/* ==========================================================================
   3. CHECKOUT LAYOUT RESETS (FIX OVERLAPPING CARDS & DESTROY ASTRA BORDERS)
   ========================================================================== */
.woocommerce-checkout .woocommerce,
.woocommerce-checkout form.checkout,
.woocommerce-checkout #customer_details,
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2,
.woocommerce-checkout .col2-set,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review,
.woocommerce-checkout .woocommerce-checkout-review-order,
.ast-separate-container .woocommerce-checkout #order_review,
.ast-separate-container .woocommerce-checkout #customer_details,
.ast-separate-container .woocommerce-checkout .woocommerce-checkout-review-order {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    clear: both !important;
    position: static !important;
    box-sizing: border-box !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}

#order_review_heading,
.woocommerce-checkout #order_review_heading,
.ast-separate-container .woocommerce-checkout #order_review_heading {
    display: none !important; /* Managed by our custom header component */
}

/* ==========================================================================
   4. FORM CONTROLS & MOBILE INPUT FIXES (NO IOS AUTO-ZOOM)
   ========================================================================== */
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="password"],
.woocommerce select,
.woocommerce textarea {
    background-color: #090d16 !important;
    border: 1px solid #1e293b !important;
    border-radius: 0.75rem !important;
    color: #f8fafc !important;
    padding: 0.875rem 1rem !important;
    font-size: 16px !important; /* Prevent iOS Safari auto-zoom */
    width: 100% !important;
    outline: none !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.woocommerce input:focus,
.woocommerce select:focus,
.woocommerce textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
    background-color: #0d1322 !important;
}

.woocommerce-checkout .form-row {
    margin: 0 0 1.25rem 0 !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
}

.woocommerce-checkout label {
    display: block !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    margin-bottom: 0.375rem !important;
}

.woocommerce-billing-fields > h3 {
    display: none !important;
}

/* ==========================================================================
   5. ORDER SUMMARY REVIEW TABLE STYLING
   ========================================================================== */
table.woocommerce-checkout-review-order-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background-color: transparent !important;
    border: none !important;
    margin-bottom: 1.25rem !important;
}

table.woocommerce-checkout-review-order-table th,
table.woocommerce-checkout-review-order-table td {
    border: none !important;
    border-bottom: 1px solid #1e293b !important;
    padding: 0.875rem 0 !important;
    font-size: 0.875rem !important;
    background-color: transparent !important;
    word-wrap: break-word !important;
}

table.woocommerce-checkout-review-order-table thead th {
    color: #64748b !important;
    text-transform: uppercase !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.05em !important;
    font-weight: 700 !important;
}

table.woocommerce-checkout-review-order-table .product-name {
    color: #f1f5f9 !important;
    font-weight: 600 !important;
    width: 65% !important;
}

table.woocommerce-checkout-review-order-table .product-total,
table.woocommerce-checkout-review-order-table .order-total {
    text-align: right !important;
    color: #f8fafc !important;
    font-weight: 700 !important;
    width: 35% !important;
}

table.woocommerce-checkout-review-order-table .order-total th {
    color: #e2e8f0 !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
}

table.woocommerce-checkout-review-order-table .order-total td {
    color: #60a5fa !important;
    font-size: 1.35rem !important;
    font-weight: 900 !important;
}

/* ==========================================================================
   6. DEDICATED PAYMENT CONTAINER & GATEWAY ACCORDION (PINGPONG PAY & OTHERS)
   ========================================================================== */
#payment.woocommerce-checkout-payment {
    background-color: #0b1120 !important;
    border: 1px solid #1e293b !important;
    border-radius: 1rem !important;
    padding: 1.25rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3) !important;
    margin-top: 1.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#payment ul.payment_methods {
    border: none !important;
    padding: 0 !important;
    margin: 0 0 1.25rem 0 !important;
    list-style: none !important;
}

#payment ul.payment_methods li {
    background-color: #090d16 !important;
    border: 1px solid #1e293b !important;
    border-radius: 0.75rem !important;
    padding: 1rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.4 !important;
    transition: all 0.2s ease !important;
}

#payment ul.payment_methods li:hover {
    border-color: #3b82f6 !important;
}

#payment ul.payment_methods li label {
    display: flex !important;
    align-items: center !important;
    gap: 0.625rem !important;
    color: #f8fafc !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin-bottom: 0 !important;
    flex-wrap: wrap !important;
}

#payment ul.payment_methods li input[type="radio"] {
    margin: 0 !important;
    accent-color: #2563eb !important;
    width: 1.125rem !important;
    height: 1.125rem !important;
    flex-shrink: 0 !important;
}

#payment div.payment_box {
    background-color: #020617 !important;
    border: 1px solid #1e293b !important;
    border-radius: 0.75rem !important;
    padding: 1rem 1.25rem !important;
    color: #cbd5e1 !important;
    font-size: 0.85rem !important;
    margin-top: 0.75rem !important;
    line-height: 1.5 !important;
    overflow: visible !important; /* CRITICAL: Allows country dropdown to float without being cut off */
    position: relative !important;
}

#payment div.payment_box::before {
    display: none !important;
}

/* ==========================================================================
   PINGPONG PAY & ALTERNATIVE PAYMENT METHODS (APM) DARK MODE OVERHAUL
   (Fixes white box clashing, pale invisible text, and country selector overlap)
   ========================================================================== */
#payment .payment_box *,
#payment .payment_box div,
#payment .payment_box form,
#payment .payment_box section,
#payment [class*="pingpong"],
#payment [class*="apm"],
#payment [class*="hosted-field"] {
    background-color: transparent !important;
    color: #f8fafc !important;
    border-color: #1e293b !important;
    box-sizing: border-box !important;
}

/* Eradicate any PingPong Pay white backgrounds */
#payment div.payment_box,
#payment div.payment_box > div,
#payment div.payment_box > div > div,
#payment div.payment_box .channel-box,
#payment div.payment_box .channel-content,
#payment div.payment_box [class*="pp-"],
#payment div.payment_box [class*="pingpong"],
#payment div.payment_box [class*="hosted-"],
#payment div.payment_box [style*="background: white"],
#payment div.payment_box [style*="background: #fff"],
#payment div.payment_box [style*="background:#fff"],
#payment div.payment_box [style*="background: rgb(255, 255, 255)"],
#payment div.payment_box [style*="background-color: white"],
#payment div.payment_box [style*="background-color: #fff"],
#payment div.payment_box [style*="background-color:#fff"],
#payment div.payment_box [style*="background-color: rgb(255, 255, 255)"] {
    background-color: #0b1120 !important;
    background: #0b1120 !important;
    color: #f8fafc !important;
    border-color: #1e293b !important;
}

/* Ensure channel text ("CreditCard", labels) is visible crisp white */
#payment div.payment_box span,
#payment div.payment_box p,
#payment div.payment_box label,
#payment div.payment_box h4,
#payment div.payment_box strong {
    color: #f8fafc !important;
}

/* ==========================================================================
   PINGPONG PAY APM COUNTRY/REGION LABEL & SELECTOR OVERLAP ANNIHILATOR
   (Fixes screenshot bug where 'Country/Region' and 'United Kingdom (GB)' overlap)
   ========================================================================== */
#payment .payment_box [class*="country"],
#payment .payment_box [class*="region"],
#payment .payment_box [class*="pp-country"],
#payment .payment_box label[for*="country"],
#payment .payment_box .country-wrapper,
#payment .payment_box .country-select,
#payment .payment_box .country-box {
    position: relative !important;
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: none !important;
}

/* Force Country/Region title/label to be a clean, separated block above the selector */
#payment .payment_box label[for*="country"],
#payment .payment_box [class*="country-title"],
#payment .payment_box [class*="country-label"],
#payment .payment_box [class*="region-title"],
#payment .payment_box [class*="region-label"],
#payment .payment_box .country-text-title,
#payment .payment_box div:has(> [class*="selected-country"]) > label,
#payment .payment_box div:has(> [class*="country-select"]) > label {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: block !important;
    clear: both !important;
    float: none !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #94a3b8 !important;
    margin-top: 1rem !important;
    margin-bottom: 0.4rem !important;
    line-height: 1.4 !important;
    height: auto !important;
}

/* Force Selected Country value (e.g. "United Kingdom (GB)") to be a distinct block with dark background, border and padding */
#payment .payment_box [class*="selected-country"],
#payment .payment_box [class*="country-selected"],
#payment .payment_box [class*="current-country"],
#payment .payment_box [class*="country-input"],
#payment .payment_box [class*="country-value"],
#payment .payment_box [class*="country-name"],
#payment .payment_box [class*="country-show"] {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    clear: both !important;
    float: none !important;
    background-color: #090e1a !important;
    border: 1px solid #334155 !important;
    border-radius: 0.625rem !important;
    color: #ffffff !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    min-height: 44px !important;
    margin-top: 0.25rem !important;
    margin-bottom: 1.25rem !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    cursor: pointer !important;
}

/* PingPong Pay APM Country Input & Selector Box */
#payment .payment_box input[type="text"],
#payment .payment_box input[type="search"],
#payment .payment_box select,
#payment .payment_box [class*="country-select"],
#payment .payment_box [class*="country-input"] {
    background-color: #090e1a !important;
    border: 1px solid #334155 !important;
    border-radius: 0.625rem !important;
    color: #ffffff !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    width: 100% !important;
    outline: none !important;
    margin-bottom: 0.75rem !important;
    transition: all 0.2s ease !important;
}

#payment .payment_box input[type="text"]:focus,
#payment .payment_box input[type="search"]:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

/* Country dropdown list container: Pushes in-flow so it NEVER overlaps or covers PaybyBankapp / Trustly */
#payment .payment_box ul[class*="country"],
#payment .payment_box div[class*="country-list"],
#payment .payment_box [class*="dropdown-menu"],
#payment .payment_box [class*="channel-list"],
#payment .payment_box [class*="options-list"],
#payment .payment_box [class*="country-select-dropdown"] {
    position: relative !important;
    float: none !important;
    clear: both !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: #0b1329 !important;
    border: 1px solid #3b82f6 !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6) !important;
    max-height: 240px !important;
    overflow-y: auto !important;
    padding: 0.5rem !important;
    margin: 0.75rem 0 1rem 0 !important;
    z-index: 50 !important;
}

/* Country List Options */
#payment .payment_box ul[class*="country"] li,
#payment .payment_box div[class*="country-list"] li,
#payment .payment_box div[class*="country-list"] > div,
#payment .payment_box [class*="country-item"] {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
    border: 1px solid #1e293b !important;
    border-radius: 0.5rem !important;
    padding: 0.625rem 0.875rem !important;
    margin: 0.25rem 0 !important;
    cursor: pointer !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    transition: all 0.15s ease !important;
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

#payment .payment_box ul[class*="country"] li:hover,
#payment .payment_box div[class*="country-list"] li:hover,
#payment .payment_box div[class*="country-list"] > div:hover,
#payment .payment_box [class*="country-item"]:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #60a5fa !important;
}

/* Ensure subsequent channels (GooglePay, PaybyBankapp, Trustly) clear previous items and never overlap */
#payment .payment_box [class*="channel-box"],
#payment .payment_box [class*="channel-item"],
#payment .payment_box [class*="apm-item"],
#payment .payment_box [class*="pay-method"],
#payment .payment_box [class*="method-card"],
#payment .payment_box [class*="method-row"],
#payment .payment_box [class*="channel-item-wrapper"],
#payment .payment_box [id*="googlepay"],
#payment .payment_box [class*="googlepay"] {
    position: relative !important;
    clear: both !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: #0b1329 !important;
    border: 1px solid #1e293b !important;
    border-radius: 0.75rem !important;
    padding: 0.875rem 1.25rem !important;
    margin: 0.75rem 0 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

#payment .payment_box [class*="channel-box"]:hover,
#payment .payment_box [class*="channel-item"]:hover,
#payment .payment_box [class*="apm-item"]:hover {
    border-color: #3b82f6 !important;
    background-color: #111c33 !important;
}

/* FULL-WIDTH HORIZONTAL PAYMENT BOTTOM CONTAINER */
.iptv-checkout-bottom-payment,
#iptv-payment-container-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    margin-top: 2rem !important;
}

.iptv-checkout-bottom-payment #payment {
    margin-top: 0 !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
}

.iptv-checkout-bottom-payment #payment ul.payment_methods {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
}

.iptv-checkout-bottom-payment #payment ul.payment_methods > li {
    background-color: #090d16 !important;
    border: 1px solid #1e293b !important;
    border-radius: 1rem !important;
    padding: 1.25rem 1.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure review table never duplicates into payment box */
#iptv-payment-container .woocommerce-checkout-review-order-table,
.iptv-checkout-bottom-payment .woocommerce-checkout-review-order-table {
    display: none !important;
}

/* Ensure payment methods never duplicate into order summary card */
#iptv-order-summary-card #payment {
    display: none !important;
}

#payment .payment_box img {
    max-height: 26px !important;
    width: auto !important;
    background: transparent !important;
    object-fit: contain !important;
}

/* ==========================================================================
   7. ORDER RECEIVED / CONFIRMATION PAGE STYLING (THANK YOU PAGE)
   ========================================================================== */
body.woocommerce-order-received,
body.woocommerce-checkout.woocommerce-order-received {
    background-color: #020617 !important;
    color: #f8fafc !important;
}

/* Hard suppression of native WooCommerce & plugin duplicate tables, license boxes, and white bars */
.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received .woocommerce-customer-details,
.woocommerce-order-received .lmfwc-license-keys,
.woocommerce-order-received .woocommerce-order-details__title,
.woocommerce-order-received .woocommerce-column__title,
.woocommerce-order-received .woocommerce-customer-details h2,
.woocommerce-order-received .woocommerce-order-details h2 {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Pure dark theme page wrapper while headings inside cards remain completely transparent */
.woocommerce-order-received,
.woocommerce-order-received .site-content,
.woocommerce-order-received .ast-separate-container,
.woocommerce-order-received .ast-article-single,
.woocommerce-order-received .ast-article-post,
.woocommerce-order-received .site-main,
.woocommerce-order-received .entry-content {
    background-color: #020617 !important;
    background: #020617 !important;
    color: #f8fafc !important;
    border: none !important;
    box-shadow: none !important;
}

/* Eliminate any black or white boxes on headings or text blocks inside cards */
.woocommerce-order-received h1,
.woocommerce-order-received h2,
.woocommerce-order-received h3,
.woocommerce-order-received h4,
.woocommerce-order-received h5,
.woocommerce-order-received h6,
.woocommerce-order-received span,
.woocommerce-order-received p,
.woocommerce-order-received address {
    background-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}


/* Payment Gateway Place Order CTA */
#place_order {
    background-color: #2563eb !important;
    background-image: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 1.05rem !important;
    letter-spacing: 0.025em !important;
    border-radius: 0.75rem !important;
    padding: 1.125rem 1.75rem !important;
    width: 100% !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.45) !important;
    transition: all 0.2s ease !important;
    margin-top: 0.75rem !important;
    display: block !important;
}

#place_order:hover {
    background-color: #1d4ed8 !important;
    box-shadow: 0 15px 35px -5px rgba(37, 99, 235, 0.6) !important;
    transform: translateY(-1px) !important;
}

.woocommerce-privacy-policy-text,
.woocommerce-terms-and-conditions-wrapper {
    font-size: 0.75rem !important;
    color: #64748b !important;
    margin: 1rem 0 !important;
    line-height: 1.5 !important;
}

.woocommerce-privacy-policy-text a,
.woocommerce-terms-and-conditions-link {
    color: #60a5fa !important;
    text-decoration: underline !important;
}
