/* ==========================================
   INTERFAZ APP: OCULTAR ELEMENTOS DEL TEMA NATIVO
   ========================================== */
body.chili-wizard-immersive-mode header,
body.chili-wizard-immersive-mode .site-header,
body.chili-wizard-immersive-mode #header,
body.chili-wizard-immersive-mode footer,
body.chili-wizard-immersive-mode .site-footer,
body.chili-wizard-immersive-mode #footer {
    display: none !important;
}

/* ==========================================
   BARRA SUPERIOR GLOBAL APP (TOPBAR)
   ========================================== */
#chili-store-wizard-topbar { 
    position: fixed; top: 0; left: 0; width: 100%; background: #000; 
    z-index: 999999; padding: 15px 15px; border-bottom: 2px solid #e8363c; box-sizing: border-box;
}
.chili-store-topbar-inner { 
    max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.chili-topbar-main-row { 
    display: flex; justify-content: center; align-items: center; width: 100%; position: relative;
}
.chili-topbar-text { 
    color: #fff; font-size: 16px; font-weight: 600; text-align: center; letter-spacing: 0.5px;
}
.chili-topbar-exit { 
    position: absolute; right: 0; background: transparent; color: #fff; 
    border: none; padding: 0; cursor: pointer; font-size: 14px; font-weight: 400; transition: all 0.2s ease;
}
.chili-topbar-exit:hover { 
    font-size: 15.5px; font-weight: 800; color: #fff; transform: scale(1.05);
}

/* Círculos de progreso en la Topbar */
.chili-wizard-progress { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 350px; }
.step-circle { width: 22px; height: 22px; border-radius: 50%; background: #333; color: #fff; font-size: 11px; font-weight: bold; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.step-circle.active { background: #e8363c; transform: scale(1.1); box-shadow: 0 0 10px rgba(232,54,60,0.5); }
.step-line { flex-grow: 1; height: 2px; background: #333; margin: 0 4px; }

/* Ocultar progreso en Paso 1 */
#chili-store-wizard-topbar.no-progress .chili-wizard-progress { display: none !important; }

/* ==========================================
   PIE DE PÁGINA GLOBAL APP (FOOTER NAVEGACIÓN)
   ========================================== */
#chili-wizard-footer {
    position: fixed; bottom: 0; left: 0; width: 100%; background: #000;
    z-index: 999999; padding: 15px; border-top: 2px solid #e8363c; box-sizing: border-box;
}
.chili-wizard-footer-inner {
    max-width: 800px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 15px;
}
.chili-footer-btn-back, .chili-footer-btn-next, .chili-footer-btn-finish {
    border: none; padding: 14px 20px; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.2s; min-height: 48px; display: flex; align-items: center; justify-content: center;
}
.chili-footer-btn-back { background: #333; color: #fff; flex: 1; }
.chili-footer-btn-back:hover { background: #555; }
.chili-footer-btn-next { background: #e8363c; color: #fff; flex: 1; }
.chili-footer-btn-next:disabled { background: #555; color: #888; cursor: not-allowed; }
.chili-footer-btn-finish { background: #16a34a; color: #fff; flex: 1; box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4); }
.chili-footer-btn-finish:hover { background: #15803d; }

/* ==========================================
   ESTILOS GENERALES DEL ASISTENTE
   ========================================== */
.chili-wizard-wrapper {
    width: 100%; max-width: 750px; margin: 40px auto; padding: 0 15px;
    font-family: var(--theme-font-family), system-ui, sans-serif; box-sizing: border-box;
}
.chili-wizard-card {
    background: #ffffff; border-radius: 14px; padding: 35px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.06); border: 1px solid #f0f0f0; box-sizing: border-box;
}

.chili-wizard-step-content { display: none; text-align: center; }
.chili-wizard-step-content.active { display: block; }
.chili-wizard-step-content h2 { font-size: 26px; color: #111111; margin-bottom: 8px; font-weight: 700; }
.chili-wizard-step-content p { font-size: 15px; color: #666666; margin-bottom: 30px; }

/* BOTONES INTERNOS */
.chili-actions-vertical { display: flex; flex-direction: column; gap: 14px; max-width: 380px; margin: 0 auto 20px; }
.chili-btn-main { background: #111111; color: #ffffff; border: none; padding: 16px 24px; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.chili-btn-main:hover { background: #e8363c; }
.chili-btn-alt { background: #ffffff; color: #111111; border: 2px solid #111111; padding: 15px 24px; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.chili-btn-alt:hover { background: #fafafa; border-color: #e8363c; color: #e8363c; }

/* TARJETAS ESTAMPADOS (Paso 3) */
.chili-print-configuration-card { background: #fdfdfd; border: 1px solid #e2e8f0; border-radius: 10px; padding: 25px; margin-bottom: 20px; text-align: left; position: relative; }
.chili-card-remove-btn { position: absolute; top: 15px; right: 15px; background: none; border: none; color: #94a3b8; font-size: 18px; cursor: pointer; }
.chili-card-remove-btn:hover { color: #ef4444; }
.chili-print-card-title { font-size: 16px; font-weight: 700; color: #1e293b; margin-bottom: 15px; border-bottom: 1px dashed #cbd5e1; padding-bottom: 5px; }
.chili-grid-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.chili-input-field-group label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 5px; }
.chili-input-field-group select, .chili-input-field-group input { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; background-color: #fff; font-size: 14px; box-sizing: border-box; }
.chili-print-comentario { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; background-color: #fff; font-size: 14px; font-family: inherit; resize: vertical; min-height: 60px; box-sizing: border-box; }
.chili-btn-add-extra { width: 100%; border: 2px dashed #cbd5e1; background: #f8fafc; color: #475569; padding: 14px; border-radius: 8px; cursor: pointer; font-weight: 600; margin-bottom: 15px; }
.chili-btn-add-extra:hover { background: #f1f5f9; border-color: #94a3b8; }
.chili-print-card-pricing-feedback { font-size: 13px; font-weight: 600; text-align: right; margin-top: 10px; }

/* SUBIDA DE ARCHIVOS (Paso 4) */
.chili-upload-wrapper { border: 2px dashed #cbd5e1; border-radius: 10px; padding: 30px 20px; background: #f8fafc; position: relative; margin-bottom: 20px; }
.chili-upload-dropzone { position: relative; cursor: pointer; }
.chili-upload-dropzone input[type="file"] { position: absolute; width: 100%; height: 100%; top:0; left:0; opacity: 0; cursor: pointer; }
.chili-upload-text strong { display: block; font-size: 15px; color: #334155; margin-bottom: 5px; }
.chili-upload-text span { font-size: 12px; color: #64748b; }
#chili-file-list-preview { text-align: left; margin-top: 15px; font-size: 13px; color: #334155; }
.chili-file-item { background: #e2e8f0; padding: 5px 10px; border-radius: 4px; display: inline-block; margin: 3px; }

/* DESGLOSE FACTURA (Paso 5) */
.chili-final-invoice-card { text-align: left; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 25px; margin-bottom: 25px; }
.chili-invoice-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed #e2e8f0; font-size: 14px; gap: 10px; }
.chili-invoice-row span { min-width: 0; flex: 1; }
.chili-invoice-row span:last-child { flex: 0 0 auto; text-align: right; }
.chili-invoice-row.invoice-total { font-weight: bold; border-top: 2px solid #111111; border-bottom: none; padding-top: 20px; margin-top: 10px; align-items: center; }

/* MODAL / POPUPS GLOBALES */
#chili-success-wizard-overlay, .aviso-propio-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.85); z-index: 99999999; display: flex; justify-content: center; align-items: center; }
.chili-success-wizard-modal, .aviso-propio-caja { background: #ffffff; padding: 40px 30px; border-radius: 12px; width: 90%; max-width: 440px; text-align: center; box-shadow: 0 20px 45px rgba(0,0,0,0.3); }
.chili-success-checkmark { font-size: 45px; color: #16a34a; margin-bottom: 12px; line-height: 1; }

/* ==========================================
   RESPONSIVE MÓVIL
   ========================================== */
@media (max-width: 768px) {
    .chili-wizard-wrapper { margin: 20px auto !important; padding: 0 15px !important; }
    .chili-wizard-card { border-radius: 12px !important; padding: 25px 15px 35px 15px !important; }
    .chili-grid-form { grid-template-columns: 1fr; }
    .chili-topbar-text { font-size: 14px; }
    .chili-wizard-footer-inner { gap: 8px; }
    .chili-footer-btn-back, .chili-footer-btn-next, .chili-footer-btn-finish { font-size: 13px; padding: 12px 5px; }
}