/**
 * We offer the best and most useful modules PrestaShop and modifications for your online store
 *
 * We are experts and professionals in PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This file is not open source! Each license that you purchased is only available for 1 website only
 * If you want to use this file on more websites (or projects), you need to purchase additional licenses
 * You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party
 * Please ensure that you are using a valid license for this file.
 *
 * @author PresTeamShop SAS (Registered Trademark) <info@presteamshop.com>
 * @copyright 2011-2026 PresTeamShop SAS, All rights reserved
 * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 *
 * @category PrestaShop
 * @category Module
 */

body > :is(#opc-order-processing, #opc-details-processing)[data-opc-checkout-overlay="true"][hidden],
body > :is(#opc-order-processing, #opc-details-processing)[data-opc-checkout-overlay="true"] [hidden] {
    display: none !important;
}

body#checkout.opc-order-processing-active,
body#checkout.opc-details-processing-active {
    overflow: hidden;
}

#checkout #opc_main #opc_step_shipping .delivery-option,
#checkout #opc_main #opc_step_shipping .delivery-option .carrier-item-content,
#checkout #opc_main #opc_step_shipping .delivery-option .carrier-item-content :is(div, span, p, img, .delivery_option_radio) {
    cursor: pointer !important;
}

body > :is(#opc-order-processing, #opc-details-processing)[data-opc-checkout-overlay="true"] {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(17, 24, 39, 0.65);
}

body > :is(#opc-order-processing, #opc-details-processing)[data-opc-checkout-overlay="true"] .opc-order-processing-card {
    width: 100%;
    max-width: 440px;
    max-height: 100%;
    overflow-y: auto;
    padding: 36px 28px;
    border-radius: 16px;
    background: #fff;
    color: #1f2937;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

body > :is(#opc-order-processing, #opc-details-processing)[data-opc-checkout-overlay="true"] h2 {
    margin: 20px 0 12px;
    font-size: 24px;
    line-height: 1.3;
    color: #1f2937;
}

body > :is(#opc-order-processing, #opc-details-processing)[data-opc-checkout-overlay="true"] p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
}

body > :is(#opc-order-processing, #opc-details-processing)[data-opc-checkout-overlay="true"] .opc-order-processing-spinner {
    display: inline-block;
    box-sizing: border-box;
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #1773b0;
    border-radius: 50%;
    animation: opc-order-processing-spin 0.85s linear infinite;
}

body > :is(#opc-order-processing, #opc-details-processing)[data-opc-checkout-overlay="true"] .opc-order-processing-recovery {
    margin-top: 24px;
}

body > :is(#opc-order-processing, #opc-details-processing)[data-opc-checkout-overlay="true"] button {
    margin-top: 16px;
}

@keyframes opc-order-processing-spin {
    to { transform: rotate(360deg); }
}

body > [data-opc-customization-portal="true"] {
    position: static;
    transform: none;
    isolation: auto;
}

body > [data-opc-customization-portal="true"] > .customization-modal {
    z-index: 1055;
}

body > [data-opc-customization-portal="true"] .modal-body img {
    max-width: 100%;
    height: auto;
}

/* Real options remain readable while inert prevents selection. */
#checkout #opc_main .opc-has-step-guidance {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}
#checkout #opc_main .opc-has-step-guidance .opc-step-body,
#checkout #opc_main .opc-has-step-guidance .opc-step-footer {
    opacity: 0.75;
    pointer-events: none;
    user-select: none;
}
#checkout #opc_main .opc-step-guidance[hidden] {
    display: none !important;
}
#checkout #opc_main .opc-step-guidance {
    position: relative;
    margin: 12px 0;
    padding: 16px;
    border: 1px solid #c8dcea;
    border-radius: 8px;
    background: #f0f7fc;
    pointer-events: auto;
    cursor: default;
}
#checkout #opc_main .opc-step-guidance-card {
    text-align: left;
    color: #334155;
}
#checkout #opc_main .opc-step-guidance-card > .material-icons {
    float: left;
    margin-right: 8px;
    color: #1773b0;
    font-size: 22px;
}
#checkout #opc_main .opc-step-guidance h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.4;
    color: #1e293b;
}
#checkout #opc_main .opc-step-guidance p {
    clear: both;
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

#checkout #opc_main .opc-step-unlock-button {
    white-space: normal;
    cursor: pointer;
}

#checkout #opc_main #opc_step_my_account,
#checkout #opc_main #opc_step_addresses {
    scroll-margin-top: 90px;
}

#checkout #opc_main #opc_cart #cart-subtotal-shipping {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

#checkout #opc_main.opc-shopify #opc_cart .opc-shopify-product-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 10px;
}

#checkout #opc_main.opc-shopify #opc_cart .opc-shopify-product-actions .media-quantity {
    width: 90px;
    max-width: 100%;
}

#checkout #opc_main.opc-shopify #opc_cart .opc-shopify-product-actions .remove-from-cart {
    margin: 0;
}

#checkout #opc_main.opc-shopify #opc_cart .media-product-detail {
    min-width: 0;
}

#checkout #opc_main #opc_cart #cart-subtotal-shipping .value {
    float: none;
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

#checkout #opc_main #opc_payment_cart_summary .cart-summary-content .cart-summary-totals .cart-summary-line > [data-value="subtotal-shipping"] {
    flex: 0 1 auto;
    min-width: 0;
    padding-left: 12px;
    overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
    body > :is(#opc-order-processing, #opc-details-processing)[data-opc-checkout-overlay="true"] .opc-order-processing-spinner {
        animation: none;
    }
}

body#checkout.opc-details-processing-active #opc_main .loading-opc { visibility: hidden; }

#checkout #opc_main .loading-opc[data-opc-loading-label] {
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
}
#checkout #opc_main .loading-opc[data-opc-loading-label]::after { order: -1; }
#checkout #opc_main .opc-option-loading-label {
    color: #42474d;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}
@media (prefers-reduced-motion: reduce) {
    #checkout #opc_main .loading-opc[data-opc-loading-label]::after { animation: none; }
}

/* Keep the native request blocker active while delaying its visual indicator. */
body#checkout.opc-details-processing-pending #opc_main .loading-opc { opacity: 0; }

#checkout #opc_main.opc-delay-loading .loading-opc[data-opc-loading-label] {
    animation: opc-delayed-loader 250ms step-end both;
}
@keyframes opc-delayed-loader { from { opacity: 0; } to { opacity: 1; } }
#checkout #opc_main .opc-details-ready {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 16px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #edf7f0;
    color: #245c38;
    font-size: 13px;
}
#checkout #opc_main .opc-details-ready button {
    background: transparent;
    color: inherit;
    border: 0;
    padding: 10px 8px;
    min-height: 40px;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}
#checkout #opc_main .opc-details-ready button:focus-visible { outline: 2px solid currentColor; }

#checkout #opc_main .opc-final-payment-line {
    margin: 8px 0;
    color: #454b52;
    font-size: 13px;
    text-align: center;
    overflow-wrap: anywhere;
}
@media (max-width: 991.98px) {
    #checkout #opc_main.opc-touch-targets .remove-from-cart,
    #checkout #opc_main.opc-touch-targets .opc-step-unlock-button,
    #checkout #opc_main.opc-touch-targets .opc-details-ready button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

#checkout #opc_main .opc-coupon-disclosure { width: 100%; }
#checkout #opc_main .opc-coupon-disclosure > summary {
    cursor: pointer;
    padding: 10px 0;
    font-size: 14px;
}
#checkout #opc_main .opc-coupon-disclosure > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Coupon feedback stays within the module on every layout. */
#checkout #opc_main .opc-address-awaiting-email { opacity: .55; background: #f5f6f7; border-radius: 6px; }
#checkout #opc_main .opc-email-first-hint,
#checkout #opc_main #opc-order-readiness-hint { margin: 8px 0; padding: 8px 10px; background: #f5f6f7; color: #414b55; border-radius: 6px; font-size: 13px; line-height: 1.4; }
#checkout #opc_main .opc-email-first-hint[hidden],
#checkout #opc_main #opc-order-readiness-hint[hidden] { display: none; }
#checkout #opc_main #btn-placer_order[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
#checkout #opc_main #opc-locked-order-placeholder { padding: 12px 0; }
#checkout #opc_main #opc-locked-order-description { margin: 0 0 8px; font-size: 13px; line-height: 1.4; color: #414b55; }
#checkout #opc_main #opc-locked-order-placeholder > button { display: block; width: 100%; opacity: .55; cursor: not-allowed; }
#checkout #opc_main .opc-coupon-feedback { margin: 8px 0 0; padding: 10px 12px; border-radius: 6px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; background: #eef4f8; color: #234660; }
#checkout #opc_main .opc-coupon-feedback[data-state="success"] { background: #edf7ef; color: #225d32; }
#checkout #opc_main .opc-coupon-feedback:is([data-state="empty"], [data-state="invalid"], [data-state="network"]) { background: #fff1ed; color: #883726; }
/* Direct checkout has one validation action; payment providers retain their handlers. */
#checkout #opc_main.opc-direct-flow #opc_step_addresses button.save,
#checkout #opc_main.opc-direct-flow #btn-register-customer,
#checkout #opc_main.opc-direct-flow #btn-register-guest,
#checkout #opc_main.opc-direct-flow .opc-step-footer .continue,
#checkout #opc_main.opc-direct-flow .opc-step-footer .return_step,
#checkout #opc_main.opc-direct-flow #opc-locked-order-placeholder,
#checkout #opc_main.opc-direct-flow #payment-confirmation,
#checkout #opc_main.opc-direct-flow #payment-confirmation-alert,
#checkout #opc_main.opc-direct-flow #btn-placer_order,
#checkout #opc_main.opc-direct-flow:not(.opc-direct-provider) .payment-binary,
#checkout #opc_main.opc-direct-flow:not(.opc-direct-provider) .js-payment-binary,
#checkout #opc_main.opc-direct-provider #opc-direct-checkout button {
    display: none !important;
}
#checkout #opc_main #opc-direct-checkout {
    margin-block: 1rem;
}
#checkout #opc_main #opc-direct-checkout[hidden] { display: none; }
#checkout #opc_main #opc-direct-checkout p {
    font-size: .875rem;
    line-height: 1.45;
    margin-bottom: .5rem;
}
#checkout #opc_main #opc-direct-checkout button { width: 100%; }

/* Shared cart product disclosure for every checkout layout. */
#checkout #opc_main[id] #opc_cart .cart-summary-products #cart-summary-product-list .media-list {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
}
#checkout #opc_main #opc_cart .cart-summary-products #cart-summary-product-list .media-list > [data-opc-collapsed-product="true"][hidden] {
    display: none !important;
}
#checkout #opc_main .opc-cart-products-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    margin: 8px 0 12px;
    padding: 8px 12px;
    border: 1px solid var(--opc-shopify-border, #d9d9d9);
    border-radius: 6px;
    background: #fff;
    color: var(--opc-shopify-accent, #1773b0);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
#checkout #opc_main .opc-cart-products-toggle::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}
#checkout #opc_main .opc-cart-products-toggle[aria-expanded="true"]::after {
    transform: rotate(225deg) translateY(-2px);
}
#checkout #opc_main .opc-cart-products-toggle:hover {
    background: #f0f7fc;
}
#checkout #opc_main .opc-cart-products-toggle:focus-visible {
    outline: 2px solid var(--opc-shopify-accent, #1773b0);
    outline-offset: 2px;
}

/* Optional shipping context; shared across checkout themes. */
#checkout #opc_main .opc-shipping-context { margin: 0 0 12px; font-size: 12px; line-height: 1.45; }
#checkout #opc_main .opc-shipping-rate-notice { display: inline-block; margin: 0 0 6px; padding: 5px 9px; border-radius: 8px; background: #f1f3f5; color: #454b52; max-width: 100%; }
#checkout #opc_main .opc-shipping-location { margin: 0; color: #454b52; overflow-wrap: anywhere; }
#checkout #opc_main .opc-shipping-location strong { font-weight: 600; }

#checkout #opc_main .opc-shipping-price-changed {
    border-radius: 4px;
    background-color: #e8f3ec;
    box-shadow: 0 0 0 3px #e8f3ec;
    animation: opc-shipping-price-feedback 1.6s ease-out;
}
@keyframes opc-shipping-price-feedback {
    from { background-color: #d8ebdf; box-shadow: 0 0 0 3px #d8ebdf; }
    to { background-color: transparent; box-shadow: 0 0 0 3px transparent; }
}
@media (prefers-reduced-motion: reduce) {
    #checkout #opc_main .opc-shipping-price-changed { animation: none; }
}
