/* ============================================================================
   T-017 — Recordatorio "configura tu escuela"
   Banner del shell + gate en Grupos + drawer "Registra tu escuela".
   Tokens de SISTEMA-DISENO.md (viven en tokens.css). Clases namespaced esc-*.

   AA (spec §Contraste): el CTA primario con texto blanco usa --brand-teal-deep
   (3.81:1), NO el <Button> de la casa (--brand-teal-primary 2.0:1, deuda LEC-G007
   que arregla T-016). base y :hover comparten fondo teal-deep: el hover no puede
   degradarse por construccion; la afordancia la cargan translateY + sombra
   (patron aprobado en T-012). El ambar del banner usa #8A5510 sobre su tinte
   (--warning pleno no pasa AA a 12.5px).
   ============================================================================ */

/* ---- Botones esc-* (AA-safe, espejo del mockup, no dependen del <Button> roto) ---- */
.esc-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-sans); font-size: 13px; font-weight: 600;
    border-radius: var(--radius-md); padding: 9px 15px;
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
    transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}
.esc-btn .msr { font-size: 16px; }
.esc-btn:disabled { opacity: .5; cursor: not-allowed; }
.esc-btn:not(:disabled):active { transform: translateY(0); }

.esc-btn-primary { background: var(--brand-teal-primary); color: var(--text-primary); font-weight: 700; box-shadow: 0 2px 6px rgba(58,143,145,.3); }
/* hover baja a teal-dark (carbon #1A1C1F encima = 6.08:1, sigue AA); NO teal-deep (carbon = 4.49 < AA, T-083) */
.esc-btn-primary:hover:not(:disabled) { background: var(--brand-teal-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(58,143,145,.34); }

.esc-btn-secondary { background: #fff; border-color: var(--border-soft); color: var(--text-secondary); }
.esc-btn-secondary:hover:not(:disabled) { border-color: var(--brand-teal); color: var(--brand-teal-deep); background: var(--bg-light-teal); }

.esc-btn-ghost { background: transparent; color: var(--text-secondary); }
.esc-btn-ghost:hover:not(:disabled) { background: var(--bg-light-teal); color: var(--brand-teal-deep); }

.esc-btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; background: #fff; border-color: var(--border-soft); color: var(--text-secondary); }
.esc-btn-icon .msr { font-size: 18px; }

/* ---- Slot del banner: primer hijo del contenido, empuja la pagina, jamas fixed ---- */
.esc-recordatorio-slot { padding: 20px 24px 0; }

/* ---- Banner (esc-banner) ---- */
.esc-banner {
    display: flex; align-items: flex-start; gap: 12px; margin: 0;
    padding: 14px 16px; background: rgba(186,117,23,.10);
    border: 1px solid rgba(186,117,23,.28); border-left: 3px solid var(--warning);
    border-radius: var(--radius-lg);
}
.esc-banner-icon {
    width: 36px; height: 36px; border-radius: 10px; background: rgba(186,117,23,.16);
    color: #8A5510; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.esc-banner-icon .msr { font-size: 20px; }
.esc-banner-body { flex: 1; min-width: 0; }
.esc-banner-title { font-family: var(--font-serif); font-size: 17px; font-weight: 600; margin: 0 0 3px; letter-spacing: -.2px; color: var(--text-primary); }
.esc-banner-text { font-size: 13px; color: var(--text-secondary); margin: 0; }
.esc-banner-text b { color: var(--text-primary); font-weight: 600; }
.esc-banner-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; padding-top: 2px; }

/* ---- Pastilla compacta (tras "Ahora no") ---- */
.esc-pill {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 99px;
    background: rgba(186,117,23,.12); border: 1px solid rgba(186,117,23,.3); color: #8A5510;
    font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: var(--font-sans);
}
.esc-pill .msr { font-size: 15px; }
.esc-pill:hover { background: rgba(186,117,23,.18); }

/* ---- Skeleton (misma silueta del banner) ---- */
.esc-skeleton {
    background: linear-gradient(90deg, #EDE9E0 25%, #F6F3EC 37%, #EDE9E0 63%);
    background-size: 400% 100%; animation: esc-sh 1.4s ease-in-out infinite; border-radius: 6px;
}
@keyframes esc-sh { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.esc-banner-skeleton { background: var(--bg-cream); border-color: var(--border-soft); border-left-color: var(--border-med); }

/* ---- Gate en Grupos (esc-gate) ---- */
.esc-gate { text-align: center; padding: 46px 24px; max-width: 520px; margin: 0 auto; }
.esc-gate-ic {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px;
    background: rgba(186,117,23,.13); color: #8A5510; display: flex; align-items: center; justify-content: center;
}
.esc-gate-ic .msr { font-size: 32px; }
.esc-gate h3 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin: 0 0 8px; color: var(--text-primary); }
.esc-gate p { font-size: 13.5px; color: var(--text-secondary); margin: 0 0 18px; line-height: 1.6; }
.esc-gate .esc-gate-foot { font-size: 12px; color: var(--text-muted); margin: 14px 0 0; }

/* ---- Callouts (info / danger) ---- */
.esc-callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); font-size: 13px; line-height: 1.5; margin-bottom: 16px; }
.esc-callout .msr { font-size: 18px; flex-shrink: 0; }
.esc-callout-danger { background: rgba(163,45,45,.09); border: 1px solid rgba(163,45,45,.25); color: #7C2222; }
.esc-callout-danger b { color: #5F1A1A; }
.esc-callout-info { background: rgba(45,110,163,.09); border: 1px solid rgba(45,110,163,.24); color: #245C89; }

/* ---- Drawer "Registra tu escuela" (§6.10) ---- */
.esc-drawer-overlay { position: fixed; inset: 0; background: rgba(20,22,25,.45); z-index: 1200; display: flex; justify-content: flex-end; }
.esc-drawer {
    width: 452px; max-width: 100%; background: #fff; box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column; height: 100%;
    animation: esc-drawer-in .24s var(--ease);
}
@keyframes esc-drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.esc-drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border-soft); }
.esc-drawer-head-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--bg-light-teal); color: var(--brand-teal-deep); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.esc-drawer-head-ic .msr { font-size: 22px; }
.esc-drawer-head h2 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin: 0 0 2px; color: var(--text-primary); }
.esc-drawer-head .esc-sub { font-size: 12.5px; color: var(--text-secondary); }
.esc-drawer-body { flex: 1; overflow: auto; padding: 20px; }
.esc-drawer-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border-soft); background: var(--bg-cream); }

/* ---- Campos del drawer ---- */
.esc-field { margin-bottom: 18px; }
.esc-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.esc-field label .esc-opt { font-weight: 400; color: var(--text-muted); }
.esc-field .esc-count { float: right; font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.esc-field input {
    width: 100%; font-family: var(--font-sans); font-size: 14px; padding: 10px 12px;
    border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: #fff; color: var(--text-primary);
}
.esc-field input:focus { outline: none; border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(109,199,208,.25); }
.esc-field input.esc-err { border-color: var(--danger); }
.esc-field input.esc-mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: .5px; }
.esc-field .esc-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.esc-field .esc-err-msg { font-size: 12px; color: var(--danger); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.esc-field .esc-err-msg .msr { font-size: 14px; }

/* ---- Toast de exito (§6.9) ---- */
.esc-toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 1300; display: flex; flex-direction: column; gap: 10px; }
.esc-toast {
    max-width: 380px; background: #fff; border: 1px solid var(--border-soft);
    border-left: 3px solid var(--brand-teal); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 12px 14px; animation: esc-drawer-in .2s var(--ease);
}
.esc-toast-t { font-size: 13.5px; font-weight: 700; margin-bottom: 2px; color: var(--text-primary); }
.esc-toast-x { font-size: 12.5px; color: var(--text-secondary); }

/* ---- Movil <=640px: banner apila, acciones a lo ancho 44px; drawer full-width ---- */
@media (max-width: 640px) {
    .esc-recordatorio-slot { padding: 16px 16px 0; }
    .esc-banner { flex-wrap: wrap; }
    .esc-banner-actions { width: 100%; padding-top: 4px; }
    .esc-banner-actions .esc-btn { flex: 1; justify-content: center; min-height: 44px; }
    .esc-drawer { width: 100%; }
    .esc-drawer-foot .esc-btn { flex: 1; justify-content: center; min-height: 44px; }
}
