/* ═══════════════════════════════════════════════════
   AVISO DE TERCERO / IDENTIFICACIÓN — aviso-tercero.css
   Modal ámbar (estructura de .mss-modal de Mis solicitudes) que usan:
     - Estado de trámite del portal (templates/Admin/Tramite/estado_tramite.html.twig)
     - Consulta pública de estado (templates/Admin/Default/estado.html.twig)
   Las variables de color van en .et-modal para que funcione fuera de la pantalla interna.
   ═══════════════════════════════════════════════════ */
.et-modal {
    --et-primary: #0d3b40;
    --et-deep:    #082528;
    --et-s50:  #f8fafc;
    --et-s100: #f1f5f9;
    --et-s200: #e2e8f0;
    --et-s400: #94a3b8;
    --et-s500: #64748b;
    --et-s700: #334155;
    --et-warn: #d97706;
    --et-bad:  #dc2626;
    --et-font: 'Inter', ui-sans-serif, system-ui, sans-serif;
    --et-disp: 'Plus Jakarta Sans', 'Inter', sans-serif;
}
.et-modal [hidden] { display: none !important; }
.et-modal .et-btn-spin {
    display: none; width: 16px; height: 16px; border-radius: 50%;
    border: 2.5px solid rgba(255,255,255,.22); border-top-color: #fff; border-right-color: #9fd5cf;
    animation: et-spin .65s cubic-bezier(.5,.15,.5,.85) infinite;
}
@keyframes et-spin  { to { transform: rotate(360deg); } }
@keyframes et-in    { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes et-zoom  { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes et-pop   { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* Aviso de tercero: misma estructura que .mss-modal (Mis solicitudes) en tono ámbar de advertencia.
   La caja no se desplaza: la cabecera queda fija y solo el cuerpo tiene scroll (no corta el encabezado). */
.et-modal { position: fixed; inset: 0; z-index: 1050; display: flex; align-items: center; justify-content: center; padding: 16px; }
.et-modal-bg { position: absolute; inset: 0; background: rgba(8,37,40,.45); backdrop-filter: blur(2px); }
.et-modal-box {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    width: 100%; max-width: 420px; max-height: calc(100vh - 32px);
    border: 1px solid var(--et-s100); border-radius: 22px; background: #fff;
    box-shadow: 0 24px 64px rgba(15,23,42,.2); font-family: var(--et-font); color: var(--et-s700);
}
.et-modal.is-open .et-modal-bg  { animation: et-fade .2s ease-out both; }
.et-modal.is-open .et-modal-box { animation: et-zoom .28s cubic-bezier(.2,.8,.2,1) both; }
.et-modal-x {
    position: absolute; top: 10px; right: 10px; z-index: 2; width: 26px; height: 26px; border: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.08); color: var(--et-s500); font-size: 11px; cursor: pointer; transition: background .15s;
}
.et-modal-x:hover { background: rgba(0,0,0,.15); }
.et-modal-hdr {
    flex-shrink: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 55%, #fff 100%); border-bottom: 1px solid #fde68a;
}
.et-modal-chip {
    display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 3px 10px; border-radius: 20px;
    background: rgba(255,255,255,.85); box-shadow: 0 1px 4px rgba(15,23,42,.08);
    font-size: 9.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #b45309;
}
.et-modal-t { margin: 0 0 2px; font-family: var(--et-disp); font-size: 18px; font-weight: 800; line-height: 1.25; color: var(--et-deep); }
.et-modal-sub { margin: 0; font-size: 12px; line-height: 1.45; color: var(--et-s500); }
.et-modal-ico {
    flex-shrink: 0; width: 40px; height: 40px; margin-right: 24px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
    background: #fff; box-shadow: 0 2px 8px rgba(15,23,42,.1); color: #d97706; font-size: 17px;
}
.et-modal-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 20px 16px; scrollbar-width: thin; scrollbar-color: var(--et-s200) transparent; }
.et-modal-body::-webkit-scrollbar { width: 6px; }
.et-modal-body::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--et-s200); }

/* Ticket con muescas laterales */
.et-ticket { position: relative; border: 1px solid var(--et-s100); border-radius: 14px; background: #fff; box-shadow: 0 1px 4px rgba(15,23,42,.06); }
.et-ticket::before, .et-ticket::after { content: ''; position: absolute; top: 34px; width: 14px; height: 14px; border-radius: 50%; background: var(--et-s50); border: 1px solid var(--et-s100); }
.et-ticket::before { left: -8px; clip-path: inset(0 0 0 50%); }
.et-ticket::after  { right: -8px; clip-path: inset(0 50% 0 0); }
.et-ticket-sec { padding: 9px 14px; }
.et-ticket-sec + .et-ticket-sec { border-top: 1px dashed var(--et-s200); }
.et-ticket-num { margin: 0; font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 14px; font-weight: 700; color: var(--et-deep); }
.et-ticket-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 2px 0; }
.et-ticket-lbl { flex-shrink: 0; margin: 0; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--et-s400); }
.et-ticket-val { margin: 0; font-size: 12px; font-weight: 700; text-align: right; color: var(--et-deep); }

.et-modal-eyebrow { margin: 12px 0 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--et-s400); }
.et-modal-eyebrow label { margin: 0; font: inherit; }
/* Aviso de privacidad: resumen y texto completo desplegable */
.et-ley { margin: 12px 0 0; padding: 10px 12px 6px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; font-size: 11.5px; line-height: 1.5; color: #78350f; }
.et-ley-res { display: flex; gap: 8px; margin: 0; }
.et-ley-res .fa { margin-top: 2px; color: #d97706; }
.et-ley-mas { margin: 8px 0 2px; padding-top: 8px; border-top: 1px dashed #fcd34d; animation: et-in .25s ease-out; }
.et-ley-mas p { margin: 0 0 6px; text-align: justify; }
.et-ley-mas .et-ley-t { margin-bottom: 4px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; text-align: left; color: #92400e; }
.et-ley-btn { display: inline-flex; align-items: center; gap: 5px; margin: 2px 0 0 20px; padding: 2px 0; border: 0; background: none; font-family: inherit; font-size: 11.5px; font-weight: 700; color: #b45309; cursor: pointer; }
.et-ley-btn:hover span { text-decoration: underline; text-underline-offset: 2px; }
.et-ley-btn .fa { font-size: 9px; transition: transform .2s; }
.et-ley-btn[aria-expanded="true"] .fa { transform: rotate(180deg); }

/* Finalidad: tarjetas con ícono (una sola elegida); "Otra" abre el campo libre */
.et-fin { margin-bottom: 12px; }
.et-fin-ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.et-fin-op {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 58px; padding: 8px 6px;
    border: 1.5px solid var(--et-s200); border-radius: 12px; background: #fff; font-family: inherit; font-size: 11.5px; font-weight: 600; line-height: 1.2;
    color: var(--et-s500); text-align: center; cursor: pointer; transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.et-fin-op .fa { font-size: 15px; color: var(--et-s400); transition: color .15s; }
.et-fin-op:hover { border-color: var(--et-s400); color: var(--et-s700); transform: translateY(-1px); }
.et-fin-op:focus-visible { outline: 2px solid var(--et-primary); outline-offset: 2px; }
.et-fin-op.is-on { border-color: var(--et-primary); background: rgba(13,59,64,.05); color: var(--et-deep); }
.et-fin-op.is-on .fa { color: var(--et-primary); }
.et-fin-op.is-on::after {
    content: '\f00c'; position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; background: var(--et-primary); color: #fff;
    font-family: FontAwesome; font-size: 9px; box-shadow: 0 0 0 2px #fff; animation: et-pop .3s cubic-bezier(.3,1.6,.5,1) both;
}
.et-fin-field { position: relative; margin-top: 8px; animation: et-in .2s ease-out; }

.et-fin-field input {
    width: 100%; height: 40px; padding: 0 54px 0 12px; border: 1px solid var(--et-s200); border-radius: 11px; background: var(--et-s50);
    font-family: inherit; font-size: 13px; color: var(--et-deep); outline: none; transition: border-color .15s, background .15s, box-shadow .15s;
}
.et-fin-field input:focus { border-color: var(--et-primary); background: #fff; box-shadow: 0 0 0 3px rgba(13,59,64,.08); }
.et-fin-n { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 10.5px; font-weight: 600; color: var(--et-s400); font-variant-numeric: tabular-nums; }
.et-fin-n.is-max { color: var(--et-warn); }
.et-modal-err { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--et-bad); }

.et-modal-chk {
    display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 9px 12px; border: 1px solid var(--et-s200); border-radius: 12px;
    font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--et-s700); cursor: pointer; transition: border-color .15s, background .15s;
}
.et-modal-chk:hover { border-color: var(--et-s400); }
.et-modal-chk:has(input:checked) { border-color: var(--et-primary); background: rgba(13,59,64,.04); }
.et-modal-chk input { flex-shrink: 0; width: 16px; height: 16px; margin: 0; accent-color: var(--et-primary); cursor: pointer; }
.et-modal-ok {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; border: 0; border-radius: 12px;
    background: var(--et-primary); color: #fff; font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
    box-shadow: 0 10px 20px -12px rgba(13,59,64,.8); transition: background .15s, opacity .15s, transform .15s;
}
.et-modal-ok:hover:not([disabled]) { background: var(--et-deep); transform: translateY(-1px); }
.et-modal-ok[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; }
.et-modal-ok.is-loading { opacity: 1; cursor: progress; }
.et-modal-ok.is-loading .et-btn-spin { display: inline-block; }
.et-modal-ok.is-loading .fa { display: none; }
.et-modal-cancel {
    display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px auto 0; padding: 4px 10px; border: 0; background: none;
    font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--et-s500); cursor: pointer;
}
.et-modal-cancel:hover { color: var(--et-deep); }
@media (max-width: 480px) {
    .et-modal { align-items: flex-end; padding: 0; }
    .et-modal-box { max-width: none; max-height: 92vh; border-radius: 22px 22px 0 0; }
    .et-modal-hdr { padding: 16px 18px 12px; }
    .et-modal-body { padding: 12px 18px 16px; }
    .et-modal-t { font-size: 17px; }
    .et-modal-ico { width: 38px; height: 38px; font-size: 16px; }
    .et-fin-ops { grid-template-columns: repeat(2, 1fr); }
    .et-fin-op { flex-direction: row; justify-content: flex-start; min-height: 42px; padding: 8px 10px; text-align: left; }
}
@keyframes et-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .et-modal.is-open .et-modal-bg, .et-modal.is-open .et-modal-box { animation: none; } }
