.sd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.sd-header {
    margin-bottom: 30px;
}

.sd-glossary-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sd-glossary-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

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

.sd-glossary-term {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 5px;
    color: #333;
}

.sd-glossary-definition {
    margin-left: 0;
    line-height: 1.5;
    color: #666;
}

.sd-section-title {
    margin-top: 0;
    border-bottom: 2px solid #333;
}

/* Single District Styles */
.sd-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.sd-metric-group {
    background: #fdfdfd;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.sd-metric-group .sd-section-title {
    font-size: 1.4em;
    border-bottom-width: 1px;
    margin-top: 0;
}

.sd-metric-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sd-metric-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
}

.sd-metric-item:not(:last-child) {
    border-bottom: 1px solid #f9f9f9;
}

.sd-metric-label {
    font-weight: 500;
    cursor: help;
    color: #444;
}

.sd-metric-value {
    font-weight: bold;
    color: #000;
}

.sd-print-actions {
    margin: 20px 0;
}

.sd-button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.sd-button:hover {
    background: #005177;
    color: #fff;
}

.sd-breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #666;
}

.sd-breadcrumb a {
    color: #0073aa;
    text-decoration: none;
}

.sd-breadcrumb a:hover {
    text-decoration: underline;
}

/* Tippy theme adjustment */
.tippy-box[data-theme~='light-border'] {
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* List Table Styles */
.sd-list-table-container {
    overflow-x: auto;
    margin-top: 30px;
}

.sd-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 16px;
    text-align: left;
}

.sd-list-table th,
.sd-list-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.sd-list-table th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.sd-list-table tbody tr:hover {
    background-color: #f1f1f1;
}

.sd-col-district a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.sd-col-district a:hover {
    text-decoration: underline;
}

.sd-col-grade {
    text-align: center;
}

.sd-col-grade-header {
    text-align: center;
}

.sd-grade-badge {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sd-print-header {
    display: none;
}

@media print {
    .sd-hide-on-print {
        display: none !important;
    }

    body {
        font-size: 10pt;
    }

    .sd-print-actions, 
    .sd-breadcrumb, 
    header, 
    footer, 
    nav, 
    .sd-header {
        display: none !important;
    }

    .sd-print-header {
        display: block !important;
        border-bottom: 2px solid #333;
        margin-bottom: 20px;
    }

    .sd-print-header h1 {
        margin: 0;
        color: #000;
        font-size: 1.5em;
    }
    
    .sd-container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .sd-section-title {
        font-size: 1.3em;
    }
    
    .sd-metrics-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0 !important;
    }
    
    .sd-metric-group {
        break-inside: avoid;
        margin-bottom: 0;
        border: 1px solid #eee;
        padding: 15px;
        border-radius: 4px;
    }

    .sd-metric-group .sd-section-title {
        font-size: 1.1em;
    }

    .sd-metric-item {
        font-size: 9pt;
    }

    /* Ensure table looks good in print */
    .sd-list-table {
        width: 100% !important;
        font-size: 9pt;
    }

    .sd-list-table th {
        font-size: 8pt;
        padding: 8px 10px;
    }

    .sd-list-table td {
        padding: 8px 10px;
    }

    .sd-grade-badge {
        width: 25px;
        height: 25px;
        line-height: 25px;
        font-size: 9pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Search Box Styles */
.sd-search-container {
    margin-top: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.sd-search-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #495057;
}

.sd-search-input {
    width: 100%;
    max-width: 500px;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.075);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.sd-search-input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.ui-autocomplete {
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    max-height: 300px;
    overflow-y: auto;
}

.ui-menu-item {
    padding: 10px 15px;
    font-size: 14px;
}

.ui-state-active, .ui-widget-content .ui-state-active {
    background: #0073aa;
    border: 1px solid #0073aa;
    color: #fff;
    margin: 0;
}
