﻿/* ======================================================
   Popup Global SoloSeg
   Archivo exclusivo para modales del sistema
   ====================================================== */


/* Oculta completamente el modal cuando no estÃ¡ activo */
.ss-hidden {
  display: none !important; /* Fuerza ocultar incluso si otro CSS interfiere */
}


/* Contenedor principal que cubre toda la pantalla */
.ss-modal {
  position: fixed;          /* Fijo sobre toda la ventana */
  inset: 0;                 /* Top, right, bottom, left = 0 */
  z-index: 9999;            /* Siempre sobre el resto del sistema */
}


/* Fondo oscuro con leve transparencia y blur */
.ss-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 37, 57, 0.22); /* Oscuro suave, no negro puro */
  backdrop-filter: blur(3px);         /* Desenfoque del fondo */
}


/* Panel central del popup */
.ss-modal__panel {
  position: relative;                   /* Base para elementos internos */
  margin: 6vh auto 0;                  /* Centrado horizontal, bajado desde arriba */
  width: min(640px, calc(100% - 32px));
    max-width: 95vw; /* MÃ¡s ancho */
  background: #4d658c;                  /* Fondo oscuro azulado */
  color: #e5e7eb;                       /* Texto claro */
  border-radius: 14px;                  /* Bordes suaves */
  border: 1px solid rgba(255,255,255,.08); /* Borde sutil */
  box-shadow: 0 20px 40px rgba(0,0,0,.6);  /* Sombra profunda */
  overflow: hidden;                     /* Evita desbordes */
  transform: translateY(-6px);          /* PosiciÃ³n inicial animaciÃ³n */
  opacity: 0;                           /* Invisible al inicio */
  animation: ssModalIn .18s ease-out forwards;
}


/* Cabecera del popup (icono + tí­tulos) */
.ss-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,.04);    /* DiferenciaciÃ³n suave */
  border-bottom: 1px solid rgba(255,255,255,.08);
}


/* Icono del popup */
.ss-modal__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(56,189,248,.15);     /* Azul tenue */
  color: #38bdf8;                       /* Azul principal */
  font-weight: 700;
}


/* Contenedor de textos del header */
.ss-modal__headings {
  flex: 1;
  min-width: 0;
}


/* TÃ­tulo principal */
.ss-modal__title {
  font-size: 16px;
  font-weight: 700;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* SubtÃ­tulo */
.ss-modal__subtitle {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}


/* Mensaje principal del popup */
.ss-modal__message {
  padding: 14px 16px;
  font-size: 18px;
  line-height: 1.4;
}

/* TamaÃ±o aumentado para el detalle de anotaciÃ³n (Hoja de Vida) */
.ss-modal__message .hv-detalle-msg {
  background: #ffffff;  /* fondo claro */
  color: #0f172a;       /* texto oscuro */
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: inherit;   /* deja el tamaÃ±o al usuario (hereda del contenedor) */
  line-height: 1.6;
}

.hv-detalle-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.hv-detalle-label {
  color: #475569;       /* tÃ­tulo atenuado */
  font-weight: 600;
}

.hv-detalle-valor {
  color: #0f172a;       /* dato mÃ¡s oscuro */
  font-weight: 600;
}

.hv-detalle-label-row {
  color: #475569;
  font-weight: 700;
}

.hv-detalle-texto {
  color: #0f172a;
  font-weight: 600;
  white-space: pre-wrap;
}


/* Detalles tÃ©cnicos o mensajes secundarios */
.ss-modal__details {
  margin: 0 16px 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,.05);
  border-radius: 8px;
  font-size: 12px;
  color: #cbd5f5;
}


/* Footer del popup */
.ss-modal__footer {
  padding: 12px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(255,255,255,.03);
  border-top: 1px solid rgba(255,255,255,.08);
}


/* BotÃ³n principal (Aceptar / Cerrar) */
#ss-modal-ok {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  background: #2563eb;   /* Azul SoloSeg */
  color: white;
  font-weight: 600;
  cursor: pointer;
}

#ss-modal-ok:hover {
  background: #1d4ed8;   /* Azul mÃ¡s oscuro al hover */
}


/* AnimaciÃ³n de entrada */
@keyframes ssModalIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ======================================================
   Compatibilidad con modales legacy (.modal / .modal-contenido)
   Se estilizan usando el mismo look del popup global
   ====================================================== */

/* Overlay heredado (usar display:flex desde JS) */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  justify-content: center;
  align-items: center;
  background: rgba(20, 25, 30, 0.55);
  backdrop-filter: blur(3px);
}

/* Panel heredado */
.modal-contenido {
  background: #4d658c;
  color: #e5e7eb;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 20px 18px;
  width: min(520px, calc(100% - 32px));
  box-shadow: 0 24px 50px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Inputs y selects dentro del modal legacy */
.modal-contenido input,
.modal-contenido select {
  margin-bottom: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(18,27,43,.85);
  color: #e7eaf1;
  font-size: 15px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
}

/* Botonera heredada */
.modal-botones {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.modal-botones button {
  padding: 11px 18px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,255,255,.08);
  color: #e5e7eb;
  min-width: 110px;
}

.modal-botones button[type="submit"] {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37,99,235,.35);
}

.modal-botones button[type="button"] {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 8px 20px rgba(239,68,68,.3);
}

/* Botones consistentes (OK y Cancelar) */
#ss-modal-ok,
#ss-modal-cancel {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  min-width: 110px;
  transition: transform 0.08s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

#ss-modal-ok {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}
#ss-modal-ok:hover { filter: brightness(1.05); }
#ss-modal-ok:active { transform: translateY(1px); box-shadow: 0 3px 12px rgba(37, 99, 235, 0.35); }

#ss-modal-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
#ss-modal-cancel:hover { filter: brightness(0.98); }
#ss-modal-cancel:active { transform: translateY(1px); }





/* ======================================================
   Variacionn: modal de formularios (Usuarios)
   Evita que se “estire” y controla overflow interno
   ====================================================== */
.ss-form-modal{
  max-height: calc(100vh - 120px);
  overflow: auto;
}
.ss-form-modal form{
  display: flex;
  flex-direction: column;
  gap: 12px;
}


