/* Custom styles for the app */

.table-edit-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border: 1px solid #ccc;
    font-size: inherit;
    font-family: inherit;
}

.compact-table {
    width: 100%;
    border-collapse: collapse;
}

.compact-table th, .compact-table td {
    white-space: nowrap;
    padding: 8px;
    border: 1px solid #ddd;
}

.class-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0 18px 0;
    margin-bottom: 18px;
}

.class-filter-btn {
    display: inline-block;
    background: #f8f9fa;
    color: #222;
    border: 2px solid #007bff;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}

.class-filter-btn:hover, .class-filter-btn.active {
    background: #007bff;
    color: #fff;
}

.avviso-btn {
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.avviso-btn:hover {
    background: #0056b3;
}

.btn-compact {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 4px;
}

/* Make athlete name clickable */
.btn-details {
    cursor: pointer;
    color: #007bff;
    text-decoration: none;
}

.btn-details:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Modal adjustments for mobile */
#modalDettagli .modal-dialog {
    max-width: 95vw !important;
}

/* On desktop, make modal narrower */
@media (min-width: 992px) {
    #modalDettagli .modal-dialog {
        max-width: 500px !important;
    }
}

/* Enhance active tab visibility */
.nav-tabs .nav-link.active {
    font-weight: bold;
    background-color: #007bff;
    color: white;
    border-color: #007bff #007bff #fff;
}

/* Improve table scrolling: limit height and add vertical scroll */
.table-responsive {
    max-height: 60vh;
    overflow-y: auto;
}

/* Make table header sticky when scrolling */
.table-responsive .table thead th {
    position: sticky;
    top: 0;
    background-color: #e9ecef;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: bold;
    border-bottom: 2px solid #007bff;
}

/* Improve table scrolling: limit height and add vertical scroll */
.table-responsive {
    max-height: 60vh;
    overflow-y: auto;
}

/* Make table header sticky when scrolling */
.table-responsive .table thead th {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
