/**
 * Unified Checkout Page Styles
 * LOTIPRO - Venezuelan Lottery Platform
 */

/* ==============================
   CSS VARIABLES
   ============================== */
:root {
    --bg-dark: #0a1628;
    --bg-card: #0f1d32;
    --bg-card-hover: #142540;
    --primary: #ffc107;
    --primary-dark: #e6ad00;
    --success: #22c55e;
    --success-dark: #16a34a;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text: #ffffff;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --purple: #8b5cf6;
    --purple-light: rgba(139, 92, 246, 0.2);
}

/* Hide SmartCart footer during checkout page - only on standalone checkout */
.checkout-page .smart-cart--embedded,
.checkout-page .smart-cart,
.checkout-page #smartCartFooterContainer {
    display: none !important;
}

/* ==============================
   CHECKOUT MODAL OVERLAY STYLES
   ============================== */
.checkout-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.checkout-modal-overlay.active {
    display: flex;
}

/* Hide SmartCart when checkout modal is open */
.checkout-modal-overlay.active~.smart-cart,
body:has(.checkout-modal-overlay.active) .smart-cart {
    display: none !important;
    opacity: 0 !important;
    transform: translateY(100%) !important;
}

/* Modal Container */
.checkout-modal {
    background: var(--bg-card, #0f1d32);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.checkout-modal__header {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), transparent);
}

.checkout-modal__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.checkout-modal__title i {
    color: #ffc107;
    font-size: 0.9rem;
}

.checkout-modal__close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s;
}

.checkout-modal__close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Modal Body */
.checkout-modal__body {
    padding: 12px 16px;
    overflow-y: auto;
    flex: 1;
}

.checkout-modal__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #94a3b8;
    gap: 12px;
}

.checkout-modal__loading i {
    font-size: 2rem;
    color: #8b5cf6;
}

/* Ticket Chip in Modal */
.cm-ticket-chip {
    background: linear-gradient(135deg, #059669, #047857);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    color: #d1fae5;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cm-ticket-chip__remove {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fef3c7;
    font-size: 0.45rem;
}

.cm-ticket-chip__remove:hover {
    background: rgba(220, 38, 38, 0.8);
    color: white;
}

/* Total Row in Modal */
.cm-total-row {
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid #ffc107;
    border-radius: 6px;
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cm-total-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.cm-total-value {
    text-align: right;
}

.cm-total-bs {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffc107;
}

.cm-total-usd {
    font-size: 0.65rem;
    color: #94a3b8;
}

/* Gateway Section in Modal */
.cm-gateway-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cm-gateway-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cm-gateway-label i {
    color: #8b5cf6;
}

.cm-gateways-grid {
    display: flex;
    gap: 6px;
    flex: 1;
}

.cm-gateway-card {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.cm-gateway-card:hover,
.cm-gateway-card.selected {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.15);
}

.cm-gateway-card__icon {
    font-size: 0.85rem;
    color: #8b5cf6;
}

.cm-gateway-card__name {
    font-size: 0.65rem;
    font-weight: 600;
    color: #fff;
}

/* Account Details in Modal */
.cm-account-details {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
}

.cm-account-details__title {
    font-size: 0.65rem;
    color: #8b5cf6;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cm-account-details__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    margin-bottom: 3px;
}

.cm-account-details__label {
    font-size: 0.6rem;
    color: #94a3b8;
}

.cm-account-details__value {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cm-account-details__value span {
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

.cm-copy-btn {
    background: rgba(139, 92, 246, 0.2);
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.55rem;
    color: #8b5cf6;
    cursor: pointer;
}

.cm-copy-btn:hover {
    background: #8b5cf6;
    color: #fff;
}

/* Form Elements in Modal */
.cm-form-group {
    margin-bottom: 10px;
}

.cm-form-label {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cm-form-label i {
    color: #8b5cf6;
}

.cm-reference-row {
    position: relative;
    display: flex;
    align-items: center;
}

.cm-reference-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 70px 8px 12px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 2px;
}

.cm-reference-input:focus {
    outline: none;
    border-color: #8b5cf6;
}

.cm-paste-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #8b5cf6;
    border: none;
    border-radius: 5px;
    padding: 5px 8px;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
}

.cm-paste-btn:hover {
    background: #7c3aed;
}

/* Upload Area in Modal */
.cm-upload-area {
    border: 2px dashed rgba(139, 92, 246, 0.4);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    background: rgba(139, 92, 246, 0.03);
    margin-bottom: 8px;
    transition: all 0.2s;
}

.cm-upload-area:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.08);
}

.cm-upload-area i {
    font-size: 1rem;
    color: #8b5cf6;
    margin-bottom: 2px;
}

.cm-upload-area p {
    font-size: 0.6rem;
    color: #94a3b8;
    margin: 0;
}

.cm-upload-preview {
    display: none;
    position: relative;
    margin-bottom: 12px;
    max-height: 150px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.cm-upload-preview.show {
    display: flex;
    flex-direction: column;
}

.cm-upload-preview img {
    width: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

.cm-upload-preview__change {
    position: sticky;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    margin: 5px auto;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    color: #fff;
    cursor: pointer;
    font-size: 0.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
    z-index: 10;
    flex-shrink: 0;
    white-space: nowrap;
}

.cm-upload-preview__change:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.cm-upload-preview__change i {
    font-size: 0.55rem;
}

/* Responsive adjustments for change button */
@media (max-width: 480px) {
    .cm-upload-preview__change {
        font-size: 0.55rem;
        padding: 4px 10px;
    }
}

/* Submit Button in Modal */
.cm-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    padding: 12px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.cm-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.cm-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Messages in Modal */
.cm-message {
    padding: 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.cm-message.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
    color: #22c55e;
    display: flex;
}

.cm-message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #ef4444;
    display: flex;
}

/* Empty State in Modal */
.cm-empty-state {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.cm-empty-state i {
    font-size: 2.5rem;
    color: #64748b;
    margin-bottom: 12px;
}

.cm-empty-state p {
    margin: 0 0 16px 0;
}

.cm-empty-state a {
    color: #8b5cf6;
    text-decoration: none;
}

/* Extended Hold Button */
.cm-extended-hold-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    margin-top: 8px;
}

.cm-extended-hold-btn:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.cm-extended-hold-btn i {
    font-size: 1rem;
}

.cm-extended-hold-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 8px;
    margin-top: 10px;
    color: #0ea5e9;
    font-size: 0.75rem;
}

.cm-extended-hold-info i {
    flex-shrink: 0;
}

/* Pending Orders Notice */
.cm-pending-notice {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0ea5e9;
    font-size: 0.7rem;
}

.cm-pending-notice i {
    font-size: 1rem;
    animation: pendingPulse 2s ease-in-out infinite;
}

@keyframes pendingPulse {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.cm-pending-notice span {
    flex: 1;
    line-height: 1.4;
}

/* Pending order groups have a different border */
.cm-cart-group.pending-order {
    border-color: rgba(14, 165, 233, 0.3);
}

.cm-cart-group.pending-order .cm-cart-group__header {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), transparent);
}

/* Locked tickets (from pending orders - can't be removed) */
.cm-ticket-chip.locked {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-color: rgba(14, 165, 233, 0.5);
    color: #e0f2fe;
}

/* Mobile Responsive for Modal */
@media (max-width: 640px) {
    .checkout-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .checkout-modal__header {
        padding: 12px 16px;
    }

    .checkout-modal__title {
        font-size: 0.95rem;
    }

    .checkout-modal__body {
        padding: 12px 16px;
    }

    .cm-gateway-row {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .cm-gateway-label {
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .cm-gateway-card {
        padding: 4px 8px;
    }

    .cm-gateway-card__icon {
        font-size: 0.75rem;
    }

    .cm-gateway-card__name {
        font-size: 0.55rem;
    }

    .cm-total-row {
        padding: 6px 12px;
    }

    .cm-total-bs {
        font-size: 0.95rem;
    }

    .cm-submit-btn {
        padding: 10px;
        font-size: 0.85rem;
    }

    .cm-extended-hold-btn {
        padding: 8px;
        font-size: 0.8rem;
    }

    .cm-upload-preview {
        max-height: 80px;
    }

    .cm-upload-area {
        padding: 10px;
    }

    .cm-upload-area i {
        font-size: 1rem;
    }
}

/* ==============================
   BASE STYLES (for standalone checkout page)
   ============================== */
.checkout-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.checkout-page body,
body.checkout-page {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==============================
   HEADER
   ============================== */
.checkout-header {
    background: var(--bg-card);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.checkout-header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.checkout-header__logo img {
    height: 40px;
}

.checkout-header__logo span {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.25rem;
}

.checkout-header__back {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.checkout-header__back:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

/* ==============================
   MAIN CONTENT
   ============================== */
.checkout-main {
    flex: 1;
    padding: 24px 16px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.checkout-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkout-title i {
    color: var(--primary);
}

/* ==============================
   CART GROUPS
   ============================== */
.cart-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.cart-group {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.cart-group__header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-group__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Hidden - not needed */
.cart-group__lottery {
    display: none;
}

.cart-group__draw {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Hidden - not needed */
.cart-group__meta {
    display: none;
}

.cart-group__subtotal {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: right;
}

.cart-group__subtotal-label {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.cart-group__subtotal-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
}

/* Remove Draw Button */
.cart-group__remove-draw {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ef4444;
    font-size: 0.65rem;
    transition: all 0.2s;
    margin-left: 4px;
    flex-shrink: 0;
}

.cart-group__remove-draw:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    color: #fff;
}

.cart-group__remove-draw:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cart-group__body {
    padding: 6px 12px;
}

.cart-group__tickets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* ==============================
   TICKET CHIPS
   ============================== */
.ticket-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: linear-gradient(135deg, #059669, #047857);
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.65rem;
    color: #d1fae5;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ticket-chip i {
    font-size: 0.45rem;
}

.ticket-chip__remove {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fef3c7;
    font-size: 0.5rem;
    margin-left: 2px;
    transition: all 0.2s;
}

.ticket-chip__remove:hover {
    background: rgba(220, 38, 38, 0.8);
    color: white;
    transform: scale(1.1);
}

/* ==============================
   GRAND TOTAL CARD
   ============================== */
.grand-total-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
    border-radius: 10px;
    border: 2px solid var(--primary);
    padding: 6px 14px;
    margin-bottom: 10px;
}

.grand-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grand-total-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.grand-total-value {
    text-align: right;
    display: flex;
    flex-direction: column;
}

/* Bs is now primary (shown first/larger) */
.grand-total-bs {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    order: 1;
}

/* USD is now secondary (shown second/smaller) */
.grand-total-usd {
    font-size: 0.7rem;
    color: var(--text-muted);
    order: 2;
}

/* ==============================
   PAYMENT SECTION
   ============================== */
.payment-section {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 10px 14px;
}

.section-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title i {
    color: var(--purple);
}

/* Gateway Selection - inline with title */
.gateway-section-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.gateways-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.gateway-card {
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.gateway-card:hover {
    border-color: var(--purple);
    background: var(--purple-light);
}

.gateway-card.selected {
    border-color: var(--purple);
    background: var(--purple-light);
}

.gateway-card__icon {
    font-size: 0.9rem;
    color: var(--purple);
}

.gateway-card__name {
    font-size: 0.7rem;
    font-weight: 600;
}

/* ==============================
   ACCOUNT DETAILS
   ============================== */
.account-details {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.account-details__title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--purple);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-details__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-bottom: 3px;
}

.account-details__label {
    color: var(--text-muted);
    font-size: 0.65rem;
}

.account-details__value {
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-details__value span {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.75rem;
}

.copy-btn {
    background: var(--purple-light);
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--purple);
    font-size: 0.65rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--purple);
    color: white;
}

/* ==============================
   FORM ELEMENTS
   ============================== */
.form-group {
    margin-bottom: 10px;
}

.form-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.form-label i {
    color: var(--purple);
    margin-right: 4px;
}

/* Reference Input with embedded paste button */
.reference-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.reference-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 8px 80px 8px 12px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    letter-spacing: 3px;
}

.reference-input::placeholder {
    color: var(--text-muted);
    letter-spacing: normal;
}

.reference-input:focus {
    outline: none;
    border-color: var(--purple);
}

.paste-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--purple);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    color: white;
    font-weight: 600;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 3px;
}

.paste-btn:hover {
    background: #7c3aed;
}

/* ==============================
   UPLOAD AREA
   ============================== */
.upload-area {
    border: 2px dashed rgba(139, 92, 246, 0.4);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    background: rgba(139, 92, 246, 0.03);
    transition: all 0.2s;
    margin-bottom: 12px;
}

.upload-area:hover {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.08);
}

.upload-area i {
    font-size: 1.5rem;
    color: var(--purple);
    margin-bottom: 6px;
}

.upload-area p {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.upload-preview {
    display: none;
    position: relative;
    margin-bottom: 12px;
    max-height: 150px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.upload-preview.show {
    display: block;
}

.upload-preview img {
    width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.upload-preview__remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==============================
   SUBMIT BUTTON
   ============================== */
.submit-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.25s;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==============================
   SUCCESS STATE
   ============================== */
.success-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.success-overlay.show {
    display: flex;
}

.success-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon i {
    font-size: 2.5rem;
    color: var(--success);
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.success-message {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.success-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: var(--bg-dark);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

/* ==============================
   TOAST NOTIFICATIONS
   ============================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.warning {
    border-left: 3px solid var(--warning);
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast.warning i {
    color: var(--warning);
}

/* ==============================
   CHECKOUT MODAL STYLES
   (for embedded modal version)
   ============================== */
.cm-cart-groups {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.cm-cart-group {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.cm-cart-group__header {
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), transparent);
}

.cm-cart-group__title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

.cm-cart-group__subtotal {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: right;
}

.cm-cart-group__subtotal-count {
    font-size: 0.6rem;
    color: #94a3b8;
}

.cm-cart-group__subtotal-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffc107;
}

.cm-cart-group__tickets {
    padding: 4px 10px 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.cm-cart-group__remove-draw {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ef4444;
    font-size: 0.65rem;
    transition: all 0.2s;
    margin-left: 4px;
    flex-shrink: 0;
}

.cm-cart-group__remove-draw:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    color: #fff;
}

.cm-cart-group__remove-draw:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cm-ticket-chip {
    background: linear-gradient(135deg, #059669, #047857);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    color: #d1fae5;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cm-ticket-chip__remove {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fef3c7;
    font-size: 0.45rem;
    transition: all 0.2s;
}

.cm-ticket-chip__remove:hover {
    background: rgba(220, 38, 38, 0.8);
    color: white;
}

/* Pending order groups */
.cm-cart-group.pending-order {
    border-color: rgba(14, 165, 233, 0.3);
}

.cm-cart-group.pending-order .cm-cart-group__header {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), transparent);
}

/* Locked tickets (from pending orders) */
.cm-ticket-chip.locked {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-color: rgba(14, 165, 233, 0.5);
    color: #e0f2fe;
}

/* ==============================
   RESPONSIVE - MOBILE
   ============================== */
@media (max-width: 640px) {
    .checkout-title {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

    .checkout-header {
        padding: 12px 16px;
    }

    .checkout-header__logo span {
        display: none;
    }

    /* Cart group header - inline layout for mobile */
    .cart-group__header {
        flex-direction: row;
        align-items: center;
        padding: 6px 10px;
    }

    .cart-group__info {
        flex: 1;
        min-width: 0;
    }

    .cart-group__draw {
        font-size: 0.65rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cart-group__subtotal {
        text-align: right;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .cart-group__subtotal-label {
        font-size: 0.55rem;
    }

    .cart-group__subtotal-value {
        font-size: 0.8rem;
    }

    .cart-group__body {
        padding: 4px 10px;
    }

    /* Reference input - keep inline */
    .reference-input-group {
        flex-direction: row;
    }

    .reference-input {
        padding: 6px 70px 6px 10px;
        font-size: 0.9rem;
    }

    .paste-btn {
        padding: 5px 8px;
        font-size: 0.6rem;
    }

    .gateways-grid {
        flex-wrap: nowrap;
    }

    /* Gateway section - keep inline on mobile */
    .gateway-section-row {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .gateway-card {
        padding: 4px 8px;
    }

    .gateway-card__icon {
        font-size: 0.8rem;
    }

    .gateway-card__name {
        font-size: 0.6rem;
    }

    .section-title {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    /* Upload preview - reduced height for mobile */
    .upload-preview {
        max-height: 100px;
    }

    /* Upload area - 40% height reduction */
    .upload-area {
        padding: 8px;
    }

    .upload-area i {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .upload-area p {
        font-size: 0.6rem;
    }

    /* Submit button - 20% height reduction */
    .submit-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    /* Modal styles */
    .cm-cart-group__header {
        padding: 6px 10px;
    }

    .cm-cart-group__title {
        font-size: 0.65rem;
        max-width: 60%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cm-cart-group__subtotal {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .cm-cart-group__subtotal-count {
        font-size: 0.5rem;
    }

    .cm-cart-group__subtotal-value {
        font-size: 0.75rem;
    }

    .cm-cart-group__tickets {
        padding: 4px 10px;
    }
}

/* ==============================
   COLLAPSIBLE ORDER SECTION
   ============================== */
.cm-order-section {
    margin-bottom: 10px;
}

.cm-order-toggle {
    width: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
}

.cm-order-toggle:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(139, 92, 246, 0.1));
    border-color: rgba(139, 92, 246, 0.5);
}

.cm-order-toggle__left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cm-order-toggle__left i {
    color: #8b5cf6;
    font-size: 1rem;
}

.cm-order-toggle__left span {
    font-size: 0.85rem;
    font-weight: 600;
}

.cm-order-toggle__badge {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.cm-order-toggle__arrow {
    color: #8b5cf6;
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.cm-order-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
    margin-top: 0;
    padding-top: 0;
}

.cm-order-details.expanded {
    max-height: 500px;
    margin-top: 10px;
    padding-top: 0;
}

/* ==============================
   COUNTDOWN TIMER SECTION
   ============================== */
.cm-countdown-section {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.cm-countdown__text {
    font-size: 0.75rem;
    color: #d1d5db;
    line-height: 1.4;
}

.cm-countdown__text i {
    color: #22c55e;
    margin-right: 6px;
}

.cm-countdown__time {
    font-weight: 700;
    color: #22c55e;
    font-size: 0.85rem;
}

.cm-countdown__hint {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cm-countdown__hint strong {
    color: #8b5cf6;
}

.cm-countdown-section.urgent {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border-color: rgba(245, 158, 11, 0.4);
}

.cm-countdown-section.urgent .cm-countdown__text i,
.cm-countdown-section.urgent .cm-countdown__time {
    color: #f59e0b;
}

.cm-countdown-section.critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border-color: rgba(239, 68, 68, 0.5);
    animation: criticalPulse 1s ease-in-out infinite;
}

.cm-countdown-section.critical .cm-countdown__text i,
.cm-countdown-section.critical .cm-countdown__time {
    color: #ef4444;
}

@keyframes criticalPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

/* ==============================
   EXPIRATION MODAL
   ============================== */
.cm-expiration-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
    animation: cmFadeIn 0.3s ease;
}

@keyframes cmFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cm-expiration-modal {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: cmModalBounce 0.4s ease;
    box-shadow: 0 25px 50px rgba(239, 68, 68, 0.2);
}

@keyframes cmModalBounce {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }

    60% {
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cm-expiration-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: cmIconPulse 2s ease-in-out infinite;
}

@keyframes cmIconPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 0 20px rgba(239, 68, 68, 0);
    }
}

.cm-expiration-icon i {
    font-size: 2.5rem;
    color: #fff;
}

.cm-expiration-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ef4444;
    margin: 0 0 10px 0;
}

.cm-expiration-message {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.cm-expiration-hint {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    margin-bottom: 25px;
}

.cm-expiration-hint i {
    color: #22c55e;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.cm-expiration-hint span {
    font-size: 0.8rem;
    color: #22c55e;
    line-height: 1.5;
}

.cm-expiration-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cm-expiration-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.cm-expiration-btn.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.cm-expiration-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.cm-expiration-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
}

.cm-expiration-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Mobile responsive for countdown and expiration */
@media (max-width: 640px) {
    .cm-order-toggle {
        padding: 8px 12px;
    }

    .cm-order-toggle__left span {
        font-size: 0.8rem;
    }

    .cm-countdown-section {
        padding: 10px 12px;
    }

    .cm-countdown__icon {
        width: 35px;
        height: 35px;
    }

    .cm-countdown__icon i {
        font-size: 0.95rem;
    }

    .cm-countdown__timer {
        font-size: 1.1rem;
    }

    .cm-expiration-modal {
        padding: 30px 20px;
    }

    .cm-expiration-icon {
        width: 60px;
        height: 60px;
    }

    .cm-expiration-icon i {
        font-size: 1.8rem;
    }

    .cm-expiration-title {
        font-size: 1.2rem;
    }
}

/* ============================================
   LIGHT THEME SUPPORT - CHECKOUT
   ============================================ */

[data-theme="light"] {
    --bg-dark: #eef2f6;
    --bg-card: #ffffff;
    --border: rgba(15, 23, 42, 0.12);
    --text: #0a1628;
    --text-muted: #4b5563;
    --primary: #b8860b;
}

/* Checkout Page Container - Light */
[data-theme="light"] .checkout-page {
    background: #eef2f6;
}

/* Checkout Header - Light */
[data-theme="light"] .checkout-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .checkout-header__logo span {
    color: #b8860b;
}

[data-theme="light"] .checkout-header__back {
    color: #374151;
}

[data-theme="light"] .checkout-header__back:hover {
    background: rgba(184, 134, 11, 0.1);
    color: #b8860b;
}

/* Checkout Modal Overlay - Light */
[data-theme="light"] .cm-overlay {
    background: rgba(15, 23, 42, 0.5);
}

/* Modal Container - Light Premium */
[data-theme="light"] .cm-modal {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .cm-header {
    background: linear-gradient(135deg, #b8860b, #a67c00);
}

[data-theme="light"] .cm-body {
    background: #ffffff;
}

[data-theme="light"] .cm-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Order Toggle - Light */
[data-theme="light"] .cm-order-toggle {
    background: #f4f6f9;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .cm-order-toggle__left span {
    color: #374151;
}

[data-theme="light"] .cm-order-toggle__amount {
    color: #b8860b;
}

/* Countdown Section - Light */
[data-theme="light"] .cm-countdown-section {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.08), rgba(167, 130, 0, 0.05));
    border: 1px solid rgba(184, 134, 11, 0.2);
}

[data-theme="light"] .cm-countdown__icon {
    background: linear-gradient(135deg, #b8860b, #a67c00);
}

[data-theme="light"] .cm-countdown__timer {
    color: #b8860b;
}

[data-theme="light"] .cm-countdown__text {
    color: #374151;
}

/* Gateway Cards - Light Premium */
[data-theme="light"] .cm-gateway-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .cm-gateway-card:hover {
    border-color: rgba(184, 134, 11, 0.3);
    background: #fefefe;
}

[data-theme="light"] .cm-gateway-card.selected {
    border-color: #b8860b;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}

[data-theme="light"] .cm-gateway-name {
    color: #0a1628;
}

[data-theme="light"] .cm-gateway-desc {
    color: #4b5563;
}

/* Upload Area - Light */
[data-theme="light"] .cm-upload-area {
    background: #f4f6f9;
    border: 2px dashed rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .cm-upload-area:hover {
    border-color: #b8860b;
    background: rgba(184, 134, 11, 0.05);
}

[data-theme="light"] .cm-upload-icon {
    color: #b8860b;
}

[data-theme="light"] .cm-upload-text {
    color: #374151;
}

[data-theme="light"] .cm-upload-hint {
    color: #6b7280;
}

/* Extended Hold Section - Light */
[data-theme="light"] .cm-extended-hold-section {
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.25);
}

[data-theme="light"] .cm-extended-hold-btn {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

/* Expiration Modal - Light */
[data-theme="light"] .cm-expiration-modal {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .cm-expiration-icon {
    background: rgba(239, 68, 68, 0.1);
}

[data-theme="light"] .cm-expiration-title {
    color: #0a1628;
}

[data-theme="light"] .cm-expiration-message {
    color: #374151;
}

/* Buttons - Light */
[data-theme="light"] .cm-expiration-btn.primary {
    background: linear-gradient(135deg, #b8860b, #a67c00);
    color: #ffffff;
}

[data-theme="light"] .cm-expiration-btn.secondary {
    background: #f4f6f9;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #374151;
}

[data-theme="light"] .cm-expiration-btn.secondary:hover {
    background: #e5e7eb;
    color: #0a1628;
}

/* ============================================
   CHECKOUT MODAL - ADDITIONAL LIGHT THEME FIXES
   High Contrast for Subtotal, Billetera, Cubierto, Total
   ============================================ */

/* Cart Groups - Light */
[data-theme="light"] .cart-group {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .cart-group__header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), transparent);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .cart-group__title,
[data-theme="light"] .cm-cart-group__title {
    color: #0a1628 !important;
}

[data-theme="light"] .cart-group__subtotal-label,
[data-theme="light"] .cm-cart-group__subtotal-count {
    color: #4b5563 !important;
}

[data-theme="light"] .cart-group__subtotal-value,
[data-theme="light"] .cm-cart-group__subtotal-value {
    color: #b8860b !important;
}

/* CM Cart Group - Light */
[data-theme="light"] .cm-cart-group {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .cm-cart-group__header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), transparent);
}

/* Grand Total Section - Light Premium */
[data-theme="light"] .grand-total-section,
[data-theme="light"] .checkout-summary__grand-total {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
}

[data-theme="light"] .grand-total-label {
    color: #0a1628 !important;
}

[data-theme="light"] .grand-total-bs,
[data-theme="light"] .grand-total-value {
    color: #b8860b !important;
}

[data-theme="light"] .grand-total-usd {
    color: #4b5563 !important;
}

/* Summary Rows - Light (Subtotal, Billetera, Cubierto) */
[data-theme="light"] .checkout-summary,
[data-theme="light"] .order-summary {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .checkout-summary__row,
[data-theme="light"] .summary-row {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .checkout-summary__label,
[data-theme="light"] .summary-label {
    color: #374151 !important;
}

[data-theme="light"] .checkout-summary__value,
[data-theme="light"] .summary-value {
    color: #0a1628 !important;
}

/* Wallet/Billetera Row - Light */
[data-theme="light"] .wallet-row,
[data-theme="light"] .checkout-summary__wallet {
    background: rgba(39, 174, 96, 0.08);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

[data-theme="light"] .wallet-label {
    color: #059669 !important;
}

[data-theme="light"] .wallet-value {
    color: #047857 !important;
}

/* Cubierto/Covered Row - Light with green */
[data-theme="light"] .covered-row,
[data-theme="light"] .checkout-summary__covered {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .covered-label {
    color: #059669 !important;
}

[data-theme="light"] .covered-value {
    color: #047857 !important;
}

/* Total a Pagar Row - Light Premium */
[data-theme="light"] .total-row,
[data-theme="light"] .checkout-summary__total {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.08), rgba(167, 130, 0, 0.04)) !important;
    border: 1px solid rgba(184, 134, 11, 0.2) !important;
}

[data-theme="light"] .total-label,
[data-theme="light"] .checkout-summary__total-label {
    color: #0a1628 !important;
    font-weight: 700;
}

[data-theme="light"] .total-value,
[data-theme="light"] .checkout-summary__total-value {
    color: #b8860b !important;
}

/* Success Banner (Compra Cubierta) - Light */
[data-theme="light"] .success-banner,
[data-theme="light"] .checkout-success-banner,
[data-theme="light"] .compra-cubierta-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.08)) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

[data-theme="light"] .success-banner__title,
[data-theme="light"] .success-banner h4 {
    color: #047857 !important;
}

[data-theme="light"] .success-banner__text,
[data-theme="light"] .success-banner p {
    color: #059669 !important;
}

/* Payment Section - Light */
[data-theme="light"] .payment-section {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .section-title {
    color: #0a1628;
}

[data-theme="light"] .section-title i {
    color: #7c3aed;
}

/* Gateway Cards (Standalone Page) - Light */
[data-theme="light"] .gateway-card {
    border: 2px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
}

[data-theme="light"] .gateway-card:hover,
[data-theme="light"] .gateway-card.selected {
    border-color: #7c3aed;
    background: rgba(124, 58, 237, 0.05);
}

[data-theme="light"] .gateway-card__icon {
    color: #7c3aed;
}

[data-theme="light"] .gateway-card__name {
    color: #0a1628;
}

/* Account Details - Light */
[data-theme="light"] .account-details {
    background: #f4f6f9;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .account-detail-row {
    color: #374151;
}

[data-theme="light"] .account-detail-label {
    color: #4b5563;
}

[data-theme="light"] .account-detail-value {
    color: #0a1628;
}

/* Ticket Chips - Light (keep green) */
[data-theme="light"] .ticket-chip,
[data-theme="light"] .cm-ticket-chip {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    border: 1px solid rgba(5, 150, 105, 0.4);
}

/* Countdown Text - Light */
[data-theme="light"] .countdown-text,
[data-theme="light"] .cm-countdown__text,
[data-theme="light"] .reservar-text {
    color: #374151 !important;
}

[data-theme="light"] .countdown-timer,
[data-theme="light"] .cm-countdown__timer {
    color: #b8860b !important;
}

[data-theme="light"] .countdown-link,
[data-theme="light"] .reservar-link {
    color: #7c3aed !important;
}

/* Saldo Display - Light */
[data-theme="light"] .saldo-display,
[data-theme="light"] .wallet-balance-display {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.25);
}

[data-theme="light"] .saldo-label {
    color: #059669 !important;
}

[data-theme="light"] .saldo-amount {
    color: #047857 !important;
}

[data-theme="light"] .saldo-checkbox-label {
    color: #374151 !important;
}

/* ============================================
   CRITICAL: Override inline styles from JS
   checkout-modal.js uses inline color: #94a3b8
   ============================================ */

/* Override ALL inline text colors in checkout modal */
[data-theme="light"] .checkout-modal [style*="color: #94a3b8"],
[data-theme="light"] .checkout-modal [style*="color:#94a3b8"],
[data-theme="light"] .checkout-modal__body [style*="color: #94a3b8"],
[data-theme="light"] .checkout-modal__body [style*="color:#94a3b8"] {
    color: #374151 !important;
}

/* Payment Breakdown Container - Light */
[data-theme="light"] .checkout-modal [style*="background: rgba(0, 0, 0"],
[data-theme="light"] .cm-payment-breakdown,
[data-theme="light"] .checkout-modal__body>div[style*="background: rgba(0, 0, 0"] {
    background: #f4f6f9 !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
}

/* Subtotal Row Text - Light */
[data-theme="light"] .cm-subtotal-row span,
[data-theme="light"] .checkout-modal [style*="color: #94a3b8"] {
    color: #374151 !important;
}

/* Countdown Section - Light Premium */
[data-theme="light"] .cm-countdown-section {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.08), rgba(167, 130, 0, 0.05)) !important;
    border: 1px solid rgba(184, 134, 11, 0.2) !important;
}

[data-theme="light"] .cm-countdown-section .cm-countdown__text {
    color: #374151 !important;
}

[data-theme="light"] .cm-countdown-section .cm-countdown__text i {
    color: #b8860b !important;
}

[data-theme="light"] .cm-countdown-section .cm-countdown__time {
    color: #b8860b !important;
    font-weight: 700;
}

[data-theme="light"] .cm-countdown__hint {
    color: #4b5563 !important;
}

[data-theme="light"] .cm-countdown__hint strong {
    color: #b8860b !important;
}

/* Wallet Notice - Light Premium */
[data-theme="light"] .cm-wallet-notice,
[data-theme="light"] div[style*="rgba(139, 92, 246, 0.15)"] {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05)) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
}

[data-theme="light"] .cm-wallet-info div[style*="color: #8b5cf6"],
[data-theme="light"] .checkout-modal [style*="color: #8b5cf6"] {
    color: #7c3aed !important;
}

/* Override wallet secondary text */
[data-theme="light"] .cm-wallet-info div[style*="color: #94a3b8"] {
    color: #4b5563 !important;
}

/* Redemption Notice - Light */
[data-theme="light"] .cm-redemption-notice,
[data-theme="light"] div[style*="rgba(34, 197, 94, 0.15)"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05)) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

/* All green text - Light readable */
[data-theme="light"] [style*="color: #22c55e"] {
    color: #059669 !important;
}

[data-theme="light"] [style*="color: #10b981"] {
    color: #047857 !important;
}

/* Purple text - Light readable */
[data-theme="light"] [style*="color: #8b5cf6"] {
    color: #7c3aed !important;
}

/* Yellow/Gold text - Light readable */
[data-theme="light"] [style*="color: #ffc107"] {
    color: #b8860b !important;
}

/* Cubierto/Pendiente Labels */
[data-theme="light"] div[style*="border-top: 1px solid rgba(255,255,255,0.1)"] {
    border-top: 1px solid rgba(15, 23, 42, 0.1) !important;
}

/* Auto Approve Notice - Light */
[data-theme="light"] .cm-auto-approve-notice,
[data-theme="light"] div[style*="rgba(34, 197, 94, 0.5)"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.08)) !important;
    border: 2px solid rgba(16, 185, 129, 0.4) !important;
}

/* Order Toggle - Light Premium */
[data-theme="light"] .cm-order-toggle {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

[data-theme="light"] .cm-order-toggle:hover {
    background: #f8fafc !important;
}

[data-theme="light"] .cm-order-toggle__left span,
[data-theme="light"] .cm-order-toggle__left i {
    color: #374151 !important;
}

[data-theme="light"] .cm-order-toggle__badge {
    background: #b8860b !important;
    color: #ffffff !important;
}

[data-theme="light"] .cm-order-toggle__arrow {
    color: #4b5563 !important;
}

/* Order Details - Light */
[data-theme="light"] .cm-order-details {
    background: #f8fafc !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

/* Cart Group Header - Light */
[data-theme="light"] .cm-cart-group__header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), transparent) !important;
}

[data-theme="light"] .cm-cart-group__title {
    color: #0a1628 !important;
}

[data-theme="light"] .cm-cart-group__subtotal-count {
    color: #4b5563 !important;
}

[data-theme="light"] .cm-cart-group__subtotal-value {
    color: #b8860b !important;
}

/* Form Labels - Light */
[data-theme="light"] .cm-form-label {
    color: #374151 !important;
}

[data-theme="light"] .cm-form-label i {
    color: #7c3aed !important;
}

/* Reference Input - Light */
[data-theme="light"] .cm-reference-input {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    color: #0a1628 !important;
}

[data-theme="light"] .cm-reference-input::placeholder {
    color: #9ca3af !important;
}

/* Upload Area - Light */
[data-theme="light"] .cm-upload-area {
    border: 2px dashed rgba(139, 92, 246, 0.3) !important;
    background: #f8fafc !important;
}

[data-theme="light"] .cm-upload-area:hover {
    border-color: #7c3aed !important;
    background: rgba(139, 92, 246, 0.05) !important;
}

[data-theme="light"] .cm-upload-area i {
    color: #7c3aed !important;
}

[data-theme="light"] .cm-upload-area p {
    color: #4b5563 !important;
}

/* Gateway Label - Light */
[data-theme="light"] .cm-gateway-label {
    color: #374151 !important;
}

/* Gateway Cards - Light */
[data-theme="light"] .cm-gateway-card {
    border: 2px solid rgba(15, 23, 42, 0.12) !important;
    background: #ffffff !important;
}

[data-theme="light"] .cm-gateway-card:hover,
[data-theme="light"] .cm-gateway-card.selected {
    border-color: #7c3aed !important;
    background: rgba(139, 92, 246, 0.08) !important;
}

[data-theme="light"] .cm-gateway-card__name {
    color: #0a1628 !important;
}

/* Account Details - Light */
[data-theme="light"] .cm-account-details {
    background: #f4f6f9 !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
}

[data-theme="light"] .cm-account-details__row {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .cm-account-details__label {
    color: #4b5563 !important;
}

[data-theme="light"] .cm-account-details__value {
    color: #0a1628 !important;
}

/* Total Row - Light Premium */
[data-theme="light"] .cm-total-row {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.1), rgba(167, 130, 0, 0.05)) !important;
    border: 2px solid rgba(184, 134, 11, 0.4) !important;
}

[data-theme="light"] .cm-total-label {
    color: #0a1628 !important;
    font-weight: 600;
}

[data-theme="light"] .cm-total-bs {
    color: #b8860b !important;
}

[data-theme="light"] .cm-total-usd {
    color: #4b5563 !important;
}

/* Extended Hold Info - Light */
[data-theme="light"] .cm-extended-hold-info {
    background: rgba(14, 165, 233, 0.08) !important;
    border: 1px solid rgba(14, 165, 233, 0.2) !important;
    color: #0284c7 !important;
}

/* Pending Notice - Light */
[data-theme="light"] .cm-pending-notice {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(6, 182, 212, 0.05)) !important;
    border: 1px solid rgba(14, 165, 233, 0.25) !important;
    color: #0284c7 !important;
}

/* Empty State - Light */
[data-theme="light"] .cm-empty-state {
    color: #4b5563 !important;
}

[data-theme="light"] .cm-empty-state i {
    color: #6b7280 !important;
}

[data-theme="light"] .cm-empty-state a {
    color: #7c3aed !important;
}

/* Loading State - Light */
[data-theme="light"] .checkout-modal__loading {
    color: #4b5563 !important;
}

[data-theme="light"] .checkout-modal__loading span {
    color: #4b5563 !important;
}

/* Modal Header - Light */
[data-theme="light"] .checkout-modal__header {
    background: linear-gradient(135deg, #b8860b, #a67c00) !important;
    border-bottom: 1px solid rgba(184, 134, 11, 0.3) !important;
}

[data-theme="light"] .checkout-modal__title {
    color: #ffffff !important;
}

[data-theme="light"] .checkout-modal__title i {
    color: #ffffff !important;
}

[data-theme="light"] .checkout-modal__close {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

[data-theme="light"] .checkout-modal__close:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Modal Body - Light */
[data-theme="light"] .checkout-modal {
    background: #ffffff !important;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2) !important;
}

/* Cover all checkout-modal text */
[data-theme="light"] .checkout-modal__body {
    color: #374151 !important;
}

/* Ensure all spans get proper color */
[data-theme="light"] .checkout-modal__body span {
    color: inherit;
}