/**
 * 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 > #opc-order-processing[data-opc-checkout-overlay="true"][hidden],
body > #opc-order-processing[data-opc-checkout-overlay="true"] [hidden] {
    display: none !important;
}

body#checkout.opc-order-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 > #opc-order-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 > #opc-order-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 > #opc-order-processing[data-opc-checkout-overlay="true"] h2 {
    margin: 20px 0 12px;
    font-size: 24px;
    line-height: 1.3;
    color: #1f2937;
}

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

body > #opc-order-processing[data-opc-checkout-overlay="true"] .opc-order-processing-spinner {
    display: inline-block;
    width: 56px;
    height: 56px;
    border: 5px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: opc-order-processing-spin 0.85s linear infinite;
}

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

body > #opc-order-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;
}

#checkout #opc_main .opc-has-step-guidance {
    position: relative;
    min-height: 300px;
    opacity: 1;
}

#checkout #opc_main .opc-step-guidance[hidden] {
    display: none !important;
}

#checkout #opc_main .opc-step-guidance {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: inherit;
    background: rgba(248, 250, 252, 0.94);
    pointer-events: auto;
    cursor: default;
}

#checkout #opc_main .opc-step-guidance-card {
    max-width: 360px;
    text-align: center;
    color: #334155;
}

#checkout #opc_main .opc-step-guidance-card > .material-icons {
    color: #64748b;
    font-size: 28px;
}

#checkout #opc_main .opc-step-guidance h3 {
    margin: 10px 0;
    font-size: 18px;
    line-height: 1.3;
    color: #1e293b;
}

#checkout #opc_main .opc-step-guidance p {
    margin: 0 0 16px;
    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 > #opc-order-processing[data-opc-checkout-overlay="true"] .opc-order-processing-spinner {
        animation: none;
    }
}
