/* frontend_static/css/legal.css */

.warning-amarillo { 
    background: #fef3c7; 
    color: #78350f; 
    padding: 4px 8px; 
    border-radius: 4px; 
}

.warning-rojo { 
    background: #fee2e2; 
    color: #991b1b; 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-weight: bold; 
}

.drawer-zip { 
    position: fixed; 
    right: 0; 
    top: 80px; 
    width: 300px; 
    background: white; 
    border-left: 2px solid #ccc; 
    padding: 16px; 
    box-shadow: -4px 0 8px rgba(0,0,0,0.1); 
    z-index: 50;
}

.tabs a {
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tabs a.active {
    border-bottom-color: #2563eb;
    color: #2563eb;
    font-weight: bold;
}

.submodos button {
    margin-right: 8px;
    padding: 4px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.submodos button.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.lote-card {
    border: 1px solid #e5e7eb;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
}

.entregable-card {
    border: 1px solid #e5e7eb;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   LEGAL.HTML — INLINE STYLE REPLACEMENTS
   Reemplazos semánticos de inline-styles estáticos detectados
   por webhint (no-inline-styles). Los Alpine :style="..." dinámicos
   se mantienen en el HTML por ser lógica reactiva del framework.
   ═══════════════════════════════════════════════════════════════ */

/* — Topbar — */
.topbar-logo { height: 32px; }
.topbar-title-dim {
    opacity: 0.55;
    font-weight: 400;
}
.topbar-link-seguimiento {
    color: var(--gold-light);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* — Banner IT (estados Processing / Success / Error) — */
.it-banner__header {
    gap: 16px;
    margin-bottom: 14px;
}
.it-banner__header-left {
    gap: 16px;
    flex: 1;
    min-width: 0;
}
.it-banner__icon {
    font-size: 30px;
    color: var(--gold);
}
.it-banner__icon--success { color: #4ade80; }
.it-banner__icon--error   { color: #fca5a5; }
.it-banner__title-wrap {
    flex: 1;
    min-width: 0;
}
.it-banner__title {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 17px;
    color: #fff;
}
.it-banner__lote-num         { color: var(--gold-light); }
.it-banner__title--success   { color: #86efac; }
.it-banner__title--error     { color: #fca5a5; }
.it-banner__status-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 4px;
    letter-spacing: 0.3px;
}
.it-banner__actions { gap: 10px; }
.it-banner__btn-download {
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}
.it-banner__btn-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    /* Hit area ≥ 40×40px (antes ~38×30px con padding 8/12) */
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: var(--r-sm);
    transition-property: background-color, color;
    transition-duration: 150ms;
    transition-timing-function: ease-out;
}
.it-banner__btn-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.9);
}

/* ── Stepper de hitos del IT ──────────────────────────────────────────────
   5 hitos canónicos (Datos → Análisis IA → Gravámenes → Biblioteca → Word)
   derivados del log del banner (it-banner.js), honestos al pipeline supremo
   vivo. Estados: done (check dorado) / active (punto pulsante) / pending
   (punto tenue) / error (cruz roja). El layout es count-agnóstico (flex: 1
   por step). El conector se pinta por step (::before) según estado. */
.it-stepper {
    display: flex;
    align-items: flex-start;
    margin: 14px 0 12px;
}
.it-stepper__step {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
/* Conector: media línea a la izquierda de cada nodo (excepto el primero).
   Hereda el estado del step DESTINO: se "enciende" cuando el step se alcanza. */
.it-stepper__step::before {
    content: "";
    position: absolute;
    top: 11px;               /* centro vertical del nodo de 22px */
    right: 50%;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    transition-property: background-color;
    transition-duration: 400ms;
    transition-timing-function: ease-out;
}
.it-stepper__step:first-child::before { display: none; }
.it-stepper__step--done::before,
.it-stepper__step--active::before {
    background: var(--gold);
}
.it-stepper__step--error::before {
    background: #dc2626;
}
.it-stepper__node {
    position: relative;       /* sobre el conector */
    z-index: 1;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy-dark, #0f1923);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition-property: border-color, background-color, transform;
    transition-duration: 250ms;
    transition-timing-function: ease-out;
}
.it-stepper__step--done .it-stepper__node {
    border-color: var(--gold);
    background: var(--gold);
}
.it-stepper__step--active .it-stepper__node {
    /* Fallback alineado con design-system.css (--gold-light: #F5C97A). */
    border-color: var(--gold-light, #F5C97A);
}
.it-stepper__step--error .it-stepper__node {
    border-color: #dc2626;
    background: #dc2626;
}
.it-stepper__check {
    font-size: 10px;
    color: var(--navy-dark, #0f1923);
}
.it-stepper__step--error .it-stepper__check { color: #fff; }
.it-stepper__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}
.it-stepper__step--active .it-stepper__dot {
    background: var(--gold-light, #e8a33d);
    animation: it-stepper-pulse 1.6s ease-in-out infinite;
}
@keyframes it-stepper-pulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.7); opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
    .it-stepper__step--active .it-stepper__dot { animation: none; }
}
.it-stepper__label {
    margin-top: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    transition-property: color;
    transition-duration: 250ms;
    transition-timing-function: ease-out;
}
.it-stepper__step--done .it-stepper__label   { color: rgba(255, 255, 255, 0.75); }
.it-stepper__step--active .it-stepper__label { color: var(--gold-light, #e8a33d); }
.it-stepper__step--error .it-stepper__label  { color: #fca5a5; }
@media (max-width: 560px) {
    .it-stepper__label { display: none; }  /* en móvil quedan los nodos + conectores */
}

.it-banner__log {
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.6;
    max-height: 130px;
    overflow-y: auto;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(212, 137, 26, 0.15);
}
.it-banner__log-line { padding: 1px 0; }
.it-banner__log-ts   { color: var(--gold); font-variant-numeric: tabular-nums; }
.it-banner__log-empty {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}
.it-banner__progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    overflow: hidden;
}
.it-banner__progress-foot { margin-top: 6px; }
.it-banner__progress-pct {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    font-variant-numeric: tabular-nums;  /* el % no "salta" al cambiar de dígitos */
}
.it-banner__error-note {
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(220, 38, 38, 0.15);
    border-left: 3px solid #ef4444;
    border-radius: var(--r-sm);
    font-size: 12px;
    color: #fecaca;
    font-style: italic;
}
.it-banner__email-note {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(56, 189, 248, 0.12);
    border-left: 3px solid var(--gold);
    border-radius: var(--r-sm);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}
.it-banner__email-icon {
    margin-right: 6px;
    color: var(--gold);
}

/* — Mensajes de error genéricos en cards — */
.error-card-text {
    color: var(--danger);
    font-weight: 600;
    margin: 0;
}

/* — Form helpers / utilidades de campo — */
.ds-field--full         { grid-column: 1 / -1; }
.ds-field--search-320 {
    width: 320px;
    margin: 0;
}
.tooltip-hint {
    color: var(--text-light);
    font-weight: 400;
}
.required-asterisk { color: var(--danger); }
.field-flex-1      { flex: 1; }
.label-xs          { font-size: 11px; }

/* — Lote card extras — */
.lote-card-header-row {
    gap: 8px;
    margin-bottom: 8px;
}
.lote-btn-delete { color: var(--danger); }

/* — Empty states (sin borradores / sin IT) — */
.empty-state-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 24px;
}
.empty-state-icon {
    font-size: 36px;
    color: var(--gold);
    opacity: 0.35;
    margin-bottom: 12px;
    display: block;
}
.empty-state-text { font-style: italic; }

/* — Datos del informe (icono) — */
.info-block__summary-icon { color: var(--gold); }

/* — Bloque "Subir PDFs" — */
.upload-block__sync-hint {
    color: var(--navy-mid);
    font-style: italic;
}
.upload-block__help-text {
    color: var(--text-light);
    margin-bottom: 16px;
}
.upload-block__file-input { display: none; }
.cbr-row__field           { flex: 1; }
.file-row-btn-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-light);
}

/* — Bloque "Extracciones del extractor" — */
.extracciones-block__help {
    color: var(--text);
    margin-bottom: 16px;
}
.extracciones-block__link-extractor {
    color: var(--gold);
    font-weight: 700;
    text-decoration: underline;
}
.extracciones-block__empty {
    color: var(--text-light);
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--r-sm);
}
.extracciones-block__empty-icon {
    opacity: 0.4;
    margin-right: 6px;
}
.extracciones-search-icon { color: var(--text-light); }
.extracciones-scroll-box {
    max-height: 240px;
    overflow-y: auto;
    background: var(--white);
    border-radius: var(--r-sm);
    padding: 10px;
    border: 1px solid rgba(28, 45, 79, 0.08);
}
.extracciones-row {
    cursor: pointer;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(28, 45, 79, 0.05);
    border-radius: 4px;
    transition: background 0.15s;
}
.checkbox--gold {
    margin: 0;
    accent-color: var(--gold);
}
.extracciones-empty {
    color: var(--text-light);
    font-style: italic;
    padding: 16px;
    text-align: center;
}
.extracciones-foot {
    color: var(--text-light);
    margin-top: 6px;
    text-align: right;
}

/* — Bandeja entregables — */
.entregable-fecha-icon { opacity: 0.6; }

/* — Drawer ZIP — */
.drawer-zip__btn-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 18px;
}
.drawer-zip__list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
    list-style: none;
}
.drawer-zip__list-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(28, 45, 79, 0.06);
    font-size: 12px;
}
.drawer-zip__list-item-text {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.drawer-zip__btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
}

/* — Importador masivo: ajustes puntuales — */
.importador-icon-excel { color: #16a34a; }
.importador-link-plantilla { margin-left: 6px; }
.importador-confianza-bold { font-weight: 700; }
.importador-th-checkbox    { width: 34px; }
