/* Stili pagina Contatti */

/* Main container */
.main-container {
    padding-top: 0; /* Height navbar */
    height: 100vh;
}

/* Sidebar - Stile uniforme con pagina messaggi */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #fff;
    border-right: 1px solid #e9ecef;
}

.sidebar .nav-link {
    padding: 0.75rem 1rem;
    color: #333;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    background-color: #f5f6f6;
    color: var(--primary-color, #f58220);
}

.sidebar .nav-link.active {
    background-color: var(--primary-light, #fff3e8);
    color: var(--primary-color, #f58220);
    border-left-color: var(--primary-color, #f58220);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.sidebar .nav-link .badge {
    margin-left: auto;
    font-size: 0.75rem;
}

.sidebar-heading {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Main content */
main {
    padding-top: 0;
    overflow-y: auto;
    height: calc(100vh - 56px);
}

/* Card - Override hover da style.css per evitare movimento */
.dashboard-card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.dashboard-card:hover {
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Table */
.table {
    margin-bottom: 0;
    table-layout: fixed;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
}

/* Colonna immagine - larghezza fissa */
.table thead th:first-child,
.table tbody td:first-child {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
}

/* Colonna azioni - larghezza fissa */
.table thead th:last-child,
.table tbody td:last-child {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.table tbody tr {
    /* Rimuovi transizione e animazione hover */
    transition: none !important;
}

.table tbody tr:hover,
.table-hover > tbody > tr:hover > * {
    background-color: inherit !important;
    --bs-table-hover-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
}

.table tbody td {
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Buttons */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-outline-primary:hover {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Loading & Empty States */
#loadingState,
#emptyState {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#emptyState i {
    font-size: 4rem;
    color: #dee2e6;
}

/* Modal */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Forms */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Toast container */
.toast-container {
    z-index: 9999;
}

.toast {
    min-width: 250px;
}

/* Search bar */
.input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: 1px solid #667eea;
}

/* Badge */
.badge {
    font-weight: 500;
    padding: 0.25rem 0.5rem;
}

/* Responsive */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
    }

    main {
        height: auto;
    }
}

/* Animations - Rimossa animazione righe per stabilità */

/* Utilities */
.text-end {
    text-align: right;
}

.fw-semibold {
    font-weight: 600;
}

/* Delete modal specific */
.modal-header.bg-danger {
    background-color: #dc3545 !important;
}

.btn-close-white {
    filter: invert(1);
}
