/* ============================================
   WINJET LITE - CSS COMPLETO
   Archivo: assets/css/style.css
   
   Estilos para todo el plugin
   ============================================ */

/* ============================================
   VARIABLES Y CONFIGURACIÓN BASE
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Spline+Sans:wght@400;600&family=Roboto+Slab:wght@400&family=Roboto:wght@500&display=swap');

:root {
    --winjet-primary: #F57D20;
    --winjet-primary-dark: #d96a10;
    --winjet-secondary: #161921;
    --winjet-success: #10b981;
    --winjet-error: #ef4444;
    --winjet-warning: #f59e0b;
    --winjet-border: #F0F3F7;
    --winjet-bg: #F7F9FB;
    --winjet-text: #313041;
    --winjet-text-light: #6b7280;
    --winjet-font-primary: 'Spline Sans', sans-serif;
    --winjet-font-secondary: 'Roboto Slab', serif;
    --winjet-font-accent: 'Roboto', sans-serif;
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */
.winjet-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ============================================
   HEADER
   ============================================ */
.winjet-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--winjet-border);
}

.winjet-header h2 {
    font-size: 28px;
    color: var(--winjet-text);
    margin: 0 0 10px 0;
}

.winjet-header p {
    color: var(--winjet-text-light);
    margin: 0;
}

/* ============================================
   SECCIONES DEL FORMULARIO
   ============================================ */
.winjet-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--winjet-bg);
    border-radius: 8px;
}

.winjet-section h3 {
    font-size: 18px;
    color: var(--winjet-text);
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--winjet-border);
}

/* ============================================
   FILAS Y COLUMNAS
   ============================================ */
.winjet-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.winjet-col {
    display: flex;
    flex-direction: column;
}

/* Responsive */
@media (max-width: 640px) {
    .winjet-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   INPUTS Y SELECT
   ============================================ */
.winjet-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--winjet-text);
}

.winjet-form label small {
    color: var(--winjet-text-light);
    font-weight: normal;
    font-size: 13px;
}

.winjet-form input[type="text"],
.winjet-form input[type="email"],
.winjet-form input[type="tel"],
.winjet-form input[type="date"],
.winjet-form input[type="number"],
.winjet-form select,
.winjet-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--winjet-border);
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
}

.winjet-form input:focus,
.winjet-form select:focus,
.winjet-form textarea:focus {
    outline: none;
    border-color: var(--winjet-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   RADIO BUTTONS (Métodos de Pago)
   ============================================ */
.winjet-payment-methods {
    display: grid;
    gap: 15px;
}

.winjet-payment-option {
    position: relative;
}

.winjet-payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.winjet-payment-option label {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--winjet-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.winjet-payment-option input[type="radio"]:checked + label {
    border-color: var(--winjet-primary);
    background: rgba(37, 99, 235, 0.05);
}

.winjet-payment-option label:hover {
    border-color: var(--winjet-primary);
}

.winjet-payment-option .payment-icon {
    font-size: 24px;
    margin-right: 12px;
}

.winjet-payment-option .payment-name {
    font-weight: 500;
    color: var(--winjet-text);
}

/* ============================================
   RESUMEN Y TOTAL
   ============================================ */
.winjet-summary {
    background: var(--winjet-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.winjet-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--winjet-border);
}

.winjet-summary-row:last-child {
    border-bottom: none;
}

.winjet-summary-label {
    color: var(--winjet-text-light);
}

.winjet-summary-value {
    font-weight: 500;
    color: var(--winjet-text);
}

.winjet-total-section {
    background: linear-gradient(135deg, var(--winjet-primary), var(--winjet-primary-dark));
    color: white;
}

.winjet-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
}

.winjet-total strong {
    font-size: 28px;
}

/* ============================================
   BOTONES
   ============================================ */
.winjet-btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.winjet-btn-primary {
    background: var(--winjet-primary);
    color: white;
}

.winjet-btn-primary:hover {
    background: var(--winjet-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.winjet-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.winjet-btn-secondary {
    background: white;
    color: var(--winjet-primary);
    border: 2px solid var(--winjet-primary);
}

.winjet-btn-secondary:hover {
    background: var(--winjet-primary);
    color: white;
}

.winjet-actions {
    text-align: center;
    margin-top: 30px;
}

.winjet-actions .winjet-btn {
    min-width: 200px;
}

/* ============================================
   MENSAJES
   ============================================ */
.winjet-mensaje {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 15px;
}

.winjet-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.winjet-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.winjet-info {
    background: #dbeafe;
    color: #1e40af;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
}

.winjet-aviso {
    text-align: center;
    padding: 40px;
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
}

.winjet-aviso h3 {
    color: #92400e;
    margin: 0 0 10px 0;
}

.winjet-aviso p {
    color: #92400e;
    margin: 0;
}

/* ============================================
   CONFIRMACIÓN
   ============================================ */
.winjet-confirmacion {
    text-align: center;
}

.winjet-confirmacion-icon {
    font-size: 72px;
    margin-bottom: 20px;
}

.winjet-confirmacion h2 {
    color: var(--winjet-success);
    margin-bottom: 10px;
}

.winjet-confirmacion-orden {
    background: var(--winjet-bg);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 18px;
    font-weight: 500;
}

.winjet-confirmacion-detalle {
    text-align: left;
    background: white;
    border: 2px solid var(--winjet-border);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.winjet-confirmacion-detalle-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--winjet-border);
}

.winjet-confirmacion-detalle-row:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 18px;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.winjet-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .winjet-container {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .winjet-header h2 {
        font-size: 24px;
    }
    
    .winjet-total {
        font-size: 18px;
    }
    
    .winjet-total strong {
        font-size: 24px;
    }
}

/* ============================================
   UTILIDADES
   ============================================ */
.winjet-text-center {
    text-align: center;
}

.winjet-text-right {
    text-align: right;
}

.winjet-mt-20 {
    margin-top: 20px;
}

.winjet-mb-20 {
    margin-bottom: 20px;
}



/* --- ESTILOS DE CONFIRMACIÓN PREMIUM --- */

.wj-success-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    padding: 20px;
    font-family: "Spline Sans", sans-serif;
    position: relative;
    z-index: 10;
}

#confetti-canvas {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* TARJETA TIPO TICKET */
.wj-ticket-card {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
    z-index: 20;
    transform: translateY(20px);
    opacity: 0;
}

/* Header Naranja */
.wj-ticket-header {
    background: linear-gradient(135deg, #f57d20 0%, #ff9f43 100%);
    color: white;
    text-align: center;
    padding: 40px 20px 30px;
    position: relative;
}

.wj-icon-circle {
    background: white;
    color: #f57d20;
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    margin: 0 auto 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.wj-ticket-header h2 { margin: 0; font-size: 24px; font-weight: 700; }
.wj-ticket-header p { margin: 5px 0 0; opacity: 0.9; font-size: 14px; }

/* Cuerpo */
.wj-ticket-body { padding: 30px; }

/* Ruta Visual */
.wj-route-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.wj-point { text-align: center; flex: 1; }
.wj-city { display: block; font-weight: 800; font-size: 18px; color: #2d3436; text-transform: uppercase; }
.wj-label { font-size: 12px; color: #b2bec3; text-transform: uppercase; letter-spacing: 1px; }

.wj-connector { flex: 2; text-align: center; position: relative; height: 20px; }
.wj-line {
    position: absolute; top: 50%; left: 10%; right: 10%;
    border-top: 2px dashed #dfe6e9;
    z-index: 1;
}
.wj-ship-icon {
    position: relative; z-index: 2;
    background: white; padding: 0 10px;
    color: #f57d20; font-size: 14px;
    animation: floatShip 3s ease-in-out infinite;
}

/* Grid de Info */
.wj-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}
.wj-info-item { display: flex; flex-direction: column; }
.wj-value { font-weight: 600; color: #2d3436; font-size: 15px; margin-top: 5px; }
.wj-value i { color: #f57d20; margin-right: 5px; }
.highlight { color: #2563eb; background: #eff6ff; padding: 2px 8px; border-radius: 4px; display: inline-block; }

/* Divisor con muescas (Efecto Ticket) */
.wj-divider {
    position: relative;
    height: 1px;
    background: #dfe6e9; /* dashed line created by border normally, here solid for simplicity */
    border-top: 2px dashed #dfe6e9;
    margin: 0 -30px 25px;
}
.wj-notch-l, .wj-notch-r {
    position: absolute; top: -10px;
    width: 20px; height: 20px;
    background: #fdfbfb; /* Debe coincidir con el fondo de la página */
    border-radius: 50%;
}
.wj-notch-l { left: -10px; }
.wj-notch-r { right: -10px; }

/* Total */
.wj-total-section {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 5px;
}
.wj-amount { font-size: 28px; font-weight: 800; color: #2d3436; }
.wj-amount small { font-size: 14px; color: #636e72; font-weight: normal; }

/* Footer */
.wj-ticket-footer {
    background: #f8f9fa;
    padding: 25px;
    text-align: center;
    border-top: 1px solid #eee;
}

.wj-btn-download {
    display: inline-block;
    background: #2d3436;
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(45, 52, 54, 0.3);
    transition: all 0.3s ease;
}
.wj-btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(45, 52, 54, 0.4);
    background: #000;
}

.wj-link-home { display: block; margin-top: 20px; color: #b2bec3; text-decoration: none; font-size: 14px; }
.wj-link-home:hover { color: #f57d20; }

/* ANIMACIONES */
.animate-pop-in { animation: popIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards; }

@keyframes popIn {
    0% { transform: translateY(50px) scale(0.9); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes floatShip {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.pulse-animation { animation: pulse 2s infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(45, 52, 54, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(45, 52, 54, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 52, 54, 0); }
}