/**
 * Dragon Box Client - Checkout Stylesheet
 * Custom controls for payment tiles, policy agreement toggle switch, and luxury badges
 */

/* Custom Luxury Radio & Toggle Controls */
.checkout-page .form-check-input {
    cursor: pointer;
    border-color: #cbd5e1;
    transition: all 0.2s ease-in-out;
}

.checkout-page .form-check-input:checked {
    background-color: #D32F2F !important;
    border-color: #D32F2F !important;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.35);
}

.checkout-page .form-check-input:focus {
    border-color: #D32F2F !important;
    box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.2) !important;
}

.checkout-page .form-switch .form-check-input {
    width: 2.2em;
    height: 1.25em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2394a3b8'/%3e%3c/svg%3e");
}

.checkout-page .form-switch .form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e") !important;
}

/* Payment Method Tile */
.payment-method-tile {
    border-radius: 14px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.payment-method-tile:hover {
    border-color: #fca5a5;
    background: rgba(211, 47, 47, 0.02);
}

.payment-method-tile.is-selected {
    border-color: #D32F2F !important;
    background: rgba(211, 47, 47, 0.04) !important;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.1);
}

/* Policy Agreement Wrap */
.checkout-policy-agreement {
    background: rgba(211, 47, 47, 0.03);
    border: 1.5px solid rgba(211, 47, 47, 0.18);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-policy-label {
    cursor: pointer;
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 0;
}

.checkout-policy-link {
    color: #D32F2F;
    font-weight: 700;
    text-decoration: underline;
}

.checkout-policy-link:hover {
    color: #b71c1c;
}

/* ==========================================================================
   Checkout State Display Control (Instant render to prevent FOOC)
   ========================================================================== */
html.cart-is-empty #checkout-active-state {
    display: none !important;
}
html.cart-is-empty #checkout-empty-state {
    display: block !important;
}
html.cart-has-items #checkout-empty-state {
    display: none !important;
}
html.cart-has-items #checkout-active-state {
    display: block !important;
}

/* ==========================================================================
   Luxury Empty Cart View Styling (Centered Fullscreen & Radar Ripple)
   ========================================================================== */
.checkout-empty-state {
    width: 100%;
}

.checkout-empty-hero-wrap {
    min-height: calc(100vh - 12.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.checkout-empty-card {
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.07), 0 4px 15px -3px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: calc(100vh - 15rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3.5rem 2rem !important;
}

@media (max-width: 767.98px) {
    .checkout-empty-hero-wrap {
        min-height: calc(100vh - 10.5rem);
    }
    .checkout-empty-card {
        min-height: auto;
        padding: 2.5rem 1.25rem !important;
        border-radius: 20px;
    }
}

.checkout-empty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #D32F2F, transparent);
    opacity: 0.85;
}

/* ==========================================================================
   Radar Wave / Pulse Ripple Effect (Silky 60fps GPU, Static Icon)
   ========================================================================== */
.empty-cart-radar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-wave {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(211, 47, 47, 0.7);
    background: radial-gradient(circle, rgba(211, 47, 47, 0.12) 0%, rgba(211, 47, 47, 0.01) 65%, transparent 100%);
    pointer-events: none;
    z-index: 1;
    will-change: transform, opacity;
    animation: radarPulse 2.6s cubic-bezier(0.1, 0.6, 0.2, 1) infinite;
}

.radar-wave-2 {
    animation-delay: 0.85s;
}

.radar-wave-3 {
    animation-delay: 1.7s;
}

@keyframes radarPulse {
    0% {
        transform: scale(0.85);
        opacity: 0.85;
        border-color: rgba(211, 47, 47, 0.8);
    }
    40% {
        opacity: 0.45;
    }
    100% {
        transform: scale(1.95);
        opacity: 0;
        border-color: rgba(211, 47, 47, 0);
    }
}

.empty-cart-icon-wrapper {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(211, 47, 47, 0.25);
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    color: #D32F2F;
    font-size: 2.75rem;
    transform: none !important;
}

.empty-cart-badge-dot {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 14px;
    height: 14px;
    background: #D32F2F;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(211, 47, 47, 0.4);
}

/* Feature/Assurance Cards in Empty State */
.empty-assurance-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem 1rem;
    height: 100%;
    transition: all 0.3s ease;
}

.empty-assurance-card:hover {
    background: #ffffff;
    border-color: #fca5a5;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(211, 47, 47, 0.08);
}

.empty-assurance-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(211, 47, 47, 0.08);
    color: #D32F2F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 0.75rem auto;
}

/* Suggested Products in Empty State */
.suggested-prod-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
}

.suggested-prod-card:hover {
    border-color: #fca5a5;
    transform: translateY(-4px);
    box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.09);
}

.suggested-prod-img-wrap {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: #f8fafc;
}

.suggested-prod-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.suggested-prod-card:hover .suggested-prod-img {
    transform: scale(1.06);
}

.suggested-prod-body {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.suggested-prod-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggested-prod-price {
    font-weight: 800;
    color: #D32F2F;
    font-size: 1.1rem;
}

