/**
 * SmartCart - Unified Cart Styles
 * Footer-Only Mode
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
.smart-cart {
    --sc-bg: rgba(15, 23, 42, 0.98);
    --sc-primary: #ffc107;
    --sc-primary-dark: #e6ad00;
    --sc-success: #22c55e;
    --sc-danger: #ef4444;
    --sc-text: #ffffff;
    --sc-text-muted: #94a3b8;
    --sc-glow: 0 0 30px rgba(255, 193, 7, 0.3);
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.smart-cart * {
    box-sizing: border-box;
}

/* ============================================
   EMBEDDED MODE (Footer Bar)
   ============================================ */
.smart-cart--embedded {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--sc-bg);
    border-top: 2px solid var(--sc-primary);
    z-index: 10000;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    /* Disable clicks when hidden - fixes mobile nav blocking */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
    width: 100%;
    padding-bottom: env(safe-area-inset-bottom);
}

.smart-cart--embedded.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    /* Re-enable clicks when visible */
}

/* Close/Minimize Button */
.smart-cart__close-btn {
    position: absolute;
    top: -15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: var(--sc-bg);
    border: 2px solid var(--sc-primary);
    border-radius: 50%;
    color: var(--sc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    transition: all 0.2s;
}

.smart-cart__close-btn:hover {
    background: var(--sc-primary);
    color: #000;
    transform: scale(1.1);
}

/* Minimized Badge - Only visible when footer is hidden */
.smart-cart__minimized-badge {
    position: fixed;
    bottom: 80px;
    /* RAISED: Above mobile bottom nav bar */
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ffc107, #e6ad00);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: #0a1628;
    font-size: 1.4rem;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.5);
    z-index: 10000;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: badge-shake 4s ease-in-out infinite;
}

.smart-cart__minimized-badge.show {
    display: flex;
    /* Show only when .show class is added */
}

.smart-cart__minimized-badge:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.6);
}

.smart-cart__minimized-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    border: 2px solid #0f172a;
    min-width: 22px;
    text-align: center;
}

/* Subtle shake animation - runs every 4 seconds, shakes briefly at the end */
@keyframes badge-shake {

    0%,
    85%,
    100% {
        transform: translateX(0) rotate(0deg);
    }

    87% {
        transform: translateX(-2px) rotate(-3deg);
    }

    89% {
        transform: translateX(2px) rotate(3deg);
    }

    91% {
        transform: translateX(-2px) rotate(-2deg);
    }

    93% {
        transform: translateX(2px) rotate(2deg);
    }

    95% {
        transform: translateX(0) rotate(0deg);
    }
}

.smart-cart__embedded-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: nowrap;
}

/* Global Mode Improvements */
.smart-cart--global .smart-cart__embedded-content {
    justify-content: center;
}

.smart-cart--global .smart-cart__tickets {
    display: none !important;
}

/* Ticket Strip - DYNAMIC GROWTH up to 40% of screen height */
.smart-cart--embedded .smart-cart__tickets {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 60%;
    /* DYNAMIC: Grow up to 40% of viewport height, then scroll */
    max-height: 40vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px;
    /* Thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 193, 7, 0.4) transparent;
}

.smart-cart--embedded .smart-cart__tickets::-webkit-scrollbar {
    width: 4px;
}

.smart-cart--embedded .smart-cart__tickets::-webkit-scrollbar-thumb {
    background: rgba(255, 193, 7, 0.4);
    border-radius: 2px;
}

/* Summary Section (Right Side) - NEVER SHRINK */
.smart-cart__embedded-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    /* Never shrink - always visible */
    flex-wrap: nowrap;
}

.smart-cart__embedded-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.smart-cart__embedded-count {
    font-size: 0.75rem;
    color: var(--sc-text-muted);
}

.smart-cart__embedded-total {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--sc-primary);
}

.smart-cart__embedded-cta {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark));
    color: #0a1628;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smart-cart__embedded-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

/* Ticket Pills */
.smart-cart__ticket {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--sc-success), #16a34a);
    padding: 3px 5px 3px 8px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.smart-cart__ticket-number {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.smart-cart__ticket-remove {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 0.5rem;
    transition: all 0.2s;
}

.smart-cart__ticket-remove:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Draw Group Badges (Global Mode) */
.smart-cart__draw-group {
    display: inline-flex;
    align-items: center;
}

.smart-cart__draw-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.3));
    border: 1px solid rgba(139, 92, 246, 0.5);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    transition: all 0.2s;
    white-space: nowrap;
}

.smart-cart__draw-badge:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(99, 102, 241, 0.5));
    transform: translateY(-1px);
}

/* ============================================
   MINI-CARDS (Premium Multi-Draw Display)
   ============================================ */
.smart-cart__mini-card {
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.95);
    border-radius: 8px;
    border: 2px solid;
    padding: 6px 10px;
    margin-bottom: 4px;
    flex: 1 1 auto;
    /* GROW to fill available space */
    min-width: 120px;
    /* Minimum width */
    max-width: 100%;
    /* Can be full width if alone */
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.25s ease;
}

.smart-cart__mini-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Active/Current draw has glow effect */
.smart-cart__mini-card.current {
    box-shadow: 0 0 15px var(--card-glow, rgba(139, 92, 246, 0.5));
}

/* Color Variants */
.smart-cart__mini-card.card-purple {
    border-color: #8b5cf6;
    --card-glow: rgba(139, 92, 246, 0.5);
}

.smart-cart__mini-card.card-purple .smart-cart__mini-card-label {
    color: #a78bfa;
}

.smart-cart__mini-card.card-emerald {
    border-color: #10b981;
    --card-glow: rgba(16, 185, 129, 0.5);
}

.smart-cart__mini-card.card-emerald .smart-cart__mini-card-label {
    color: #34d399;
}

.smart-cart__mini-card.card-amber {
    border-color: #f59e0b;
    --card-glow: rgba(245, 158, 11, 0.5);
}

.smart-cart__mini-card.card-amber .smart-cart__mini-card-label {
    color: #fbbf24;
}

.smart-cart__mini-card.card-rose {
    border-color: #f43f5e;
    --card-glow: rgba(244, 63, 94, 0.5);
}

.smart-cart__mini-card.card-rose .smart-cart__mini-card-label {
    color: #fb7185;
}

.smart-cart__mini-card.card-cyan {
    border-color: #06b6d4;
    --card-glow: rgba(6, 182, 212, 0.5);
}

.smart-cart__mini-card.card-cyan .smart-cart__mini-card-label {
    color: #22d3ee;
}

/* Mini-card Header */
.smart-cart__mini-card-header {
    margin-bottom: 3px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.smart-cart__mini-card-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* Mini-card Delete Button (X) */
.smart-cart__mini-card-delete {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #f87171;
    font-size: 0.45rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.smart-cart__mini-card-delete:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: #ef4444;
    color: white;
    transform: scale(1.15);
}

.smart-cart__mini-card-delete:active {
    transform: scale(0.95);
}

/* Mini-card Tickets Container - GROW before scroll */
.smart-cart__mini-card-tickets {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    /* Allow growth - will scroll only when parent container limits */
    max-height: 80px;
    /* ~4-5 rows before scroll */
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.smart-cart__mini-card-tickets::-webkit-scrollbar {
    width: 3px;
}

.smart-cart__mini-card-tickets::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* Ticket Pills - Shrink dynamically based on count */
.smart-cart__ticket-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    transition: all 0.2s;
    flex-shrink: 1;
    /* Allow shrinking */
    min-width: 32px;
    /* Minimum width */
}

.smart-cart__ticket-pill:hover {
    background: rgba(255, 255, 255, 0.2);
}

.smart-cart__ticket-pill.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 185, 129, 0.3));
    border-color: rgba(34, 197, 94, 0.5);
    color: #86efac;
}

.smart-cart__ticket-pill .smart-cart__ticket-remove {
    background: rgba(239, 68, 68, 0.3);
    border: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fca5a5;
    font-size: 0.5rem;
    transition: all 0.2s;
    margin-left: 2px;
}

.smart-cart__ticket-pill .smart-cart__ticket-remove:hover {
    background: rgba(239, 68, 68, 0.6);
    color: white;
    transform: scale(1.1);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .smart-cart__embedded-content {
        flex-direction: column;
        padding: 8px 12px;
        gap: 8px;
        flex-wrap: nowrap;
    }

    /* Mobile: Close/Minimize button - same position as desktop, just slightly larger for touch */
    .smart-cart__close-btn {
        width: 34px;
        height: 34px;
        top: -17px;
        right: 12px;
        transform: none;
        font-size: 0.85rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }

    .smart-cart__close-btn:hover {
        transform: scale(1.1);
    }

    /* Ensure cart container has overflow visible for the button */
    .smart-cart--embedded {
        overflow: visible;
    }

    /* Mobile: Tickets area - DYNAMIC GROWTH up to 45% of screen */
    .smart-cart--embedded .smart-cart__tickets {
        max-width: 100%;
        width: 100%;
        flex-direction: column;
        order: 1;
        /* DYNAMIC: Grow up to 45vh on mobile, then scroll */
        max-height: 45vh;
        overflow-y: auto;
        overflow-x: hidden;
        gap: 6px;
        padding: 6px;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 193, 7, 0.4) transparent;
    }

    .smart-cart--embedded .smart-cart__tickets::-webkit-scrollbar {
        width: 3px;
    }

    /* Mobile: Summary ALWAYS visible at bottom */
    .smart-cart__embedded-summary {
        width: 100%;
        justify-content: space-between;
        order: 2;
        flex-shrink: 0;
        padding-top: 6px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .smart-cart--global .smart-cart__embedded-content {
        flex-direction: row;
    }

    .smart-cart__embedded-total {
        font-size: 1rem;
    }

    .smart-cart__embedded-cta {
        padding: 10px 18px;
        font-size: 0.75rem;
        flex-shrink: 0;
    }

    /* MOBILE: Mini-Cards use FULL WIDTH */
    .smart-cart__mini-card {
        padding: 5px 8px;
        width: 100%;
        /* Full width */
        flex: 1 1 100%;
        max-width: 100%;
    }

    .smart-cart__mini-card-label {
        font-size: 0.6rem;
        max-width: 100%;
    }

    /* Mobile: Mini-card tickets grow more before scroll */
    .smart-cart__mini-card-tickets {
        gap: 3px;
        max-height: 70px;
        /* Allow more rows before scroll */
    }

    /* MOBILE: Smaller Ticket Pills that shrink */
    .smart-cart__ticket-pill {
        padding: 2px 4px;
        font-size: 0.6rem;
        border-radius: 6px;
        gap: 2px;
        min-width: 28px;
    }

    .smart-cart__ticket-pill .smart-cart__ticket-remove {
        width: 10px;
        height: 10px;
        font-size: 0.4rem;
    }

    .smart-cart__ticket {
        padding: 2px 4px 2px 6px;
        font-size: 0.65rem;
        border-radius: 8px;
    }

    .smart-cart__ticket-remove {
        width: 10px;
        height: 10px;
    }

    /* Raise cart above mobile bottom navigation bar (appears at 768px and below) */
    .smart-cart--embedded {
        bottom: 64px !important;
    }
}

@media (max-width: 480px) {
    .smart-cart--embedded .smart-cart__tickets {
        gap: 6px;
        /* Allow space for 2-3 complete draw cards */
        max-height: 180px;
    }

    .smart-cart__mini-card {
        padding: 5px 8px;
    }

    .smart-cart__mini-card-label {
        font-size: 0.65rem;
    }

    .smart-cart__ticket-pill {
        padding: 2px 5px;
        font-size: 0.6rem;
    }

    .smart-cart__ticket-pill .smart-cart__ticket-remove {
        width: 10px;
        height: 10px;
        font-size: 0.4rem;
    }

    .smart-cart__embedded-cta {
        padding: 8px 12px;
        font-size: 0.8rem;
        /* Slightly larger text for readability */
    }

    .smart-cart__embedded-total {
        font-size: 1rem;
    }

    .smart-cart__embedded-count {
        font-size: 0.7rem;
    }

    /* Clear All Button - Icon Only on Mobile */
    .smart-cart__clear-all-btn span {
        display: none;
        /* Hide text "Vaciar Carrito" */
    }

    .smart-cart__clear-all-btn {
        padding: 0;
        width: 38px;
        height: 38px;
        /* Square button */
        justify-content: center;
        flex-shrink: 0;
        border-radius: 8px;
        /* Ensure nice rounding */
    }

    .smart-cart__clear-all-btn i {
        font-size: 1rem;
        margin: 0;
    }
}

/* ============================================
   CLEAR ALL BUTTON (Now below Checkout Button)
   ============================================ */

/* Actions container - stacks checkout and clear buttons */
.smart-cart__embedded-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

/* Clear cart button - subtle style below checkout */
.smart-cart__clear-all-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 6px 14px;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.smart-cart__clear-all-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.smart-cart__clear-all-btn:active {
    transform: scale(0.98);
}

.smart-cart__clear-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.smart-cart__clear-all-btn i {
    font-size: 0.65rem;
}

/* Mobile: Stack buttons vertically */
@media (max-width: 768px) {
    .smart-cart__embedded-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
    }

    .smart-cart__embedded-cta {
        flex: 1;
    }

    .smart-cart__clear-all-btn {
        padding: 8px 12px;
        font-size: 0.65rem;
        display: flex !important;
        /* Ensure visibility */
    }
}

/* ============================================
   CONFIRMATION MODAL
   ============================================ */
.smart-cart-clear-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.smart-cart-clear-modal.show {
    opacity: 1;
    pointer-events: all;
}

.smart-cart-clear-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.smart-cart-clear-modal__content {
    position: relative;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(239, 68, 68, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smart-cart-clear-modal.show .smart-cart-clear-modal__content {
    transform: scale(1) translateY(0);
}

.smart-cart-clear-modal__icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
    border: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    color: #f87171;
}

.smart-cart-clear-modal__content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
}

.smart-cart-clear-modal__content p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0 0 24px;
    line-height: 1.5;
}

.smart-cart-clear-modal__content p strong {
    color: #fbbf24;
}

.smart-cart-clear-modal__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.smart-cart-clear-modal__cancel,
.smart-cart-clear-modal__confirm {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
}

.smart-cart-clear-modal__cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.smart-cart-clear-modal__cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.smart-cart-clear-modal__confirm {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.smart-cart-clear-modal__confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.smart-cart-toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 100001;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
}

.smart-cart-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.smart-cart-toast i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.smart-cart-toast--success {
    border-color: rgba(34, 197, 94, 0.3);
}

.smart-cart-toast--success i {
    color: #22c55e;
}

.smart-cart-toast--error {
    border-color: rgba(239, 68, 68, 0.3);
}

.smart-cart-toast--error i {
    color: #ef4444;
}

.smart-cart-toast--info i {
    color: #3b82f6;
}

.smart-cart-toast div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.smart-cart-toast strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.smart-cart-toast span {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ============================================
   DRAW-LEVEL CLEAR MODAL (variations)
   ============================================ */

/* Draw-specific icon - purple theme */
.smart-cart-clear-modal__icon--draw {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.1));
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
}

/* Note text styling */
.smart-cart-clear-modal__note {
    font-size: 0.8rem !important;
    color: #64748b !important;
    margin-top: -10px !important;
    font-style: italic;
}

/* Draw-specific confirm button - purple theme */
.smart-cart-clear-modal__confirm--draw {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.smart-cart-clear-modal__confirm--draw:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.smart-cart-clear-modal__confirm--draw:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   WALLET BALANCE INDICATOR
   ============================================ */
.smart-cart__wallet {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15), rgba(30, 132, 73, 0.1));
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.smart-cart__wallet--sufficient {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.25), rgba(30, 132, 73, 0.15));
    border-color: rgba(39, 174, 96, 0.5);
}

.smart-cart__wallet--partial {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(202, 138, 4, 0.1));
    border-color: rgba(245, 158, 11, 0.3);
}

.smart-cart__wallet-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.smart-cart__wallet-info i {
    font-size: 1.1rem;
    color: #27ae60;
}

.smart-cart__wallet--partial .smart-cart__wallet-info i {
    color: #f59e0b;
}

.smart-cart__wallet-balance {
    font-size: 1rem;
    font-weight: 700;
    color: #27ae60;
    font-family: 'Montserrat', sans-serif;
}

.smart-cart__wallet--partial .smart-cart__wallet-balance {
    color: #f59e0b;
}

.smart-cart__wallet-msg {
    font-size: 0.75rem;
    color: #86efac;
    font-weight: 500;
}

.smart-cart__wallet--partial .smart-cart__wallet-msg {
    color: #fcd34d;
}

.smart-cart__wallet--sufficient .smart-cart__wallet-msg {
    color: #4ade80;
}

/* Mobile */
@media (max-width: 768px) {
    .smart-cart__wallet {
        padding: 6px 10px;
        margin-bottom: 6px;
        flex-wrap: wrap;
        gap: 4px;
    }

    .smart-cart__wallet-balance {
        font-size: 0.9rem;
    }

    .smart-cart__wallet-msg {
        font-size: 0.7rem;
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   DYNAMIC SPACER - Prevents cart from covering content
   ============================================ */
.smart-cart-spacer {
    display: block;
    width: 100%;
    pointer-events: none;
    /* Smooth transition when cart height changes */
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   FINAL MOBILE OVERRIDES - Must be at END of file
   ============================================ */
@media (max-width: 480px) {

    /* Minimized badge - ensure it's above bottom nav */
    .smart-cart__minimized-badge {
        bottom: 75px !important;
        right: 15px !important;
    }

    /* FOOTER LAYOUT FIX */
    .smart-cart__embedded-content {
        padding: 8px 10px !important;
    }

    /* Summary section - stack vertically */
    .smart-cart__embedded-summary {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    /* Info row (count + total) */
    .smart-cart__embedded-info {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
    }

    /* Actions row - both buttons side by side */
    .smart-cart__embedded-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        width: 100% !important;
    }

    /* Checkout button - takes most space */
    .smart-cart__embedded-cta {
        flex: 1 !important;
        padding: 12px 10px !important;
        font-size: 0.65rem !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: calc(100% - 52px) !important;
        /* Leave room for clear button */
    }

    /* Clear button - ICON ONLY, fixed size */
    .smart-cart__clear-all-btn {
        display: flex !important;
        padding: 0 !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        justify-content: center !important;
        align-items: center !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
        background: rgba(239, 68, 68, 0.15) !important;
        border: 1px solid rgba(239, 68, 68, 0.4) !important;
    }

    .smart-cart__clear-all-btn span {
        display: none !important;
    }

    .smart-cart__clear-all-btn i {
        font-size: 1.1rem !important;
        margin: 0 !important;
        color: #f87171 !important;
    }

    /* CRITICAL: Raise cart above mobile bottom navigation bar (height: 64px) */
    .smart-cart--embedded {
        bottom: 64px !important;
    }

    .smart-cart--embedded.show {
        transform: translateY(0) !important;
    }
}

/* ============================================
   LIGHT THEME SUPPORT - SMART CART
   ============================================ */

[data-theme="light"] .smart-cart {
    --sc-bg: rgba(255, 255, 255, 0.98);
    --sc-text: #0a1628;
    --sc-text-muted: #4b5563;
    --sc-primary: #b8860b;
    --sc-primary-dark: #a67c00;
    --sc-border: rgba(15, 23, 42, 0.12);
}

/* Smart Cart Container - Light */
[data-theme="light"] .smart-cart--embedded {
    background: rgba(255, 255, 255, 0.98);
    border-top: 2px solid #b8860b;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.12);
}

/* Close Button - Light */
[data-theme="light"] .smart-cart__close-btn {
    background: #ffffff;
    border: 2px solid #b8860b;
    color: #b8860b;
}

[data-theme="light"] .smart-cart__close-btn:hover {
    background: #b8860b;
    color: #ffffff;
}

/* Minimized Badge - Light */
[data-theme="light"] .smart-cart__minimized-badge {
    background: linear-gradient(135deg, #b8860b 0%, #a67c00 100%);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.4);
}

/* Summary Info - Light */
[data-theme="light"] .smart-cart__embedded-count {
    color: #4b5563;
}

[data-theme="light"] .smart-cart__embedded-total {
    color: #b8860b;
}

/* CTA Button - Light */
[data-theme="light"] .smart-cart__embedded-cta {
    background: linear-gradient(135deg, #b8860b, #a67c00);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

[data-theme="light"] .smart-cart__embedded-cta:hover {
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.4);
}

/* Ticket Badges - Light (keep green for selected) */
[data-theme="light"] .smart-cart__ticket {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    border: 1px solid rgba(5, 150, 105, 0.4);
}

/* Mini Cards - Light */
[data-theme="light"] .smart-cart__mini-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .smart-cart__mini-card-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .smart-cart__mini-card-label {
    color: #0a1628;
}

/* Ticket Pills - Light */
[data-theme="light"] .smart-cart__ticket-pill {
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #374151;
}

[data-theme="light"] .smart-cart__ticket-pill:hover {
    background: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .smart-cart__ticket-pill.active {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(16, 185, 129, 0.1));
    border-color: rgba(5, 150, 105, 0.3);
    color: #059669;
}

/* Clear All Button - Light */
[data-theme="light"] .smart-cart__clear-all-btn {
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.15);
    color: #4b5563;
}

[data-theme="light"] .smart-cart__clear-all-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: #dc2626;
}

/* Clear Modal - Light */
[data-theme="light"] .smart-cart-clear-modal__overlay {
    background: rgba(15, 23, 42, 0.5);
}

[data-theme="light"] .smart-cart-clear-modal__content {
    background: #ffffff;
    border: 1px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .smart-cart-clear-modal__content h3 {
    color: #0a1628;
}

[data-theme="light"] .smart-cart-clear-modal__content p {
    color: #4b5563;
}

[data-theme="light"] .smart-cart-clear-modal__cancel {
    background: #f4f6f9;
    color: #374151;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .smart-cart-clear-modal__cancel:hover {
    background: #e5e7eb;
    color: #0a1628;
}

/* Toast Notifications - Light */
[data-theme="light"] .smart-cart-toast {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .smart-cart-toast strong {
    color: #0a1628;
}

[data-theme="light"] .smart-cart-toast span {
    color: #4b5563;
}

/* Wallet Balance - Light */
[data-theme="light"] .smart-cart__wallet {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(5, 150, 105, 0.2);
}

[data-theme="light"] .smart-cart__wallet-balance {
    color: #059669;
}

[data-theme="light"] .smart-cart__wallet-msg {
    color: #047857;
}

[data-theme="light"] .smart-cart__wallet--partial {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
    border-color: rgba(245, 158, 11, 0.2);
}

[data-theme="light"] .smart-cart__wallet--partial .smart-cart__wallet-balance {
    color: #d97706;
}

[data-theme="light"] .smart-cart__wallet--partial .smart-cart__wallet-msg {
    color: #b45309;
}