/* === Base Reset Checkout === */
body.light-checkout {
    background: #f0f2f5 !important;
    color: #1a1a1a !important;
    font-family: 'Inter', sans-serif;
}

/* === Mini Header === */
.co-header {
    background: #fff;
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.co-header a.back-btn {
    color: #512DA8;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.co-header img.co-logo {
    height: 32px;
    width: auto;
}

.co-btn-tutorial {
    background: rgba(81, 45, 168, 0.1);
    color: #512DA8;
    border: 1px solid rgba(81, 45, 168, 0.2);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.co-btn-tutorial:hover {
    background: #512DA8;
    color: white;
}

/* === Layout Principal === */
.co-main {
    padding: 28px 16px 60px;
    max-width: 1100px;
    margin: 0 auto;
}

.co-title {
    font-size: 22px;
    font-weight: 800;
    color: #512DA8;
    margin-bottom: 24px;
    text-align: center;
}

.co-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    align-items: start;
}

/* === Tarjetas === */
.co-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.co-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #512DA8;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid rgba(81, 45, 168, 0.1);
}

/* === Form Fields === */
.co-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.co-input,
.co-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    /* 16px evita el zoom en iOS */
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #111;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.co-input:focus,
.co-select:focus {
    outline: none;
    border-color: #512DA8;
    box-shadow: 0 0 0 3px rgba(81, 45, 168, 0.15);
}

.co-input.input-error,
.co-select.input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    animation: co-shake 0.4s ease;
}

@keyframes co-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.co-error {
    display: none;
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.co-field {
    margin-bottom: 16px;
}

/* === Row de 2 Columnas (Cédula / Tel) === */
.co-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* === Botón Añadir === */
.co-btn-add {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 2px solid #512DA8;
    border-radius: 12px;
    color: #512DA8;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: all 0.2s;
}

.co-btn-add:hover,
.co-btn-add:active {
    background: #512DA8;
    color: #fff;
}

/* === Grid de números dinámicos === */
.co-num-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: rgba(81, 45, 168, 0.03);
    border: 1.5px dashed rgba(81, 45, 168, 0.2);
    border-radius: 12px;
    padding: 14px;
    margin-top: 4px;
    margin-bottom: 16px;
}

.co-num-grid .co-field {
    margin-bottom: 0;
}

.co-num-label {
    font-size: 11px;
    font-weight: 700;
    color: #512DA8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: block;
}

/* === Opciones de Moneda === */
.co-currency-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 4px;
}

.co-currency-btn {
    border: 2px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.co-currency-btn.active {
    border-color: #512DA8;
    background: #ede9f8;
    color: #512DA8;
}

/* === Opciones de Pago === */
.co-pay-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.co-pay-btn {
    border: 2px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.co-pay-btn.active {
    border-color: #512DA8;
    background: #ede9f8;
}

.co-pay-btn i {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
    color: #512DA8;
}

.co-pay-btn span {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

/* === Ticket Items === */
.co-ticket-empty {
    text-align: center;
    padding: 20px 0;
    color: #9ca3af;
    font-size: 14px;
    font-style: italic;
}

.co-ticket-item {
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.co-ticket-item:hover {
    border-color: #512DA8;
}

.co-ticket-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.co-ticket-item-header strong {
    color: #512DA8;
    font-size: 14px;
}

.co-ticket-item-header .co-monto {
    font-weight: 700;
    color: #111;
    font-size: 14px;
}

.co-ticket-item-sub {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
}

.co-ticket-item-sub .co-nums {
    font-family: monospace;
    font-weight: 700;
    color: #111;
}

.co-btn-del {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.co-btn-del:hover {
    background: #dc2626;
    color: white;
}

/* === Total === */
.co-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 800;
    color: #512DA8;
    padding: 14px 0;
    border-top: 2px solid rgba(81, 45, 168, 0.15);
    border-bottom: 2px solid rgba(81, 45, 168, 0.15);
    margin: 12px 0 16px;
}

/* === Botón Enviar === */
.co-btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    font-size: 16px;
    font-weight: 800;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.co-btn-submit:hover {
    opacity: 0.92;
}

.co-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.co-btn-submit i {
    font-size: 20px;
}

/* === RESPONSIVE MOBILE === */
@media (max-width: 768px) {
    .co-main {
        padding: 20px 12px 50px;
    }

    .co-title {
        font-size: 19px;
        margin-bottom: 18px;
    }

    .co-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .co-row-2 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .co-num-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .co-card {
        padding: 18px 16px;
        border-radius: 12px;
    }

    /* El ticket va abajo del form en mobile */
    .co-info-col {
        order: 2;
    }

    .co-form-col {
        order: 1;
    }
}

@media (max-width: 400px) {
    .co-num-grid {
        grid-template-columns: 1fr;
    }
}

/* === Grid de Opciones (Checkboxes visuales) === */
.co-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.co-check-btn {
    border: 2px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    padding: 12px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    user-select: none;
}

.co-check-btn.active {
    border-color: #512DA8;
    background: #ede9f8;
    color: #512DA8;
    box-shadow: 0 2px 8px rgba(81, 45, 168, 0.1);
}

.co-check-btn i {
    font-size: 14px;
}

.co-check-btn input[type="checkbox"] {
    display: none;
}

/* Ajuste para grids de números dinámicos */
.dynamic-numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

/* === Monto Section === */
.co-monto-label {
    font-size: 15px !important;
    color: #512DA8 !important; /* Púrpura base fuerte */
    margin-bottom: 10px !important;
    text-transform: uppercase !important;
    text-align: center !important;
    display: block !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
}

.co-monto-input {
    font-size: 32px !important;
    font-weight: 900 !important;
    text-align: center !important;
    color: #512DA8 !important; /* Color oscuro */
    background-color: #ffffff !important;
    border: 3px solid #512DA8 !important;
    border-radius: 16px !important;
    height: 70px !important;
    box-shadow: 0 4px 15px rgba(81, 45, 168, 0.15) !important;
    display: block !important;
    width: 100% !important;
}

.co-text-center {
    text-align: center;
}

/* === DRIVER.JS CUSTOM THEME === */
.driver-popover {
    background-color: #ffffff !important;
    border-radius: 20px !important;
    padding: 24px !important;
    box-shadow: 0 15px 40px rgba(81, 45, 168, 0.2) !important;
    border: 3px solid rgba(81, 45, 168, 0.15) !important;
    font-family: 'Inter', sans-serif !important;
    max-width: 380px !important;
}

.driver-popover-title {
    color: #512DA8 !important;
    font-family: 'Playfair Display', serif !important;
    font-weight: 900 !important;
    font-size: 20px !important;
    margin-bottom: 10px !important;
}

.driver-popover-description {
    color: #4b5563 !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
}

.driver-popover-arrow {
    border-color: #ffffff !important;
}

.driver-popover-btn {
    background-color: #f3f4f6 !important;
    color: #512DA8 !important;
    text-shadow: none !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 8px 18px !important;
    border-radius: 12px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.driver-popover-next-btn {
    background: linear-gradient(135deg, #512DA8 0%, #311B92 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(81, 45, 168, 0.25) !important;
}

.driver-popover-btn:hover {
    transform: translateY(-2px) !important;
}

.driver-popover-next-btn:hover {
    box-shadow: 0 6px 16px rgba(81, 45, 168, 0.35) !important;
    opacity: 0.9 !important;
}

.driver-popover-progress-text {
    color: #9ca3af !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.driver-popover-close-btn {
    color: #6b7280 !important;
    transition: color 0.15s !important;
}

.driver-popover-close-btn:hover {
    color: #ef4444 !important;
}

/* Glassmorphism opcional para el overlay si deseas */
.driver-overlay {
    background-color: rgba(30, 20, 60, 0.75) !important;
}