/* Service Portal Enhanced Styles */

/* Development banner styles */
.development-banner {
    background-color: #ff9800;
    color: #fff;
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 10px;
    position: left;
}

/* Enhanced table container instead of map */
.table-container-enhanced {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* Enhanced datatable styling */
#dataTable {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    color: #2C3E50;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(52, 152, 219, 0.1);
    font-size: 0.9rem;
}

#dataTable th, #dataTable td {
    border: 1px solid rgba(52, 152, 219, 0.1);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.98);
    color: #2C3E50;
    transition: all 0.3s ease;
    font-weight: 500;
    vertical-align: middle;
}

#dataTable th {
    background: linear-gradient(135deg, #3498DB 0%, #2980B9 100%);
    color: #fff;
    font-weight: 700;
    border-bottom: 3px solid #2980B9;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 10px 16px;
}

#dataTable tr {
    transition: all 0.3s ease;
}

#dataTable tr:nth-child(even) {
    background: rgba(52, 152, 219, 0.05);
}

#dataTable tr:hover {
    background: rgba(52, 152, 219, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

/* DataTables controls styling - simplified */
.dataTables_wrapper {
    margin-top: 20px;
}

.dataTables_wrapper .dataTables_length {
    margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_filter {
    margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_info {
    margin-top: 15px;
    font-style: italic;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 15px;
}

/* Basic DataTables button styling */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    color: #333 !important;
    text-decoration: none;
    cursor: pointer;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e9ecef !important;
    border-color: #adb5bd;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    background: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
    cursor: not-allowed;
}

.dataTables_wrapper .dataTables_length, 
.dataTables_wrapper .dataTables_filter, 
.dataTables_wrapper .dataTables_info {
    color: #2C3E50;
    font-weight: 500;
}

.dataTables_wrapper .dataTables_filter label {
    font-weight: 500;
    margin-bottom: 0;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 6px 10px;
    margin-left: 8px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.dataTables_wrapper .dataTables_length label {
    font-weight: 500;
    margin-bottom: 0;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 4px 8px;
    margin-left: 8px;
    min-width: 70px;
    width: auto;
}

/* Fix per Bootstrap select che è troppo stretto */
.dataTables_wrapper .dataTables_length .form-select,
.dataTables_wrapper .dataTables_length .form-select-sm {
    min-width: 80px !important;
    width: auto !important;
    display: inline-block !important;
    padding-right: 24px !important;
}

/* Clear float fix */
.dataTables_wrapper::after {
    content: "";
    display: table;
    clear: both;
}

.dataTables_wrapper .top::after,
.dataTables_wrapper .bottom::after {
    content: "";
    display: table;
    clear: both;
}

/* Enhanced header */
.page-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.9));
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.page-header h1 {
    background: linear-gradient(135deg, #1A2A36, #3498DB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: -0.5px;
}

.page-header p {
    margin: 12px 0 0 0;
    font-size: 1.2rem;
    color: #34495E;
    font-weight: 600;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .table-container-enhanced {
        padding: 16px;
        min-height: 300px;
    }
    
    #dataTable th, #dataTable td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        margin-bottom: 15px;
        float: none;
        text-align: center;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
        min-width: auto;
    }
    
    .dataTables_wrapper .dataTables_length select {
        margin-left: 5px;
    }
    
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none;
        text-align: center;
        margin-top: 15px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
}
