/* Main styling for the data dictionary application */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Banner styling */
.banner-container {
    width: 100%;
    position: relative;
    text-align: center;
    background-color: #f8f9fa;
    margin-top: 0; /* Ensure no gap at top */
    border-bottom: 2px solid #FFCB05;
}

.banner-image {
    width: 100%;
    max-height: 400px; /* Increased significantly to ensure all of banner shows */
    object-fit: cover;
    margin-top: 0; /* No margin at top */
    padding-top: 0; /* No padding at top */
    display: block;
}

.banner-navigation {
    background-color: #00274C;
    padding: 10px 0;
    width: 100%;
}

.navigation-wrapper {
    gap: 15px;
}

.nav-link-custom {
    color: #FFCB05 !important; /* Michigan Yellow */
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.nav-link-custom:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFCB05 !important;
    text-decoration: underline;
}

.nav-link-custom.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFCB05 !important;
    border-bottom: 2px solid #FFCB05;
    font-weight: 700;
}

main {
    flex: 1;
}

/* Home page styling */
.hero-section {
    background-color: #f8f9fa;
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.michigan-hero {
    border-left: 4px solid #00274C;
    border-right: 4px solid #00274C;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
}

.stats-card, .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.stats-card:hover, .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Card headers with Michigan blue */
.card-header.michigan-blue {
    padding: 1rem;
    border-bottom: 2px solid #FFCB05;
}

/* Card body spacing */
.card-body {
    padding: 1.5rem;
}

/* Variable details styling */
.field-label {
    font-weight: bold;
    color: #495057;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-value {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #333;
}

/* Format for comma-separated items with line breaks */
.field-value br {
    margin-bottom: 0.3rem;
}

.metadata-item br {
    margin-bottom: 0.2rem;
    display: block;
    content: "";
}

/* Timeline image on homepage */
.timeline-image {
    max-width: 1200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin: 1.5rem auto;
    display: block;
}

/* Styling for choices */
.choice-item {
    display: block;
    padding: 8px 12px;
    margin-bottom: 3px;
    border-bottom: 1px dotted #e0e0e0;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.choice-item:last-child {
    border-bottom: none;
}

.choices-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

/* Improved formatting for details page */
.variable-details-section {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 3px solid #00274C;
}

.variable-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.metadata-item {
    background-color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #666;
    border: 1px solid #ddd;
    max-width: 100%;
}

/* Special styling for the summary scores metadata item */
.summary-scores-item {
    max-width: 100%;
    min-width: 300px;
    padding: 8px 12px !important;
    line-height: 1.5;
    border-left: 3px solid #2F65A7 !important;
}

.summary-scores-item strong {
    color: #2F65A7;
}

.related-variables {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

/* Search results styling */
.search-result-item {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

/* Summary scores styling - Using Michigan Blue #2F65A7 */
tr.summary-score-row {
    background: #f5f9ff !important;
    border-left: 4px solid #2F65A7 !important;
    position: relative;
    background-image: 
        linear-gradient(rgba(47, 101, 167, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 101, 167, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

tr.summary-score-row::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(47, 101, 167, 0.08) 0%, rgba(47, 101, 167, 0.02) 100%);
    pointer-events: none;
}

tr.summary-score-row:hover {
    background: #e6f0fb !important;
}

tr.summary-score-row:hover::after {
    background: linear-gradient(90deg, rgba(47, 101, 167, 0.12) 0%, rgba(47, 101, 167, 0.04) 100%);
}

.summary-score-label {
    color: #2F65A7 !important;
    font-weight: 600 !important;
}

/* Add extra styling for the acronym part */
.summary-score-label .acronym {
    font-weight: 700 !important;
    letter-spacing: 0.5px;
}

.bi-graph-up {
    margin-right: 5px;
    color: #2F65A7 !important;
}

/* Add a subtle top and bottom border and additional height */
tr.summary-score-row td {
    border-top: 1px solid rgba(47, 101, 167, 0.2) !important;
    border-bottom: 1px solid rgba(47, 101, 167, 0.2) !important;
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}

/* Checkboxes in search results */
.variable-checkbox {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.variable-name-label {
    cursor: pointer;
    display: block;
    margin-bottom: 0;
}

/* Selected count badge */
#selected-count {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    background-color: #f0f0f0;
    display: inline-block;
}

/* For the data request form */
.requested-fields-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    padding: 1rem;
    border-radius: 0.25rem;
}

/* Data specifications section styling */
.data-spec-section {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 3px solid #00274C;
    height: 100%;
}

.data-spec-section h3 {
    color: #00274C;
    margin-bottom: 1rem;
    border-bottom: 2px solid #FFCB05;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.data-spec-section .form-check {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.data-spec-section .form-check-input {
    margin-top: 0.3rem;
    margin-left: -1.5rem;
}

.data-spec-section .form-check-label {
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.data-spec-section .form-check-label:hover {
    color: #00274C;
}

.data-spec-section .form-check-input:checked + .form-check-label {
    color: #00274C;
    font-weight: 600;
}

/* Column spacing for data specifications */
.data-specifications .col-md-4 {
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .data-spec-section {
        margin-bottom: 1rem;
    }
    
    .col-md-4:last-child .data-spec-section {
        margin-bottom: 0;
    }
}

/* Form grouping */
.form-group {
    margin-bottom: 1rem;
}

/* Accessibility improvements */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #00274C;
    outline-offset: 2px;
}

/* Variable badges for field type */
.badge-field-type {
    font-size: 0.8rem;
    padding: 0.35em 0.65em;
}

/* Custom scrollbar for better UX */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive styles for banner and navigation */
@media (max-width: 768px) {
    .banner-image {
        width: 100%;
        max-height: 300px; /* Reduced for mobile but still substantial */
    }
    
    .banner-navigation {
        width: 100%;
        background-color: #00274C;
    }
    
    .navigation-wrapper {
        flex-wrap: wrap;
        justify-content: center;
        padding: 5px 0;
    }
    
    .nav-link-custom {
        margin: 3px;
        font-size: 1rem;
        color: #FFCB05 !important;
    }
    
    .nav-link-custom.active {
        background-color: rgba(255, 255, 255, 0.2);
        font-weight: 700;
    }
}
