/* =========================================================
   Apprise — Popup Modal Moderno SGFENS v2
   Rediseñado para usar design tokens de screen.css
   ========================================================= */

/* ---- Overlay ---- */
.appriseOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    z-index: 99999998;
}

/* ---- Contenedor principal ---- */
.appriseOuter {
    position: fixed;
    z-index: 99999999;
    min-width: 320px;
    max-width: 420px;
    width: 90%;
    display: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18),
                0 8px 20px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    font-family: 'Inter', system-ui, Arial, sans-serif;
    animation: appriseSlideIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes appriseSlideIn {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(-12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ---- Ícono superior (question / info / warning) ---- */
.appriseOuter > div[align="center"] {
    padding: 24px 20px 0 20px;
    text-align: center;
}

.appriseOuter > div[align="center"] img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(59,130,246,0.25));
}

/* ---- Contenido interior ---- */
.appriseInner {
    padding: 20px 28px 8px 28px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
    text-shadow: none;
}

/* ---- Área de botones ---- */
.aButtons {
    margin: 16px 20px 20px 20px;
    text-align: center;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.aInput {
    margin: 12px 20px 0 20px;
    text-align: center;
}

/* ---- Botones ---- */
.appriseInner button,
.aButtons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 9px 20px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', system-ui, Arial, sans-serif;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.10);
    text-shadow: none;
    letter-spacing: 0.01em;
}

/* Botón OK / Sí (primer botón = acción principal) */
.aButtons button[value="ok"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border: 1px solid #1d4ed8;
}

.aButtons button[value="ok"]:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.40);
    transform: translateY(-1px);
    color: #ffffff;
}

.aButtons button[value="ok"]:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.30);
}

/* Botón Cancelar / No (segundo botón = acción secundaria) */
.aButtons button[value="cancel"] {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.aButtons button[value="cancel"]:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.aButtons button[value="cancel"]:active {
    transform: translateY(0);
}

/* ---- Input de texto ---- */
.aTextbox {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 260px;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    font-family: 'Inter', system-ui, Arial, sans-serif;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box;
}

.aTextbox:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* =========================================================
   DARK MODE
   ========================================================= */

html.dark-theme .appriseOverlay {
    background: rgba(2, 6, 23, 0.70);
}

html.dark-theme .appriseOuter {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45),
                0 8px 20px rgba(0, 0, 0, 0.30);
}

html.dark-theme .appriseInner {
    color: #e2e8f0;
}

html.dark-theme .aButtons button[value="cancel"] {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

html.dark-theme .aButtons button[value="cancel"]:hover {
    background: #475569;
    color: #f1f5f9;
    border-color: #64748b;
}

html.dark-theme .aTextbox {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #475569;
}

html.dark-theme .aTextbox:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.20);
}