/* ==========================================================================
   Allaria — hoja de estilos de las páginas de confirmación de operaciones.
   Tokens tomados del sitio allaria.com.ar. Todas las clases van prefijadas
   con `al-` para no colisionar con marcado heredado.
   ========================================================================== */

/* --- Tipografía ---------------------------------------------------------- */
/* Plus Jakarta Sans es variable: un archivo por subset cubre 200..800. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
                 U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                 U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens -------------------------------------------------------------- */
:root {
  --al-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --al-bg: #f8fafc;
  --al-surface: #fefefe;
  --al-border: #e2e7ec;
  --al-border-soft: rgba(205, 215, 225, 0.804);

  --al-navy: #003366;
  --al-text: #3f4f69;
  --al-text-strong: #2d384b;
  --al-muted: #8690a1;
  --al-accent: #2b58a1;
  --al-accent-dark: #244a88;
  --al-gold: #8b734b;

  --al-danger: #b3261e;
  --al-danger-bg: #fdf3f2;
  --al-danger-border: #f0c9c6;

  --al-footer-bg: #0e263f;
  --al-footer-text: #cdd7e1;

  --al-radius: 8px;
  --al-nav-h: 64px;
  --al-container: 1100px;
}

/* --- Reset mínimo -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--al-bg);
  color: var(--al-text);
  font-family: var(--al-font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; }

a { color: var(--al-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Barra superior ------------------------------------------------------ */
.al-nav {
  height: var(--al-nav-h);
  display: flex;
  align-items: center;
  background: var(--al-surface);
  border-bottom: 1px solid var(--al-border-soft);
}

.al-nav__inner {
  width: 100%;
  max-width: var(--al-container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.al-nav__logo { display: inline-flex; align-items: center; }
.al-nav__logo:hover { text-decoration: none; }
.al-nav__logo img { height: 32px; width: auto; display: block; }

/* --- Estructura de página ------------------------------------------------ */
.al-main {
  flex: 1 0 auto;          /* empuja el footer al fondo en páginas cortas */
  padding: 56px 0 72px;
}

.al-container {
  max-width: var(--al-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Contenedor angosto para formularios y mensajes de estado. */
.al-container--narrow { max-width: 760px; }

/* --- Cabecera de contenido ----------------------------------------------- */
.al-eyebrow {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--al-muted);
}
.al-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--al-gold);
  flex: none;
}

.al-title {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--al-navy);
}

.al-lead {
  margin: 0 0 32px;
  font-size: 18px;
  color: var(--al-text);
}

.al-section-title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 600;
  color: var(--al-navy);
}

/* --- Card ---------------------------------------------------------------- */
.al-card {
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius);
  padding: 32px;
}

.al-card + .al-card { margin-top: 24px; }

/* --- Bloque de estado (éxito / error / info) ----------------------------- */
.al-status { text-align: center; padding: 16px 0; }

.al-status__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 88, 161, 0.08);
  color: var(--al-accent);
}
.al-status__icon svg { width: 28px; height: 28px; display: block; }

.al-status--error .al-status__icon {
  background: var(--al-danger-bg);
  color: var(--al-danger);
}

.al-status--info .al-status__icon {
  background: rgba(139, 115, 75, 0.10);
  color: var(--al-gold);
}

.al-status__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--al-navy);
}
.al-status--error .al-status__title { color: var(--al-danger); }

.al-status__text { margin: 0; font-size: 16px; color: var(--al-text); }
.al-status__text + .al-status__text { margin-top: 8px; }

/* --- Formularios --------------------------------------------------------- */
.al-field { margin-bottom: 20px; }

.al-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--al-text-strong);
}

.al-input,
.al-select,
.al-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--al-text-strong);
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.al-input, .al-select { height: 46px; padding: 0 16px; }
.al-textarea { min-height: 120px; padding: 12px 16px; line-height: 1.5; resize: vertical; }

.al-input::placeholder, .al-textarea::placeholder { color: var(--al-muted); }

.al-input:focus,
.al-select:focus,
.al-textarea:focus {
  outline: none;
  border-color: var(--al-accent);
  box-shadow: 0 0 0 3px rgba(43, 88, 161, 0.12);
}

.al-input:disabled,
.al-select:disabled,
.al-textarea:disabled {
  background: #eef1f5;
  color: var(--al-muted);
  cursor: not-allowed;
}

/* Sólo lectura: se muestra como dato, no como campo editable. */
.al-input[readonly],
.al-textarea[readonly] {
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  color: var(--al-text);
}
.al-input[readonly]:focus { box-shadow: none; border-color: transparent; }

/* Estado de error: lo aplica assets/js/allaria.js. */
.al-input--error,
.al-textarea--error,
.al-select--error {
  border-color: var(--al-danger);
  background: var(--al-danger-bg);
}

.al-error-msg {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--al-danger);
}

.al-help { margin: 6px 0 0; font-size: 13px; color: var(--al-muted); }

/* Checkbox */
.al-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--al-text-strong);
  cursor: pointer;
}
.al-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--al-accent);
  cursor: pointer;
  margin: 0;
}

/* --- Botones ------------------------------------------------------------- */
.al-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--al-radius);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.al-btn:hover { text-decoration: none; }

.al-btn--primary { background: var(--al-accent); color: var(--al-surface); }
.al-btn--primary:hover { background: var(--al-accent-dark); }

.al-btn--ghost {
  background: transparent;
  color: var(--al-accent);
  border-color: var(--al-border);
}
.al-btn--ghost:hover { border-color: var(--al-accent); }

.al-btn:disabled { opacity: .55; cursor: not-allowed; }

.al-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.al-actions--center { justify-content: center; }

/* --- Tablas -------------------------------------------------------------- */
.al-table-wrap { overflow-x: auto; margin: 0 0 24px; }

.al-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.al-table th,
.al-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--al-border);
  vertical-align: middle;
}

.al-table thead th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--al-navy);
  background: #eef2f7;
  border-bottom: 1px solid var(--al-border);
  white-space: nowrap;
}

.al-table tbody tr:last-child td { border-bottom: none; }
.al-table .al-num { text-align: right; font-variant-numeric: tabular-nums; }
.al-table .al-input { height: 38px; font-size: 13px; }

/* --- Datos en dos columnas (resúmenes) ----------------------------------- */
.al-dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; }
.al-dl dt { font-size: 14px; color: var(--al-muted); }
.al-dl dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--al-text-strong); }

/* --- Video --------------------------------------------------------------- */
.al-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--al-radius);
  background: #000;
}
.al-video iframe,
.al-video object,
.al-video embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Footer -------------------------------------------------------------- */
.al-footer {
  flex: none;
  background: var(--al-footer-bg);
  color: var(--al-footer-text);
  padding: 56px 0 0;
  font-size: 14px;
}

.al-footer__inner {
  max-width: var(--al-container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
}

.al-footer__logo { height: 34px; width: auto; display: block; margin-bottom: 20px; }

.al-footer p { margin: 0 0 12px; line-height: 1.6; }

.al-footer__heading {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--al-surface);
}

.al-footer__links { margin: 0; padding: 0; list-style: none; }
.al-footer__links li { margin-bottom: 10px; }
.al-footer a { color: var(--al-footer-text); }
.al-footer a:hover { color: var(--al-surface); }

.al-footer__bottom {
  margin-top: 48px;
  border-top: 1px solid rgba(205, 215, 225, 0.16);
  padding: 20px 0;
  font-size: 13px;
  color: rgba(205, 215, 225, 0.72);
}
.al-footer__bottom .al-footer__inner { display: block; text-align: center; }

/* --- Responsive ---------------------------------------------------------- */
@media (min-width: 1200px) {
  .al-nav__inner,
  .al-container,
  .al-footer__inner { padding-left: 40px; padding-right: 40px; }
}

@media (max-width: 768px) {
  .al-main { padding: 36px 0 48px; }
  .al-title { font-size: 26px; }
  .al-lead { font-size: 16px; margin-bottom: 24px; }
  .al-card { padding: 24px 20px; }
  .al-footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .al-actions .al-btn { width: 100%; }
}

/* --- Accesibilidad ------------------------------------------------------- */
.al-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
