/* Lesson Observation Dashboard — base styles (Bootstrap 5 provides the rest). */

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------------------------------------------------------------------------
 * 4-band rating colors — SINGLE source of truth, reused everywhere
 * (criteria badges, final evaluation badges, live preview box, table cells).
 *
 *   band-1 = Inadequate   #dc3545 (red)
 *   band-2 = Satisfactory #ffc107 (yellow)
 *   band-3 = Good         #0d6efd (blue)
 *   band-4 = Outstanding  #198754 (green)
 * ------------------------------------------------------------------------- */
.band-1 { background-color: #dc3545; color: #fff; }
.band-2 { background-color: #ffc107; color: #212529; }
.band-3 { background-color: #0d6efd; color: #fff; }
.band-4 { background-color: #198754; color: #fff; }

/* Badge base + subtle border so colored badges read clearly on light rows */
.band-badge {
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Live Final Evaluation preview box (form) */
.final-preview {
    border-left: 5px solid #6c757d;
    font-size: 1.05rem;
}
.final-preview.band-1 { border-left-color: #dc3545; }
.final-preview.band-2 { border-left-color: #b8860b; }
.final-preview.band-3 { border-left-color: #0d6efd; }
.final-preview.band-4 { border-left-color: #198754; }

/* Old named aliases kept for compatibility with future chart code */
.band-outstanding { color: #198754; }
.band-proficient  { color: #0d6efd; }
.band-satisfactory{ color: #b8860b; }
.band-inadequate  { color: #dc3545; }

/* Small polish for tables used in later pages */
.table > tbody > tr > td { vertical-align: middle; }

/* Observation rubric — four-button rating selector */
.criteria-list {
    display: grid;
    gap: 1.5rem;
}

.criterion-card {
    min-width: 0;
    margin: 0;
    padding: 1.5rem;
    border: 1px solid #dbe3ef;
    border-radius: 1rem;
    background: #fbfcfe;
}

.criterion-card-invalid {
    border-color: #dc3545;
}

.criterion-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: auto;
    margin: 0 0 1.25rem;
    padding: 0;
    color: #172033;
    font-size: 1.15rem;
    font-weight: 700;
}

.criterion-number {
    display: inline-flex;
    flex: 0 0 2.25rem;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    font-size: 1rem;
}

.rating-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    max-width: 52rem;
    margin-left: 3rem;
}

.rating-option {
    position: relative;
    min-width: 0;
}

.rating-option-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.rating-option-label {
    display: flex;
    min-height: 6.25rem;
    margin: 0;
    padding: 1rem .5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #dbe3ef;
    border-radius: .8rem;
    background: #fff;
    color: #42516a;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.rating-option-label:hover {
    border-color: #93b4f5;
    background: #f5f8ff;
    transform: translateY(-1px);
}

.rating-option-score {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.rating-option-name {
    margin-top: .7rem;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
}

.rating-option-input:checked + .rating-option-label {
    border-color: #2563eb;
    background: #dbeafe;
    box-shadow: 0 0 0 3px #1e40af;
    color: #1d4ed8;
}

.rating-option-input:focus-visible + .rating-option-label {
    outline: 3px solid rgba(37, 99, 235, .3);
    outline-offset: 4px;
}

.criterion-error {
    margin: .75rem 0 0 3rem;
    color: #dc3545;
    font-size: .875rem;
}

@media (max-width: 767.98px) {
    .criterion-card {
        padding: 1.1rem;
    }

    .rating-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-left: 0;
    }

    .criterion-error {
        margin-left: 0;
    }
}

@media (max-width: 399.98px) {
    .rating-options {
        grid-template-columns: 1fr;
    }
}
