/* Numeri Amici - Stili */

/* Tabs tipo relazione */
.na-tab {
    color: #999;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.na-tab:hover {
    color: #333;
    text-decoration: none;
}
.na-tab-active {
    color: #e8834a !important;
    border-bottom-color: #e8834a !important;
}

/* Filtri */
.na-filters {
    padding: 12px 0;
}

/* Tabella */
.na-table {
    border-collapse: collapse;
}
.na-table thead th {
    background: #f8f8f8;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    white-space: nowrap;
    padding: 8px 12px;
}
.na-table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s;
}
.na-table tbody tr:hover {
    background-color: rgba(232, 131, 74, 0.06);
}
.na-table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
}

/* Sortable headers */
.na-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}
.na-sortable:hover {
    color: #e8834a;
}
.na-sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #ccc;
}
.na-sortable.sort-asc::after {
    border-top: none;
    border-bottom: 4px solid #e8834a;
}
.na-sortable.sort-desc::after {
    border-top: 4px solid #e8834a;
}

/* Cerchi numeri */
.na-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.na-relation-icon {
    color: #999;
    margin: 0 2px;
}

/* Barra forza inline */
.na-bar-container {
    display: inline-block;
    width: 80px;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 6px;
}
.na-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}
.na-bar-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

/* Cerchio evidenziato (numero filtrato) */
.na-circle-highlight {
    background: linear-gradient(135deg, #e8834a 0%, #d35400 100%);
    box-shadow: 0 2px 8px rgba(232, 131, 74, 0.5);
    transform: scale(1.1);
}

/* Icona info negli header */
.na-info-icon {
    opacity: 0.4;
    vertical-align: middle;
}
.na-sortable:hover .na-info-icon {
    opacity: 0.7;
}

/* Badge affidabilita con progress bar */
.na-affidabilita-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 60px;
}
.na-progress-mini {
    width: 100%;
    height: 3px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}
.na-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

/* Badge affidabilita */
.na-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Empty state */
.na-empty-state {
    background: #fafafa;
    border: 2px dashed #e5e5e5;
    border-radius: 8px;
}

/* Spinner bottone cerca */
.na-btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Badge categoria sequenza */
.na-cat-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Offcanvas dettaglio */
#na-detail-offcanvas .uk-offcanvas-bar {
    background: #fff;
    color: #333;
}
.na-detail-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 20px;
}
.na-detail-header .na-circle {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
}
.na-detail-header .na-relation-icon {
    font-size: 1.2rem;
    margin: 0 8px;
}
.na-detail-section {
    margin-bottom: 20px;
}
.na-detail-section h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f0f0f0;
}
.na-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.na-detail-stat {
    text-align: center;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 6px;
}
.na-detail-stat .na-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}
.na-detail-stat .na-stat-label {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    margin-top: 2px;
}
.na-detail-bar-full {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin: 8px 0 4px;
}
.na-detail-bar-fill {
    height: 100%;
    border-radius: 4px;
}
.na-detail-dist-row {
    display: flex;
    align-items: center;
    padding: 4px 0;
    font-size: 0.8rem;
    border-bottom: 1px solid #f5f5f5;
}
.na-detail-dist-row:last-child {
    border-bottom: none;
}
.na-detail-dist-label {
    width: 60px;
    color: #666;
    flex-shrink: 0;
}
.na-detail-dist-bar {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin: 0 8px;
}
.na-detail-dist-bar-fill {
    height: 100%;
    background: #3498db;
    border-radius: 4px;
}
.na-detail-dist-value {
    width: 40px;
    text-align: right;
    color: #333;
    font-weight: 500;
    flex-shrink: 0;
}
.na-detail-note {
    background: #f0f7ff;
    border-left: 3px solid #3498db;
    padding: 10px 12px;
    font-size: 0.8rem;
    color: #555;
    border-radius: 0 4px 4px 0;
    margin-top: 16px;
}

/* Responsive mobile */
@media (max-width: 639px) {
    #na-tipo-tabs {
        gap: 0;
    }
    #na-tipo-tabs .na-tab {
        padding: 8px 12px !important;
        font-size: 0.85rem;
    }
    .na-bar-container {
        width: 50px;
    }
    .na-circle {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    .na-circle-highlight {
        transform: scale(1.05);
    }
    #na-detail-offcanvas .uk-offcanvas-bar {
        width: 300px !important;
    }
}
