/* ABC Forms — shared styles */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: #222;
    background: #f5f6f8;
}

.abc-form-wrap {
    max-width: 860px;
    margin: 30px auto 60px;
    padding: 0 16px;
}

/* Header */
.abc-form-header {
    background: #003d7a;
    color: #fff;
    padding: 20px 28px;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
    gap: 20px;
}
.abc-form-header img { height: 52px; }
.abc-form-header h1 { margin: 0; font-size: 1.3rem; font-weight: 600; }
.abc-form-header p  { margin: 4px 0 0; font-size: 0.85rem; opacity: 0.85; }

/* Card */
.abc-form-card {
    background: #fff;
    border: 1px solid #dde1e7;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 28px;
}

/* Section block */
.abc-section {
    margin-bottom: 32px;
}
.abc-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #003d7a;
    border-bottom: 2px solid #003d7a;
    padding-bottom: 6px;
    margin: 0 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.abc-section-score {
    font-size: 0.82rem;
    font-weight: 400;
    color: #555;
    display: none;
}
body.abc-view-mode .abc-section-score { display: inline; }
.abc-section-score span { font-weight: 700; color: #003d7a; }

/* Rubric table */
.abc-rubric {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.abc-rubric thead th {
    background: #eef2f8;
    padding: 7px 10px;
    text-align: center;
    font-weight: 600;
    color: #333;
    border: 1px solid #d0d7e2;
}
.abc-rubric thead th:first-child { text-align: left; min-width: 260px; }
.abc-rubric tbody tr:nth-child(even) { background: #fafbfc; }
.abc-rubric tbody td {
    padding: 8px 10px;
    border: 1px solid #e4e8ef;
    vertical-align: middle;
}
.abc-rubric tbody td:not(:first-child) { text-align: center; }
.abc-rubric input[type="radio"] { cursor: pointer; accent-color: #003d7a; transform: scale(1.1); }

/* Critical marker */
.abc-crit { color: #c0392b; font-weight: 700; margin-left: 2px; }

/* Facility info fields */
.abc-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    margin-bottom: 20px;
}
.abc-field-row.full { grid-template-columns: 1fr; }
.abc-field-group { display: flex; flex-direction: column; gap: 4px; }
.abc-field-group label { font-weight: 600; font-size: 0.85rem; color: #444; }
.abc-field-group input,
.abc-field-group select,
.abc-field-group textarea {
    padding: 8px 10px;
    border: 1px solid #c8cdd6;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    background: #fff;
}
.abc-field-group input:focus,
.abc-field-group select:focus,
.abc-field-group textarea:focus {
    outline: none;
    border-color: #003d7a;
    box-shadow: 0 0 0 3px rgba(0,61,122,0.1);
}
.abc-field-group textarea { resize: vertical; min-height: 80px; }
.abc-field-group input[readonly] {
    background: #f0f3f8;
    color: #555;
    cursor: not-allowed;
}

/* Overall ratings */
.abc-overall-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    margin-bottom: 16px;
}
.abc-overall-grid .abc-field-group select { font-size: 0.88rem; }

/* Hours field */
.abc-hours-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.abc-hours-row label { font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
.abc-hours-row input { width: 100px; }

/* Submit area */
.abc-submit-row {
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.abc-btn {
    padding: 11px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.abc-btn-primary { background: #003d7a; color: #fff; }
.abc-btn-primary:hover { background: #00306a; }
.abc-btn-primary:disabled { background: #7a9cbd; cursor: not-allowed; }
.abc-submit-msg { font-size: 0.88rem; color: #555; }
.abc-submit-msg.error { color: #c0392b; }
.abc-submit-msg.success { color: #1a7a3a; font-weight: 600; }

/* Read-only view mode */
.abc-view-mode .abc-rubric input[type="radio"] { pointer-events: none; opacity: 0.2; }
.abc-view-mode .abc-rubric td.abc-selected { background: #dbeafe; border-radius: 4px; }
.abc-view-mode .abc-rubric td.abc-selected label { color: #1d4ed8; font-weight: 700; }
.abc-view-mode .abc-rubric td.abc-selected input[type="radio"] { opacity: 1; accent-color: #1d4ed8; }
.abc-view-mode .abc-field-group input,
.abc-view-mode .abc-field-group select,
.abc-view-mode .abc-field-group textarea { background: #f8f9fb; pointer-events: none; }
.abc-view-banner {
    background: #e8f4e8;
    border: 1px solid #5a9e5a;
    border-radius: 5px;
    padding: 12px 18px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #2d6a2d;
    font-weight: 600;
}

/* Validation error highlight */
.abc-field-error { border-color: #c0392b !important; }
.abc-error-msg { color: #c0392b; font-size: 0.82rem; margin-top: 3px; }

/* Survey scoring */
.abc-survey-score-bar {
    background: #eef2f8;
    border: 1px solid #d0d7e2;
    border-radius: 5px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}
.abc-survey-score-bar strong { color: #003d7a; font-size: 1.05rem; }
.abc-flag { background: #fff3cd; border: 1px solid #ffc107; border-radius: 4px; padding: 10px 14px; margin-top: 12px; font-size: 0.88rem; color: #7a5c00; }

/* Trainer contract specifics */
.abc-contract-body { font-size: 0.88rem; line-height: 1.65; color: #333; }
.abc-contract-body h3 { color: #003d7a; margin-top: 24px; }
.abc-initials-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.abc-initials-row label { font-size: 0.85rem; font-weight: 600; }
.abc-initials-row input { width: 70px; font-size: 1rem; text-align: center; text-transform: uppercase; }

.abc-location-block {
    border: 1px solid #d0d7e2;
    border-radius: 5px;
    padding: 16px;
    margin-bottom: 16px;
    background: #fafbfc;
}
.abc-location-block h4 { margin: 0 0 14px; font-size: 0.9rem; color: #003d7a; }

.abc-hours-grid {
    display: grid;
    grid-template-columns: 80px 1fr 20px 1fr 100px;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}
.abc-hours-grid input[type="time"] { padding: 5px 7px; border: 1px solid #c8cdd6; border-radius: 4px; }
.abc-hours-grid input[type="checkbox"] { margin: 0; }

/* Skills table (contract exhibit) */
.abc-skills-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-top: 10px; }
.abc-skills-table th { background: #eef2f8; padding: 6px 10px; text-align: left; border: 1px solid #d0d7e2; }
.abc-skills-table td { padding: 5px 10px; border: 1px solid #e4e8ef; }
.abc-skills-table tr:nth-child(even) td { background: #fafbfc; }

@media (max-width: 600px) {
    .abc-field-row, .abc-overall-grid { grid-template-columns: 1fr; }
    .abc-rubric thead th:not(:first-child):not(:last-child) { display: none; }
    .abc-hours-grid { grid-template-columns: 70px 1fr 1fr 80px; }
}

.abc-form-version {
    text-align: right;
    font-size: 0.72rem;
    color: #bbb;
    margin: 20px 0 0;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* ---------------------------------------------------------------------------
   2026 student surveys (employment, experience, externship, alumni)
   --------------------------------------------------------------------------- */

.abc-intro { font-size: 0.9rem; line-height: 1.6; color: #444; margin: 0 0 20px; }
.abc-intro--rule { border-bottom: 1px solid #e4e8ef; padding-bottom: 16px; }

/* Question block: a prompt followed by inline options */
.abc-q { margin-bottom: 20px; }
.abc-q-label { font-weight: 600; font-size: 0.92rem; color: #333; margin: 0 0 8px; display: block; }
.abc-q-label .abc-crit { font-size: 1rem; }

.abc-options { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.abc-options--stack { flex-direction: column; gap: 8px; }
.abc-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    padding: 4px 0;
}
.abc-option input { accent-color: #003d7a; cursor: pointer; transform: scale(1.05); margin: 0; }
.abc-view-mode .abc-option input { pointer-events: none; }
.abc-view-mode .abc-option input:checked + span { font-weight: 700; color: #1d4ed8; }

/* Checkbox grid (e.g. DOP training tools) */
.abc-checkgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}
.abc-checkgrid .abc-option { padding: 2px 0; }

/* Conditional follow-up comment box (revealed on a low rating) */
.abc-low-comment { margin: 10px 0 4px; }
.abc-low-comment label { font-size: 0.85rem; font-weight: 600; color: #444; display: block; margin-bottom: 4px; }
.abc-low-comment textarea {
    width: 100%; min-height: 64px; resize: vertical;
    padding: 8px 10px; border: 1px solid #c8cdd6; border-radius: 4px; font-size: 0.9rem;
}

/* Repeatable group items (e.g. employment positions) */
.abc-repeat-item {
    position: relative;
    border: 1px solid #d0d7e2;
    border-radius: 6px;
    padding: 18px 18px 6px;
    margin-bottom: 16px;
    background: #fafbfc;
}
.abc-repeat-item > h4 { margin: 0 0 14px; font-size: 0.9rem; color: #003d7a; }
.abc-repeat-remove {
    position: absolute; top: 10px; right: 10px;
    width: 26px; height: 26px; line-height: 1;
    border: 1px solid #d0d7e2; border-radius: 50%;
    background: #fff; color: #c0392b; font-size: 1rem; cursor: pointer;
}
.abc-repeat-remove:hover { background: #fdecea; }
.abc-view-mode .abc-repeat-remove { display: none; }
/* Hide the × while there's only one item — nothing to remove down to yet */
[data-repeat-container] .abc-repeat-item:only-child .abc-repeat-remove { display: none; }
.abc-repeat-add {
    display: inline-block;
    background: #eef2f8; color: #003d7a;
    border: 1px solid #cdd8e8; border-radius: 5px;
    padding: 9px 18px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
    margin-bottom: 8px;
}
.abc-repeat-add:hover { background: #e2eaf5; }
.abc-view-mode .abc-repeat-add { display: none; }

/* Rating grid reused by externship surveys = .abc-rubric (already styled).
   In these surveys we always show section totals off — keep them hidden. */

/* Alumni: read-only Code of Ethics block (scroll-contained) */
.abc-ethics-box {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid #d0d7e2;
    border-radius: 6px;
    padding: 6px 20px 14px;
    background: #fafbfc;
    margin-bottom: 24px;
}
.abc-ethics h3 { color: #003d7a; font-size: 0.98rem; margin: 18px 0 6px; border-bottom: 1px solid #e4e8ef; padding-bottom: 4px; }
.abc-ethics h4 { color: #333; font-size: 0.88rem; margin: 12px 0 2px; }
.abc-ethics p  { font-size: 0.86rem; line-height: 1.6; color: #444; margin: 0 0 8px; }

/* A single acknowledgment checkbox row */
.abc-ack {
    display: flex; align-items: flex-start; gap: 10px;
    background: #f4f7fb; border: 1px solid #dbe3ef; border-radius: 6px;
    padding: 14px 16px; margin-bottom: 18px; font-size: 0.9rem; line-height: 1.5;
}
.abc-ack input { margin-top: 3px; accent-color: #003d7a; transform: scale(1.15); }
.abc-ack.abc-field-error { border-color: #c0392b; }

@media (max-width: 600px) {
    .abc-checkgrid { grid-template-columns: 1fr; }
}
