/*
Theme Name: Exponent Child
Description: Child theme for Exponent - WooCommerce customizations
Author: Opal SPS
Version: 1.0.0
Template: exponent
Text Domain: exponent-child
*/

/* Override default container width */
.tatsu-wrap {
    max-width: 1300px;
}

/* Custom styles for Quick View Modal (YITH + Exponent) */
.yith-quick-view.yith-modal.open,
.yith-quick-view.yith-modal.open .yith-wcqv-wrapper,
.exp-wc-quickview-wrap {
    z-index: 99999 !important;
}

/* Enable scrolling inside the modal */
.yith-quick-view.yith-modal .yith-quick-view-content,
.exp-wc-quickview {
    max-height: 90vh;
    overflow-y: auto;
}

.yith-quick-view.yith-modal .yith-quick-view-content div.summary,
.exp-wc-quickview .exp-wc-product-info {
    height: auto !important;
    max-height: none !important;
    overflow: visible;
}

/* Adjust layout in Quick View modal */
.quantity-wrap {
    flex-direction: column;
}

.quantity-inner-wrap {
    display: none;
}

/* Center the Quick View button */
.yith-wcqv-button.button {
    padding: 10px 24px;
    margin: 0 auto;
    font-weight: 600;
}

/* Custom Flexbox Utilities */
.flex {
    display: flex;
}

.justify-center {
    justify-content: center;
}

.items-center {
    align-items: center;
}

/* ============================================================================
 * WooCommerce Page Template Styles
 * ============================================================================ */

/* Container for WooCommerce pages */


.wc-page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Responsive padding adjustments */
@media (max-width: 768px) {
    .wc-page-container {
        padding-top: 100px;
    }

    .wc-page-content {
        padding: 20px 15px;
    }
}

/* WooCommerce specific styling improvements */
.wc-page-content .woocommerce {
    width: 100%;
}

/* Checkout page layout */
.wc-page-content .woocommerce-checkout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.wc-page-content .woocommerce-checkout .col2-set {
    flex: 1;
    min-width: 300px;
}

.wc-page-content .woocommerce-checkout .woocommerce-checkout-review-order {
    flex: 0 0 380px;
    max-width: 380px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 900px) {
    .wc-page-content .woocommerce-checkout {
        flex-direction: column;
    }

    .wc-page-content .woocommerce-checkout .woocommerce-checkout-review-order {
        flex: 1;
        max-width: 100%;
    }
}

/* Cart page styling */
.wc-page-content .woocommerce-cart-form {
    width: 100%;
}

.wc-page-content .cart-collaterals {
    margin-top: 30px;
}

/* ============================================================================
 * Cart page layout fixes
 * ============================================================================ */

/* Table header padding */
.woocommerce-cart-form table thead th,
.wc-block-cart__main .wc-block-cart-items th {
    padding: 15px 20px;
}

/* Fix double border - remove inner dotted borders only */
.wc-block-cart-item__product,
.wc-block-cart-item__total,
.wc-block-components-product-metadata,
.wc-block-components-product-price {
    border: none !important;
    box-shadow: none !important;
}

/* Table border */
.wc-block-cart__main .wc-block-cart-items {
    border: 1px solid #e0e0e0;
}

/* Header border */
.wc-block-cart__main .wc-block-cart-items th {
    border-bottom: 1px solid #e0e0e0 !important;
}

/* Row separator */
.wc-block-cart-items__row {
    border-bottom: 1px solid #e0e0e0 !important;
}

.wc-block-cart-items__row:last-child {
    border-bottom: none !important;
}

/* Widen product name column & align left */
.woocommerce-cart-form .product-name,
.wc-block-cart-items__row .wc-block-components-product-name,
.wc-block-cart-item__product {
    min-width: 350px;
    text-align: left;
}

/* Prevent text wrapping in product metadata */
.wc-block-components-product-metadata,
.wc-block-components-product-metadata__description {
    white-space: nowrap;
}

/* Product name link styling */
.woocommerce-cart-form .product-name a {
    word-break: normal;
    white-space: normal;
    text-align: left;
}

/* Form elements styling */
.wc-page-content .form-row {
    margin-bottom: 15px;
}

.wc-page-content input[type="text"],
.wc-page-content input[type="email"],
.wc-page-content input[type="tel"],
.wc-page-content select,
.wc-page-content textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wc-page-content input[type="text"]:focus,
.wc-page-content input[type="email"]:focus,
.wc-page-content input[type="tel"]:focus,
.wc-page-content select:focus,
.wc-page-content textarea:focus {
    border-color: #333;
    outline: none;
}

/* ============================================================================
 * Hide product thumbnails in Cart & Checkout
 * ============================================================================ */

/* Cart page */
.woocommerce-cart-form .product-thumbnail,
.woocommerce table.cart .product-thumbnail {
    display: none !important;
}

/* Checkout order review */
.woocommerce-checkout-review-order-table .product-thumbnail,
.woocommerce-checkout-review-order-table img,
.wc-block-components-order-summary-item__image,
.wc-block-cart-item__image {
    display: none !important;
}

/* ============================================================================
 * Login page - SSO only (hide WooCommerce login form)
 * ============================================================================ */
.woocommerce-form-login,
.woocommerce-form-register,
.u-column1.col-1,
.u-column2.col-2 {
    display: none !important;
}

/* Keep show password hidden anyway */
.woocommerce form .show-password-input {
    display: none !important;
}

/* ============================================================================
 * Hide footer on WooCommerce pages (cart, checkout, my account)
 * ============================================================================ */
.woocommerce-cart .footer-content,
.woocommerce-checkout .footer-content,
.woocommerce-account .footer-content {
    display: none !important;
}

/* ============================================================================
 * Must login prompt styling
 * ============================================================================ */
.wc-block-must-login-prompt {
    background: #FFC34C;
    border-radius: 24px;
    padding: 32px 40px;
    color: #082140;
}

.wc-block-must-login-prompt a,
.wc-block-must-login-prompt button,
.wc-block-must-login-prompt .wp-block-button__link {
    background-color: #082140 !important;
    color: #FFC34C !important;
    border: 1px solid #082140 !important;
    border-radius: 32px !important;
    padding: 11px 25px !important;
    font-weight: 600 !important;
    margin-left: 16px;
    transition: all 0.3s ease !important;
}

.wc-block-must-login-prompt a:hover,
.wc-block-must-login-prompt button:hover,
.wc-block-must-login-prompt .wp-block-button__link:hover {
    background-color: transparent !important;
    color: #082140 !important;
}

/* Hide order confirmation header */
.exp-wc-order-header {
    display: none !important;
}

/* Hide product meta in Quick View */
.yith-quick-view-content.woocommerce div.summary .product_meta > .posted_in {
    display: none !important;
}

/* Hide "Add a note" in checkout */
.wc-block-checkout__add-note {
    display: none !important;
}

.menu-cart {
    padding-right: 0 !important;
}

.menu-cart > a {
    position: relative;
    display: inline-block;
    font-size: 0px !important;
}
@media (min-width: 1025px) {
    .menu-cart > a {
        padding: 3px 10px !important;
    }
}

.menu-cart > a::after {
    content: "";
    width: 20px;
    height: 20px;
    position: relative;
    display: inline-block;
    
    background-color: #ffc34c;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg fill="black" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 902.86 902.86" transform="matrix(-1, 0, 0, 1, 0, 0)"><path d="M671.504,577.829l110.485-432.609H902.86v-68H729.174L703.128,179.2L0,178.697l74.753,399.129h596.751V577.829z M685.766,247.188l-67.077,262.64H131.199L81.928,246.756L685.766,247.188z"></path><path d="M578.418,825.641c59.961,0,108.743-48.783,108.743-108.744s-48.782-108.742-108.743-108.742H168.717 c-59.961,0-108.744,48.781-108.744,108.742s48.782,108.744,108.744,108.744c59.962,0,108.743-48.783,108.743-108.744 c0-14.4-2.821-28.152-7.927-40.742h208.069c-5.107,12.59-7.928,26.342-7.928,40.742 C469.675,776.858,518.457,825.641,578.418,825.641z M209.46,716.897c0,22.467-18.277,40.744-40.743,40.744 c-22.466,0-40.744-18.277-40.744-40.744c0-22.465,18.277-40.742,40.744-40.742C191.183,676.155,209.46,694.432,209.46,716.897z M619.162,716.897c0,22.467-18.277,40.744-40.743,40.744s-40.743-18.277-40.743-40.744c0-22.465,18.277-40.742,40.743-40.742 S619.162,694.432,619.162,716.897z"></path></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg fill="black" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 902.86 902.86" transform="matrix(-1, 0, 0, 1, 0, 0)"><path d="M671.504,577.829l110.485-432.609H902.86v-68H729.174L703.128,179.2L0,178.697l74.753,399.129h596.751V577.829z M685.766,247.188l-67.077,262.64H131.199L81.928,246.756L685.766,247.188z"></path><path d="M578.418,825.641c59.961,0,108.743-48.783,108.743-108.744s-48.782-108.742-108.743-108.742H168.717 c-59.961,0-108.744,48.781-108.744,108.742s48.782,108.744,108.744,108.744c59.962,0,108.743-48.783,108.743-108.744 c0-14.4-2.821-28.152-7.927-40.742h208.069c-5.107,12.59-7.928,26.342-7.928,40.742 C469.675,776.858,518.457,825.641,578.418,825.641z M209.46,716.897c0,22.467-18.277,40.744-40.743,40.744 c-22.466,0-40.744-18.277-40.744-40.744c0-22.465,18.277-40.742,40.744-40.742C191.183,676.155,209.46,694.432,209.46,716.897z M619.162,716.897c0,22.467-18.277,40.744-40.743,40.744s-40.743-18.277-40.743-40.744c0-22.465,18.277-40.742,40.743-40.742 S619.162,694.432,619.162,716.897z"></path></svg>');
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-size: contain;
    
    transition: background-color 0.3s ease;
}

.menu-cart > a:hover::after {
    background-color: #ffffff;
}

.menu-cart ul { 
    background: white;
    width: 300px !important;
}

.menu-cart .sub-menu-indicator { 
    display: none !important;
}
.tatsu-ByQ_cqqFjgx.tatsu-menu .menu-cart .tatsu-sub-menu li.empty-cart-message a,
.menu-cart .empty-cart-message a {
    pointer-events: none !important;
    color: #082140;
    text-align: center;
} 
.menu-cart .menu-cart-button a,
.tatsu-ByQ_cqqFjgx.tatsu-menu .menu-cart .tatsu-sub-menu li.menu-cart-button a {
    background-color: #082140;
    color: white !important;
    text-align: center;
    border-radius: 50px;
    margin-top: 8px;
    padding: 10px !important;
}

@media (max-width: 1024px) {
    .menu-cart > a::after {
        background-color: #082140;
    }
    .menu-cart ul {
       display: none !important;
    }
}

/* Menu Account - User icon */
.menu-account > a {
    position: relative;
    display: inline-block;
    font-size: 0px !important;
}
@media (min-width: 1025px) {
    .menu-account > a {
        padding: 3px 10px !important;
    }
}

.menu-account > a::after {
    content: "";
    width: 20px;
    height: 20px;
    position: relative;
    display: inline-block;

    background-color: #ffc34c;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-size: contain;

    transition: background-color 0.3s ease;
}

.menu-account > a:hover::after {
    background-color: #ffffff;
}

@media (max-width: 1024px) {
    .menu-account > a::after {
        background-color: #082140;
    }
}

/* Hide login prompt when logged in or cart is empty */
body.logged-in .cart-login-prompt,
body.cart-is-empty .cart-login-prompt {
    display: none !important;
}

.woocommerce-checkout .form-row-last.validate-phone {
    width: 100%;
    padding-left: 0;
}

body.woocommerce-checkout .wc_payment_method label::before{
    display: none;
}

.woocommerce-button.button.invoice {
    margin-left: 20px;
}

/* ============================================================================
 * YITH Currency Switcher in Header
 * ============================================================================ */
#header-currency-switcher .yith-wcmcs-currency-flag.yith-wcmcs-currency-without-flag,
#header-currency-switcher .yith-wcmcs-search-container {
    display: none !important;
}

/* ============================================================================
 * Weglot Language Switcher z-index fix
 * ============================================================================ */
.weglot_switcher[aria-expanded="true"] {
    z-index: 9999 !important;
}

/* ============================================================================
 * OPAL SPS Cart Page - Gutenberg-style design
 * ============================================================================ */

/* Layout: Two columns - 2/3 products, 1/3 totals */
.woocommerce .opalsps-cart-layout {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 40px;
    align-items: flex-start;
    width: 100% !important;
    max-width: 100% !important;
}

.woocommerce .opalsps-cart-layout > .opalsps-cart-products {
    flex: 2;
    min-width: 0;
}

.woocommerce .opalsps-cart-layout > .cart-collaterals {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    margin-top: 0 !important;
}

@media (max-width: 900px) {
    .woocommerce .opalsps-cart-layout {
        flex-wrap: wrap;
    }

    .woocommerce .opalsps-cart-layout > .opalsps-cart-products,
    .woocommerce .opalsps-cart-layout > .cart-collaterals {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}

/* Products table */
.opalsps-cart-products .shop_table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
}

.opalsps-cart-products .shop_table thead th {
    background: #f8f9fa;
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
}

.opalsps-cart-products .shop_table thead th.product-subtotal {
    text-align: right;
}

.opalsps-cart-products .shop_table tbody td {
    padding: 20px;
    vertical-align: middle;
    border-bottom: 1px solid #e0e0e0;
}

.opalsps-cart-products .shop_table tbody tr:last-child td {
    border-bottom: none;
}

/* Product info cell */
.opalsps-product-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.opalsps-product-info .remove {
    color: #999;
    font-size: 20px;
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
}

.opalsps-product-info .remove:hover {
    color: #c00;
}

.opalsps-product-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.opalsps-product-name {
    font-weight: 600;
    color: #082140;
    text-decoration: none;
}

.opalsps-product-name:hover {
    color: #ffc34c;
}

.opalsps-product-price {
    color: #666;
    font-size: 14px;
}

.opalsps-product-meta {
    font-size: 13px;
    color: #666;
}

.opalsps-product-meta dt,
.opalsps-product-meta dd {
    display: inline;
    margin: 0;
}

.opalsps-product-meta dt::after {
    content: ": ";
}

/* Subtotal column */
.opalsps-cart-products .product-subtotal {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

/* Cart Totals - Gutenberg style */
.woocommerce .opalsps-cart-totals {
    background: #f6f7f7;
    border-radius: 8px;
    padding: 24px;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}

.woocommerce .opalsps-cart-totals h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #ddd;
    writing-mode: horizontal-tb !important;
}

.opalsps-totals-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.opalsps-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.opalsps-totals-label {
    color: #333;
    font-size: 14px;
}

.opalsps-totals-value {
    font-weight: 500;
    color: #333;
    text-align: right;
}

/* Tax rows */
.opalsps-totals-row.opalsps-tax {
    padding: 6px 0;
}

/* Total row */
.opalsps-totals-row.opalsps-total {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
}

.opalsps-totals-row.opalsps-total .opalsps-totals-label {
    font-size: 16px;
    font-weight: 600;
}

.opalsps-totals-row.opalsps-total .opalsps-totals-value {
    font-size: 18px;
    font-weight: 700;
}

/* Proceed to checkout button */
.opalsps-cart-totals .wc-proceed-to-checkout {
    margin-top: 24px;
}

.opalsps-cart-totals .wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    background: #ffc34c;
    color: #082140;
    border: none;
    border-radius: 4px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.opalsps-cart-totals .wc-proceed-to-checkout .checkout-button:hover {
    background: #082140;
    color: #fff;
}

/* Hide unnecessary elements from classic cart */
.opalsps-cart-layout .cart-collaterals .cross-sells,
.opalsps-cart-layout .woocommerce-cart-form .actions,
.opalsps-cart-layout .coupon {
    display: none;
}

/* Hide cart header (Votre panier / Vous avez oublié quelque chose?) */
.exp-wc-cart-header {
    display: none !important;
}

/* Gutenberg cart block - visible for comparison */
/* .wp-block-woocommerce-cart,
.wc-block-cart {
    display: none !important;
} */

/* Reduce cart collaterals padding */
.exp-wc-cart-collaterals-inner {
    padding: 20px !important;
}

/* ============================================================================
 * Checkout Section Titles
 * ============================================================================ */
.checkout-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 20px;
}

.checkout-section-title:first-child {
    margin-top: 0;
}

/* License Configuration Section */
#license_email_section {
    margin-top: 30px;
}

/* Terms & Conditions - remove dotted underline on required asterisk */
.woocommerce-terms-and-conditions-wrapper abbr.required {
    text-decoration: none;
}


.cart-is-empty .return-to-shop {
    text-align: center;
}
.cart-is-empty .return-to-shop a{
    background-color: #082140;
    color: white;
    text-align: center;
    transition: all 0.3s;
}
.cart-is-empty .return-to-shop a:hover{
    background-color: #ffc34c;
    color: #082140;
}
.cart-is-empty h2 {
    text-align: center;
    margin-bottom: 40px;
}

/* Full height columns helper for Tatsu Builder */
.full-height-columns .tatsu-column-pad,
.full-height-columns .tatsu-column-pad > div {
    height: 100%;
}

/* ============================================================================
 * CHECKOUT REVIEW TABLE & TERMS SECTION SPACING
 * ============================================================================ */
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 12px 15px;
}

.woocommerce-checkout-review-order-table .product-name {
    padding-right: 20px;
}

/* Terms section spacing */
.woocommerce-terms-and-conditions-wrapper {
    margin: 25px 0 !important;
}

.woocommerce-terms-and-conditions-wrapper p {
    margin-bottom: 15px !important;
}

.woocommerce-terms-and-conditions-wrapper .woocommerce-form__label-for-checkbox {
    margin: 20px 0 !important;
}

.woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text {
    margin-bottom: 20px;
}

.woocommerce-terms-and-conditions-wrapper .opalsps-software-policy-trigger {
    color: #082140;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.woocommerce-terms-and-conditions-wrapper .opalsps-software-policy-trigger:hover,
.woocommerce-terms-and-conditions-wrapper .opalsps-software-policy-trigger:focus {
    color: #ffc34c;
}

.woocommerce-terms-and-conditions-wrapper + .woocommerce-error,
.woocommerce-terms-and-conditions-wrapper + ul.woocommerce-error {
    margin: 20px 0 !important;
}

#place_order {
    margin-top: 25px !important;
}

.opalsps-policy-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.opalsps-policy-modal.is-active {
    display: block;
}

.opalsps-policy-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 33, 64, 0.72);
}

.opalsps-policy-modal__dialog {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    margin: 24px auto;
    padding: 32px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(8, 33, 64, 0.24);
    overflow-y: auto;
}

.opalsps-policy-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #f4f6f8;
    color: #082140;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.opalsps-policy-modal__title {
    margin: 0 0 20px;
    padding-right: 48px;
}

.opalsps-policy-modal__content > :first-child {
    margin-top: 0;
}

.opalsps-policy-modal__content > :last-child {
    margin-bottom: 0;
}

body.opalsps-policy-modal-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .opalsps-policy-modal__dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px auto;
        padding: 24px 18px;
        border-radius: 12px;
    }
}

/* ============================================================================
 * GOOGLE PLACES AUTOCOMPLETE STYLING
 * ============================================================================ */
.pac-container {
    z-index: 999999 !important;
    pointer-events: auto !important;
    background-color: #fff !important;
}

.pac-item {
    cursor: pointer !important;
    pointer-events: auto !important;
}

.pac-item:hover {
    background-color: #f5f5f5 !important;
}

/* Spacing above billing address section */
.woocommerce-billing-fields {
    margin-top: 40px;
}

/* ============================================================================
 * 🚨 ADMIN-ONLY MODE - PRODUCTION LAUNCH
 * ============================================================================
 * TEMPORARY: Remove this entire section when ready to open to public
 *
 * Hides purchase-related UI elements for non-logged-in users during
 * production testing phase. Managed in inc/woocommerce-admin-access.php
 * so the full admin-only mode can be toggled from one include.
 * ============================================================================ */
