/* Pestañas de estado de Noticias (resources/views/filament/news/status-tabs.blade.php).
   Franja de flujo: Todas | Borradores → Programadas → Publicadas, y la
   Papelera aparte. La activa se pinta azul noche con franja anaranjada,
   igual que el menú lateral y la barra superior. */

.nt {
    --nt-surface: #ffffff;
    --nt-line: rgb(15 29 54 / 0.1);
    --nt-hover: #f4f6fa;
    --nt-count: #0f1d36;
    --nt-label: #4f5d75;
    --nt-hint: #6b7688;

    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.dark .nt {
    --nt-surface: rgb(17 24 39);
    --nt-line: rgb(255 255 255 / 0.1);
    --nt-hover: rgb(255 255 255 / 0.04);
    --nt-count: #eaf0f8;
    --nt-label: #9eadc6;
    --nt-hint: #8795ad;
}

@media (min-width: 64rem) {
    .nt {
        grid-template-columns: minmax(0, 1fr) minmax(11rem, 14rem);
    }
}

.nt-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--nt-surface);
    border-radius: 0.875rem;
    box-shadow: 0 0 0 1px var(--nt-line);
    overflow: hidden;
}

@media (min-width: 48rem) {
    .nt-flow {
        grid-template-columns: 1.1fr repeat(3, minmax(0, 1fr));
        overflow: visible;
    }
}

@media (min-width: 48rem) {
    .nt-flow.nt-flow-many {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---- Celda ---- */
.nt-tab {
    --nt-tone: #22498f;
    --nt-tone-on-dark: #8fb0ee;

    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem 1.5rem 1.1rem 1.25rem;
    text-align: start;
    background: var(--nt-surface);
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.nt-tab:hover {
    background: var(--nt-hover);
}

.nt-tab:focus-visible {
    outline: 3px solid #f28c28;
    outline-offset: -3px;
    z-index: 2;
}

.nt-flow .nt-tab + .nt-tab {
    border-inline-start: 1px solid var(--nt-line);
}

.nt-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.nt-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    color: var(--nt-tone);
}

.nt-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--nt-label);
}

.nt-count {
    margin-top: 0.3rem;
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 800;
    font-stretch: 125%;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--nt-count);
}

.nt-hint {
    font-size: 0.8125rem;
    color: var(--nt-hint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Tonos por estado (mismos que las etiquetas de la tabla) ---- */
.nt-tone-neutral { --nt-tone: #22498f; --nt-tone-on-dark: #8fb0ee; }
.nt-tone-draft { --nt-tone: #6b7688; --nt-tone-on-dark: #c8d2e3; }
.nt-tone-scheduled { --nt-tone: #b8620c; --nt-tone-on-dark: #f5a55a; }
.nt-tone-published { --nt-tone: #3d7a2c; --nt-tone-on-dark: #8fd07a; }
.nt-tone-trash { --nt-tone: #b42318; --nt-tone-on-dark: #ff9b8f; }

.dark .nt-tab {
    --nt-tone: var(--nt-tone-on-dark);
}

/* ---- Activa: azul noche + franja anaranjada (no depende solo del color) ---- */
.nt-tab.is-active {
    background: #122b57;
    box-shadow: inset 0 -4px 0 #f28c28;
}

.nt-tab.is-active .nt-count {
    color: #ffffff;
}

.nt-tab.is-active .nt-label {
    color: #ffffff;
    font-weight: 700;
}

.nt-tab.is-active .nt-hint {
    color: #d5def0;
}

.nt-tab.is-active .nt-icon {
    color: var(--nt-tone-on-dark);
}

/* ---- Flechas del ciclo Borrador → Programada → Publicada (escritorio) ----
   Un cuadrado girado que hereda el fondo de su celda: si la celda está
   activa, la flecha también se pinta azul noche. */
@media (min-width: 48rem) {
    .nt-step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 50%;
        right: -0.55rem;
        z-index: 1;
        width: 1.1rem;
        height: 1.1rem;
        background: inherit;
        border-top: 1px solid var(--nt-line);
        border-right: 1px solid var(--nt-line);
        transform: translateY(-50%) rotate(45deg);
    }

    .nt-step.is-active:not(:last-child)::after {
        border-color: #122b57;
    }

    .nt-flow .nt-tab:first-child {
        border-start-start-radius: 0.875rem;
        border-end-start-radius: 0.875rem;
    }

    .nt-flow .nt-tab:last-child {
        border-start-end-radius: 0.875rem;
        border-end-end-radius: 0.875rem;
    }
}

/* En móvil, "Todas" ocupa la fila completa y las etapas van de a dos. */
@media (max-width: 47.99rem) {
    .nt-summary {
        grid-column: 1 / -1;
    }

    .nt-flow .nt-tab + .nt-tab {
        border-inline-start: 0;
        border-top: 1px solid var(--nt-line);
    }

    .nt-flow .nt-step:nth-child(odd) {
        border-inline-start: 1px solid var(--nt-line);
    }
}

/* ---- Papelera: fuera del flujo, más discreta ---- */
.nt-aside {
    display: grid;
}

.nt-aside .nt-tab {
    height: 100%;
    border-radius: 0.875rem;
    background: transparent;
    box-shadow: inset 0 0 0 1.5px var(--nt-line);
    outline-offset: -3px;
}

.nt-aside .nt-tab:not(.is-active) {
    border: 1.5px dashed var(--nt-line);
    box-shadow: none;
}

.nt-aside .nt-tab.is-active {
    background: #122b57;
    box-shadow: inset 0 -4px 0 #f28c28;
}

@media (prefers-reduced-motion: reduce) {
    .nt-tab {
        transition: none;
    }
}
