/* ABMRS Analysis Plugin Styles */

.abmrs-analysis-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.abmrs-analysis-form {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e1e1e1;
}

.abmrs-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.abmrs-form-group {
    flex: 1;
    min-width: 200px;
}

.abmrs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.abmrs-form-group input,
.abmrs-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.abmrs-form-group input:focus,
.abmrs-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.form-note {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #e67e22;
    line-height: 1.3;
}

.abmrs-submit-btn {
    background: #007cba;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.abmrs-submit-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.abmrs-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading and Error States */
.abmrs-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.abmrs-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* Results Section */
.abmrs-analysis-results {
    margin-top: 30px;
}

/* Tabs Styles */
.abmrs-tabs-nav {
    display: flex;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 0;
    margin: 0;
}

.abmrs-tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    border-right: 1px solid #dee2e6;
    flex: 1;
    text-align: center;
}

.abmrs-tab-btn:last-child {
    border-right: none;
}

.abmrs-tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.abmrs-tab-btn.active {
    background: #fff;
    color: #007cba;
    border-bottom: 2px solid #007cba;
    position: relative;
    z-index: 1;
}

.abmrs-tabs-content {
    border: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    background: #fff;
    min-height: 400px;
}

.abmrs-tab-panel {
    display: none;
    padding: 25px;
    animation: fadeIn 0.3s ease-in;
}

.abmrs-tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.abmrs-summary-section {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #b3d9ff;
}

.abmrs-summary-section h3 {
    margin: 0 0 15px 0;
    color: #0073aa;
    font-size: 20px;
}

.abmrs-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.abmrs-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px 22px;
    background: white;
    border-radius: 6px;
    border: 1px solid #ddd;
    min-height: 64px;
    box-sizing: border-box;
    text-align: center;
}

.abmrs-summary-item .label {
    font-weight: 600;
    color: #333;
    line-height: 1.2;
    margin-bottom: 4px;
    min-width: unset;
    margin-right: 0;
}

.abmrs-summary-item .value,
.abmrs-summary-item .date-range {
    font-weight: 700;
    color: #007cba;
    font-size: 18px;
    display: block;
    min-width: 40px;
    margin-left: 0;
}

/* Table Styles */
.abmrs-table-section {
    margin-bottom: 30px;
}

.abmrs-table-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
}

.abmrs-table-container {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.abmrs-analysis-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.abmrs-analysis-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.abmrs-analysis-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.abmrs-analysis-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Row highlighting for problematic items */
.abmrs-analysis-table .negative-discrimination {
    background-color: #f8d7da !important;
}

.abmrs-analysis-table .poor-discrimination {
    background-color: #fff3cd !important;
}

.abmrs-analysis-table .problematic-difficulty {
    background-color: #e2e3e5 !important;
}

/* Difficulty level styling */
.difficulty-very-easy { color: #28a745; font-weight: 600; }
.difficulty-easy { color: #20c997; font-weight: 600; }
.difficulty-moderate { color: #007bff; font-weight: 600; }
.difficulty-hard { color: #fd7e14; font-weight: 600; }
.difficulty-very-hard { color: #dc3545; font-weight: 600; }

/* Details button */
.abmrs-details-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.abmrs-details-btn:hover {
    background: #545b62;
}

/* Question Details Panel */
.abmrs-question-details {
    background: #fff;
    border: 2px solid #007cba;
    border-radius: 8px;
    margin: 20px 0;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.details-header {
    background: #007cba;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px 6px 0 0;
}

.details-header h4 {
    margin: 0;
    font-size: 18px;
}

.close-details {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-details:hover {
    background: rgba(255,255,255,0.2);
}

/* Psychometric Analysis */
.psychometric-analysis {
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.psychometric-analysis h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 5px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.analysis-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.analysis-item strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.interpretation {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

/* Distractor Analysis */
.distractor-analysis {
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.distractor-analysis h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 5px;
}

.distractor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.distractor-table th {
    background: #f8f9fa;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #dee2e6;
}

.distractor-table td {
    padding: 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.distractor-table .correct-answer {
    background-color: #d4edda;
    font-weight: 600;
}

.distractor-table .poor-distractor {
    background-color: #f8d7da;
}

/* Basic Stats */
.basic-stats {
    padding: 20px;
}

.basic-stats h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.stat-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007cba;
}

/* Export Controls */
.abmrs-export-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.abmrs-export-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px;
}

.abmrs-export-section p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.abmrs-export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.abmrs-export-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.abmrs-export-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.abmrs-export-btn .export-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.abmrs-export-btn small {
    font-size: 12px;
    opacity: 0.9;
    font-weight: normal;
    line-height: 1.3;
}

/* Chart containers */
.abmrs-charts-section {
    margin: 30px 0;
}

.abmrs-charts-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

.abmrs-charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.chart-container h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    margin: 0 auto;
}

/* Difficulty Distribution Summary */
.difficulty-summary {
    margin-top: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.difficulty-summary h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.difficulty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.difficulty-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f8f9fa;
}

.difficulty-label {
    font-weight: 600;
    font-size: 12px;
}

.difficulty-count {
    font-weight: 700;
    font-size: 14px;
}

/* Raw Data Tab */
.abmrs-rawdata-section {
    padding: 0;
}

.abmrs-rawdata-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
}

.abmrs-rawdata-section p {
    color: #666;
    margin-bottom: 20px;
}

.raw-data-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.raw-data-controls {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.toggle-raw-data {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-right: 1px solid #ddd;
    transition: all 0.3s ease;
}

.toggle-raw-data:last-child {
    border-right: none;
}

.toggle-raw-data:hover {
    background: #e9ecef;
    color: #333;
}

.toggle-raw-data.active {
    background: #007cba;
    color: white;
}

.raw-data-section {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.raw-data-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.raw-data-section pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
    font-size: 12px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Human-readable Raw Data Styles */
.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.metadata-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.overall-stats {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.overall-stats h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    background: #007cba;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
}

.question-detail-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.question-header {
    background: #007cba;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.question-header h5 {
    margin: 0;
    font-size: 18px;
}

.correct-answer {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.question-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.stat-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e1e1e1;
}

.stat-group h6 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row span:first-child {
    color: #666;
    font-size: 13px;
}

.stat-row span:last-child {
    color: #333;
    font-weight: 600;
    font-size: 13px;
}

.response-distribution {
    padding: 20px;
    border-top: 1px solid #eee;
}

.response-distribution h6 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.response-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.response-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.correct-response {
    background: #d4edda;
    border-color: #28a745;
}

.incorrect-response {
    background: #f8f9fa;
    border-color: #ddd;
}

.response-label {
    font-weight: 600;
    font-size: 13px;
}

.response-count {
    font-size: 12px;
    color: #666;
}

.exam-responses-container {
    max-height: 600px;
    overflow-y: auto;
}

.exam-response-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.exam-response-card h5 {
    background: #6c757d;
    color: white;
    margin: 0;
    padding: 12px 15px;
    font-size: 16px;
}

.exam-summary {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.exam-stat {
    font-size: 14px;
    color: #333;
}

.exam-items {
    padding: 15px;
}

.exam-items h6 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.exam-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto auto;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 12px;
    align-items: center;
}

.correct-item {
    background: #d4edda;
    border-color: #28a745;
}

.incorrect-item {
    background: #f8d7da;
    border-color: #dc3545;
}

.item-question {
    font-weight: 600;
    color: #333;
}

.item-response,
.item-correct {
    color: #666;
}

.item-score {
    color: #333;
    font-weight: 600;
}

.item-result {
    font-weight: 600;
    text-align: center;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.correct-item .item-result {
    background: #28a745;
    color: white;
}

.incorrect-item .item-result {
    background: #dc3545;
    color: white;
}

/* Modal Styles */
.abmrs-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.abmrs-modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.abmrs-modal-header {
    background: #007cba;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.abmrs-modal-header h4 {
    margin: 0;
    font-size: 18px;
}

.abmrs-modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.abmrs-modal-close:hover {
    opacity: 0.7;
}

.abmrs-modal-body {
    padding: 20px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Modal content styles - reuse existing styles */
.abmrs-modal-body .psychometric-analysis,
.abmrs-modal-body .distractor-analysis,
.abmrs-modal-body .basic-stats {
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.abmrs-modal-body .psychometric-analysis:last-child,
.abmrs-modal-body .distractor-analysis:last-child,
.abmrs-modal-body .basic-stats:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .abmrs-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .abmrs-form-group {
        min-width: 100%;
    }
    
    .abmrs-analysis-table {
        font-size: 12px;
    }
    
    .abmrs-analysis-table th,
    .abmrs-analysis-table td {
        padding: 6px 4px;
    }
    
    .abmrs-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .abmrs-charts-container {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .abmrs-analysis-container {
        padding: 10px;
    }
    
    .abmrs-analysis-form {
        margin-bottom: 15px;
    }
    
    .details-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .close-details {
        align-self: flex-end;
    }
}

/* Required field asterisk */
.abmrs-required-note {
    color: #dc3545;
    font-weight: 700;
}

/* Error highlight on missing required field */
.abmrs-field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
    animation: abmrs-shake 0.3s ease;
}

@keyframes abmrs-shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-6px); }
    75%       { transform: translateX(6px); }
}

/* Optional field note shown on labels */
.abmrs-optional-note {
    font-size: 11px;
    font-weight: normal;
    color: #888;
    font-style: italic;
}

/* Active filter notice */
.abmrs-filter-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 10px 16px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #856404;
}

/* CSV Export Bar */
.abmrs-export-bar {
    display: flex;
    justify-content: flex-end;
    padding: 8px 0 0 0;
    margin-bottom: -1px;
}

#abmrs-export-csv {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

#abmrs-export-csv:hover {
    background: #218838;
}

/* Sortable table headers */
.abmrs-analysis-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.abmrs-analysis-table th.sortable:hover {
    background: #e9ecef;
}

.sort-icon {
    display: inline-block;
    color: #aaa;
    font-size: 11px;
    margin-left: 3px;
}

.abmrs-analysis-table th.sort-asc .sort-icon,
.abmrs-analysis-table th.sort-desc .sort-icon {
    color: #007cba;
}

.abmrs-analysis-table th.sort-asc .sort-icon::after { content: ' ↑'; }
.abmrs-analysis-table th.sort-desc .sort-icon::after { content: ' ↓'; }

/* KR-20 Reliability Block */
.abmrs-reliability-block {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.abmrs-reliability-block h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.reliability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.reliability-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e1e1;
    text-align: center;
    gap: 5px;
}

.rel-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.rel-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.rel-interp {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.reliability-excellent { color: #28a745; }
.reliability-good      { color: #17a2b8; }
.reliability-acceptable { color: #fd7e14; }
.reliability-questionable { color: #dc3545; }

/* Alert value (negative discrimination count) */
.abmrs-value-alert {
    color: #dc3545 !important;
}

/* Raw data filter input */
.raw-data-filter {
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

#raw-data-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

/* Response section filter bar */
.response-filter-bar {
    padding: 10px 0 15px 0;
    font-size: 13px;
    color: #555;
}

#response-question-filter {
    margin-left: 6px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    width: 200px;
}

/* Distractor summary table (reuses .abmrs-analysis-table base) */
.distractor-summary-table td[rowspan] {
    font-weight: 700;
    vertical-align: top;
    background: #f8f9fa;
    border-right: 2px solid #dee2e6;
}

/* Information Icons and Enhanced Tooltips */
.abmrs-info-icon {
    display: inline-block;
    margin-left: 5px;
    color: #0073aa;
    font-size: 14px;
    cursor: help !important;
    position: relative;
    opacity: 0.8;
    transition: all 0.2s ease;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 115, 170, 0.3);
}

.abmrs-info-icon:hover {
    opacity: 1;
    color: #005177;
    transform: scale(1.1);
    cursor: help !important;
}

/* Universal override to ensure cursor works everywhere */
* .abmrs-info-icon,
* .abmrs-info-icon:hover {
    cursor: help !important;
}

/* Specific overrides for different contexts */
.abmrs-analysis-table th .abmrs-info-icon,
.abmrs-summary-item .abmrs-info-icon,
.abmrs-summary-item .label .abmrs-info-icon,
.chart-container h4 .abmrs-info-icon,
.abmrs-tab-btn .abmrs-info-icon {
    cursor: help !important;
}

.abmrs-analysis-table th .abmrs-info-icon:hover,
.abmrs-summary-item .abmrs-info-icon:hover,
.abmrs-summary-item .label .abmrs-info-icon:hover,
.chart-container h4 .abmrs-info-icon:hover,
.abmrs-tab-btn .abmrs-info-icon:hover {
    cursor: help !important;
}

/* JavaScript-based tooltip styling */
.abmrs-tooltip {
    position: absolute;
    background: linear-gradient(135deg, #333 0%, #444 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.5;
    max-width: 320px;
    width: max-content;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    word-wrap: break-word;
}

/* Make sure tooltips appear above other content */
.abmrs-tabs-nav,
.abmrs-analysis-table thead,
.chart-container {
    position: relative;
    z-index: 100;
}

/* Prevent tooltip overflow issues */
.abmrs-table-container {
    overflow: visible;
}

.abmrs-analysis-table {
    overflow: visible;
}

/* Mobile responsive adjustments for tooltips */
@media (max-width: 768px) {
    .abmrs-tooltip {
        max-width: 280px;
        font-size: 12px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .abmrs-tooltip {
        max-width: 240px;
        font-size: 11px;
        padding: 8px 10px;
    }
} 