/**
 * ORC Specs Display - Modern Styles
 */

.orc-specs-table-wrapper {
    margin: 30px 0;
    overflow-x: auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1px;
}

#orc-specs-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

#orc-specs-table thead {
    height: 72px !important;
}

#orc-specs-table thead tr {
    height: 72px !important;
    max-height: 72px !important;
}

#orc-specs-table thead th {
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    padding: 15px 20px;
    border-bottom: 2px solid #dee2e6;
    cursor: pointer;
    position: relative;
    color: #495057;
    transition: background 0.2s ease, color 0.2s ease;
    height: 72px !important;
    max-height: 72px !important;
    min-height: 72px !important;
    box-sizing: border-box;
    vertical-align: middle;
    line-height: 20px !important;
    overflow: hidden !important;
}

/* Fix width of first column (ATIS Standard) */
#orc-specs-table thead th:first-child,
#orc-specs-table tbody td:first-child {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
}

/* Fix width of second column (O-RAN ALLIANCE Specification) */
#orc-specs-table thead th:nth-child(2),
#orc-specs-table tbody td:nth-child(2) {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
}

#orc-specs-table thead th:hover {
    background: linear-gradient(to bottom, #e9ecef 0%, #dee2e6 100%);
    color: #212529;
}

#orc-specs-table thead th:first-child {
    border-top-left-radius: 8px;
}

#orc-specs-table thead th:last-child {
    border-top-right-radius: 8px;
}

#orc-specs-table tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f3f5;
    color: #495057;
    font-size: 14px;
    transition: background-color 0.15s ease;
}

#orc-specs-table tbody tr {
    transition: all 0.15s ease;
}

#orc-specs-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#orc-specs-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

#orc-specs-table tbody tr:nth-child(even):hover {
    background-color: #f1f3f5;
}

#orc-specs-table tbody tr:last-child td {
    border-bottom: none;
}

#orc-specs-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

#orc-specs-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

#orc-specs-table a {
    color: #0066cc;
    text-decoration: none;
    word-break: break-all;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

#orc-specs-table a:hover {
    color: #0052a3;
    border-bottom-color: #0052a3;
}

.orc-specs-error,
.orc-specs-message {
    padding: 16px 20px;
    margin: 20px 0;
    border-left: 4px solid #dc3232;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    font-size: 14px;
    line-height: 1.5;
}

.orc-specs-message {
    border-left-color: #28a745;
    background-color: #f8fff9;
}

/* Hide DataTables default arrows completely - use more specific selectors */
#orc-specs-table.dataTable thead th.sorting,
#orc-specs-table thead th.sorting {
    background-image: none !important;
    padding-right: 20px !important;
}

/* Ensure DataTables doesn't add background images to unsorted columns */
table.dataTable thead th.sorting {
    background-image: none !important;
}

/* Override any DataTables default styles that might affect height */
#orc-specs-table.dataTable thead th,
#orc-specs-table.dataTable thead th.sorting,
#orc-specs-table.dataTable thead th.sorting_asc,
#orc-specs-table.dataTable thead th.sorting_desc {
    height: 72px !important;
    max-height: 72px !important;
    min-height: 72px !important;
    line-height: 20px !important;
    padding: 15px 20px !important;
    box-sizing: border-box !important;
}

#orc-specs-table thead th.sorting,
#orc-specs-table thead th.sorting_asc,
#orc-specs-table thead th.sorting_desc {
    height: 72px !important;
    max-height: 72px !important;
    min-height: 72px !important;
    overflow: hidden !important;
    padding: 15px 20px !important;
    line-height: 20px !important;
    position: relative;
}

/* Add simple text-based sort indicators - only show one set */
#orc-specs-table thead th.sorting::after {
    content: " ↕" !important;
    font-size: 11px !important;
    color: #6c757d !important;
    opacity: 0.6 !important;
    margin-left: 4px !important;
    display: inline !important;
    vertical-align: baseline !important;
}

#orc-specs-table thead th.sorting_asc::after {
    content: " ↑" !important;
    font-size: 12px !important;
    color: #1976d2 !important;
    opacity: 1 !important;
    margin-left: 4px !important;
    display: inline !important;
    vertical-align: baseline !important;
}

#orc-specs-table thead th.sorting_desc::after {
    content: " ↓" !important;
    font-size: 12px !important;
    color: #1976d2 !important;
    opacity: 1 !important;
    margin-left: 4px !important;
    display: inline !important;
    vertical-align: baseline !important;
}

/* Hide any DataTables pseudo-elements */
#orc-specs-table thead th.sorting::before,
#orc-specs-table thead th.sorting_asc::before,
#orc-specs-table thead th.sorting_desc::before {
    display: none !important;
    content: "" !important;
}

/* Sorted columns - show gradient but no DataTables arrow */
#orc-specs-table.dataTable thead th.sorting_asc,
#orc-specs-table.dataTable thead th.sorting_desc,
#orc-specs-table thead th.sorting_asc,
#orc-specs-table thead th.sorting_desc {
    background-image: linear-gradient(to bottom, #e3f2fd 0%, #bbdefb 100%) !important;
    padding-right: 20px !important;
    color: #1976d2;
}

table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    background-image: linear-gradient(to bottom, #e3f2fd 0%, #bbdefb 100%) !important;
}

/* DataTables wrapper padding */
.dataTables_wrapper {
    padding: 20px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 15px;
}

/* DataTables search and pagination styling */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 4px;
    padding: 6px 12px;
    margin: 0 2px;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #0066cc;
    color: white !important;
    border-color: #0066cc;
}

.dataTables_wrapper .dataTables_info {
    color: #6c757d;
    font-size: 14px;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .orc-specs-table-wrapper {
        margin: 15px -10px;
        border-radius: 0;
    }
    
    #orc-specs-table {
        font-size: 13px;
        border-radius: 0;
    }
    
    #orc-specs-table thead th {
        font-size: 11px;
        padding: 12px 12px;
    }
    
    #orc-specs-table tbody td {
        padding: 10px 12px;
    }
    
    #orc-specs-table thead th:first-child,
    #orc-specs-table tbody tr:last-child td:first-child {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }
    
    #orc-specs-table thead th:last-child,
    #orc-specs-table tbody tr:last-child td:last-child {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
}

