/* ================================================================
   LTTable — stili del componente tabella (prefisso ltt-)
   Si appoggia ai token --lt-* di main.css / portal.css.
   ================================================================ */

.ltt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

.ltt-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    flex: 1;
}

.ltt-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--lt-text-3);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.ltt-card { overflow: hidden; }

/* Header sticky durante lo scroll */
.ltt-table thead th {
    position: sticky;
    top: 0;
    background: var(--lt-surface);
    z-index: 2;
    user-select: none;
}

.ltt-sortable { cursor: pointer; transition: color 0.15s; }
.ltt-sortable:hover { color: var(--lt-primary); }
.ltt-sorted { color: var(--lt-primary) !important; }

.ltt-sort-icon {
    font-size: 0.62rem;
    margin-left: 0.3rem;
    opacity: 0.55;
}

.ltt-sorted .ltt-sort-icon { opacity: 1; }

/* Riga cliccabile */
.ltt-row-link { cursor: pointer; }

/* Micro-ingresso delle righe (solo primo chunk, breve e discreto) */
.ltt-row-enter {
    animation: lttRowIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes lttRowIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Skeleton */
.ltt-skel {
    display: inline-block;
    height: 0.85rem;
    width: 70%;
    border-radius: 4px;
    background: linear-gradient(
        90deg,
        var(--lt-surface-3) 25%,
        var(--lt-surface-2) 45%,
        var(--lt-surface-3) 65%
    );
    background-size: 240% 100%;
    animation: lttShimmer 1.3s ease-in-out infinite;
}

.ltt-skel-row td { border-bottom: 1px solid var(--lt-border); }
.ltt-skel-row td:first-child .ltt-skel { width: 88%; }

@keyframes lttShimmer {
    from { background-position: 130% 0; }
    to   { background-position: -110% 0; }
}

/* Stato vuoto / errore dentro la card */
.ltt-state {
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.ltt-state > i {
    font-size: 2rem;
    color: var(--lt-primary);
    opacity: 0.65;
    display: block;
    margin-bottom: 0.75rem;
}

.ltt-state-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--lt-text);
}

.ltt-state-sub {
    font-size: 0.78rem;
    color: var(--lt-text-3);
    margin-top: 0.2rem;
}

/* Footer di avanzamento */
.ltt-footer {
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--lt-border);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--lt-text-3);
    letter-spacing: 0.03em;
}

.ltt-footer-hint { color: var(--lt-text-4); font-weight: 500; }

/* Sentinella invisibile per l'IntersectionObserver */
.ltt-sentinel { height: 1px; }

/* Azioni riga */
.ltt-actions {
    display: inline-flex;
    gap: 0.25rem;
    white-space: nowrap;
}

.ltt-actions form { margin: 0; display: inline; }
