/* Combined styles.css (school-themed, merged) */

/* =========================
   Variables / Color System
   =========================#7b1620 */
:root{
  --maroon: #7b1620;
  --gold: #c79a2c;
  --bg: #fafafa;
  --white: #ffffff;
  --black: #0b0b0b;
  --text: #222;
  --border: #ddd;
  --warn: #b06a00;
  --muted: #666;
  --input-bg: #ffffff;
  --input-border: #d1d1d1;
}

/* =========================
   Reset / Base
   ========================= */
*{ box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* =========================
   Layout Container & Header
   ========================= */
.container{
  max-width: 920px;               /* kept from both files */
  width: 90%;
  margin: 28px auto;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: var(--maroon);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  gap: 16px;
}

/* optional .header .logo variation */
.header .logo {
  font-weight: 700;
  color: var(--black);
  font-size: 1.25rem;
}
.logo{
  width:70px;
  height:78px;
  border-radius:10px;
  background: transparent;     /* removed the maroon/gold shape */
  box-shadow: none;            /* remove shadow behind logo */
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;             /* ensure image can't overflow the box */
}

/* make the img fit the .logo container exactly without stretching the parent */
.logo img {
  display:block;
  height: 75px;     /* matches the div height you already have */
  width: auto;      /* keeps the proportions correct */
}

/* =========================
   Progress Bar
   ========================= */
.progress-wrap{
  padding: 14px 22px;
  border-bottom: 1px solid #f0f0f0;
  background: var(--white);
}
.progress-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.progress-label{ font-weight:700; color:var(--maroon); }
.progress-track{
  height:10px;
  background:#eee;
  border-radius:999px;
  overflow:hidden;
  margin-top:8px;
}
.progress-fill{
  height:100%;
  background:var(--maroon);
  width:50%;
  transition:width .3s ease;
}

/* =========================
   Forms
   ========================= */
.form, .form-step {
  padding: 20px 22px 28px 22px;
  background: var(--white);
}

/* form rows & groups */
.form-row { display:flex; gap:16px; margin-bottom:18px; flex-wrap:wrap; }
.form-row .form-group { flex:1; min-width:200px; display:flex; flex-direction:column; }
.form-row { margin-top:12px; } /* preserved earlier spacing */

/* labels */
label, .label { display:block; margin-bottom:6px; margin-top:12px; font-weight:600; color:var(--maroon); font-size:14px; }

/* inputs - unified class names */
.input, input, select, textarea {
  width:100%;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid var(--input-border);
  margin-top:6px;
  font-size:14px;
  background:var(--input-bg);
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  resize:vertical;
  min-height:42px;
}
textarea { min-height:100px; }

/* focus */
.input:focus, input:focus, select:focus, textarea:focus { border-color:var(--maroon); outline:none; box-shadow:none; background:#fffdfa; }

/* number inputs */
/* keep vendor fallbacks for consistent removal of spinner controls */
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
input[type=number]{ -moz-appearance:textfield; appearance:textfield; }

/* =========================
   Tables
   ========================= */
table{ width:100%; border-collapse:collapse; margin-top:12px; font-size:14px; }
th, td{ border:1px solid var(--border); padding:8px; text-align:center; vertical-align:middle; }
th{ background:var(--gold); color:#fff; font-weight:700; }
tr.disabled{ background:#e0e0e0; color:#555; opacity:0.9; }
tr:nth-child(even):not(.disabled){ background:#fbfbfb; }

/* =========================
   Checkboxes
   ========================= */
/* Hide the default checkbox but keep accessibility */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--maroon, #800000);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  cursor: pointer;
  background: white;
  transition: background 0.2s ease, border-color 0.2s ease;
}

/* Hover effect */
input[type="checkbox"]:hover {
  border-color: #a52a2a;
}

/* Show tick or X */
input[type="checkbox"]:checked::after {
  content: "✔"; /* change to "✖" if you prefer X */
  font-size: 14px;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
}

input[type="checkbox"]:checked {
  background-color: var(--maroon, #800000);
  border-color: var(--maroon, #800000);
}

/* Disabled states */
input[type="checkbox"]:disabled {
  border-color: #ccc;
  background: #eee;
  cursor: not-allowed;
}
input[type="checkbox"]:disabled::after {
  color: #999;
}

tr.disabled input[type="checkbox"] {
  cursor: not-allowed;
  opacity: 0.6;
}


/* =========================
   Notes, warnings, tooltip
   ========================= */
.note { font-size:13px; color:var(--muted); margin-top:8px; }
.inline-warning { color:var(--warn); font-size:12px; margin-left:8px; font-weight:600; }

/* tooltip */
.tooltip{ display:inline-flex; align-items:center; gap:8px; margin-top:6px; font-size:13px; color:var(--text); position:relative; }
.tooltip .info{ display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:50%; background:#eee; color:#333; font-weight:700; font-size:12px; border:1px solid #ddd; cursor:pointer; user-select:none; }
.tooltip .text{ display:none; position:absolute; top:28px; left:0; background:#fff; padding:8px 10px; border-radius:8px; border:1px solid #eee; box-shadow:0 6px 18px rgba(0,0,0,0.08); white-space:nowrap; z-index:20; font-size:13px; color:#333; }
.tooltip .info:hover + .text, .tooltip .info:focus + .text { display:block; }
.tooltip .text.visible{ display:block; }

/* =========================
   Actions, buttons & badges (UPDATED FOR BACK / PRIMARY SIZING)
   ========================= */

/* Outer actions container - keep flexible */
.actions{
  display:flex;
  gap:12px;
  justify-content:space-between;
  align-items:center;
  margin-top:18px;
  flex-wrap:wrap;
  padding: 0;
}
.actions .left { margin-right:auto; }

/* Base button: flexible but not forcing equal widths */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:var(--maroon);
  color:#fff;
  padding:10px 18px;      /* base padding */
  border-radius:8px;
  border:0;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  text-align:center;
  transition: all 0.18s ease;
  white-space:nowrap;     /* keep text on one line */
  min-width: 0;           /* allow natural width */
  flex: 0 0 auto;         /* do not force buttons to stretch equally */
  box-sizing: border-box;
}

/* Back / secondary button: smaller visual footprint on larger screens */
.btn.secondary{
  background:#f1f1f1;
  color:var(--text);
  border:1px solid var(--border);
  padding:8px 12px;       /* smaller padding for back button */
  font-weight:600;
  font-size:14px;
  min-width: 110px;
  flex: 0 0 auto;
  text-align: center;
}

/* Primary action (Save & Continue / Submit): auto-size but with sensible minimum */
.btn.btn-primary,
.btn-primary {
  background:var(--maroon);
  color:var(--white);
  padding:10px 20px;      /* slightly larger to fit text comfortably */
  min-width: 150px;       /* ensures laid-out consistency on larger screens */
  flex: 0 0 auto;         /* keeps natural size; won't stretch */
}

/* If you have anchors styled as .btn.secondary left side (e.g. back on left) */
.actions a.btn.secondary { display:inline-flex; }

/* Hover states */
.btn:hover{ opacity: .95; transform: translateY(-1px); }

/* Small / Inline text helpers */
.small{ font-size:13px; color:var(--muted); margin-top:8px; }

/* badges */
.badge{
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  background:var(--gold);
  color:#fff;
  font-weight:600;
  font-size:13px;
}

/* notice */
.notice{
  background:#fff8e0;
  border-left:4px solid var(--gold);
  padding:12px;
  border-radius:6px;
  color:var(--black);
  margin-bottom:12px;
}

/* upload list */
.upload-list{ display:flex; flex-direction:column; gap:12px; margin-top:10px; }
.upload-list label{ display:block; margin-bottom:6px; font-weight:600; }

/* center / helpers */
.center{ text-align:center; padding:28px; }

/* error / validation visuals */
#error_box{ color:#b02a37; font-weight:700; margin-bottom:12px; }
.client-invalid{ border-color:#b02a37 !important; box-shadow: 0 0 0 3px rgba(176,42,55,0.06); }
.field-error{ color:#b02a37; font-size:12px; margin-top:6px; display:none; }

/* =========================
   Small polish & layout helpers
   ========================= */
.form-step { padding: 28px 32px; background: var(--white); }
.form-row { gap:12px; }

/* Review Table Styling */
.review-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 15px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.review-table th {
  background: var(--maroon);
  color: #fff;
  text-align: left;
  width: 35%;
  font-weight: 600;
}

.review-table td {
  border-bottom: 1px solid #eee;
  background: #fff;
}

.review-table tr:nth-child(even) td {
  background: #fafafa;
}

.review-table tr:last-child td {
  border-bottom: none;
}

.review-table a {
  color: var(--maroon);
  text-decoration: none;
  font-weight: 600;
}

.review-table a:hover {
  text-decoration: underline;
}

/* Buttons - Back & Submit */

.btn-back:hover {
  background: #221517;
}
.btn-primary:hover {
  background: #221517;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .review-table th, .review-table td {
    display: block;
    width: 100%;
  }
  .review-table th {
    background: #f5f5f5;
    color: var(--text);
  }
  .actions {
    flex-direction: column;
  }
  .actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* Hide default look, but keep accessibility */
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--maroon, #800000);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  background-color: #fff;
  transition: all 0.2s ease;
}

/* Hover effect */
input[type="radio"]:hover {
  border-color: #a52a2a;
}

/* Checked state with visible symbol */
input[type="radio"]:checked {
  background-color: var(--maroon, #800000);
  border-color: var(--maroon, #800000);
}

input[type="radio"]:checked::after {
  content: "✔"; /* Change to ✖ for an X */
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
}

/* Disabled states */
input[type="radio"]:disabled {
  border-color: #ccc;
  background-color: #eee;
  cursor: not-allowed;
}

input[type="radio"]:disabled::after {
  color: #999;
}

/* visual for disabled inputs/rows */
input[disabled], select[disabled], input[disabled].input {
  opacity: 0.5;
  cursor: not-allowed;
}

/* readonly-but-still-submitted style for previous marks */
.prev-mark-readonly {
  background-color: #f7f7f7;
  opacity: 0.85;
  caret-color: transparent; /* hide caret when readonly */
}

/* error styles */
.field-error.inline { color:#b02a37; font-size:13px; margin-top:6px; }
.client-invalid { outline: 2px solid #b02a37; }

/* make checkbox-disabled rows look disabled */
.row-disabled { opacity: 0.5; pointer-events: none; }


/* =========================
   Responsive Rules
   ========================= */
@media (max-width: 900px) {
  .container { width:95%; }
}
@media (max-width: 720px) {
  .form-row { flex-direction: column; }
}
@media (max-width: 700px) {
  /* On small screens, stack actions and let buttons expand to full width for touch */
  .actions { flex-direction: column; align-items:stretch; gap:10px; }
  .btn, .btn.secondary, .btn.btn-primary, .btn-primary {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
  }
  /* Primary button remains visually prominent */
  .btn.btn-primary, .btn-primary { order: 2; }
  .btn.secondary { order: 1; }
}
@media (max-width: 640px) {
  .actions { flex-direction: column-reverse; align-items:stretch; }
  .tooltip { display:block; margin-top:8px; }
  .tooltip .text { left:0; top:40px; white-space:normal; }
}
@media (max-width: 480px) {
  .header .logo { font-size: 1.1rem; }
  input, select, textarea { font-size:13px; padding:10px; }
  .btn { padding:10px; font-size:13px; }
  .form-step { padding:20px; }
}


/* =========================
   Mobile-first Improvements
   (Style-only, no logic changes)
   ========================= */

/* Improve overall spacing & readability on small screens */
@media (max-width: 640px) {

  body {
    font-size: 14px;
  }

  .container {
    margin: 12px auto;
    border-radius: 10px;
  }

  /* Header refinement */
  .header {
    padding: 12px 14px;
    font-size: 0.95rem;
    gap: 10px;
  }

  .logo {
    width: 54px;
    height: 60px;
  }

  .logo img {
    height: 56px;
  }

  /* Progress bar spacing */
  .progress-wrap {
    padding: 12px 14px;
  }

  /* Form padding reduction */
  .form,
  .form-step {
    padding: 18px 16px 22px 16px;
  }

  label {
    font-size: 13px;
    margin-top: 10px;
  }

  /* Inputs: bigger tap targets */
  input,
  select,
  textarea,
  .input {
    min-height: 46px;
    font-size: 14px;
    padding: 12px;
  }

  textarea {
    min-height: 120px;
  }

  /* Stack form rows cleanly */
  .form-row {
    flex-direction: column;
    gap: 14px;
  }

  /* Buttons: full-width & touch-friendly */
  .actions {
    gap: 10px;
    margin-top: 22px;
  }

  .btn,
  .btn.secondary,
  .btn.btn-primary,
  .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border-radius: 10px;
  }

  /* Make primary action visually dominant */
  .btn-primary {
    font-size: 16px;
  }

  /* Tooltips: readable on mobile */
  .tooltip {
    display: block;
  }

  .tooltip .text {
    width: 100%;
    white-space: normal;
    font-size: 13px;
  }

  /* Tables → card-style layout */
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  table {
    border: none;
  }

  tr {
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  th {
    background: var(--maroon);
    color: #fff;
    text-align: left;
    padding: 10px;
  }

  td {
    border: none;
    border-bottom: 1px solid #eee;
    text-align: left;
    padding: 10px;
  }

  td:last-child {
    border-bottom: none;
  }

  /* Checkboxes & radios: larger hit area */
  input[type="checkbox"],
  input[type="radio"] {
    width: 22px;
    height: 22px;
  }

  input[type="checkbox"]::after,
  input[type="radio"]::after {
    font-size: 13px;
  }
}

/* Extra-small devices (very narrow phones) */
@media (max-width: 420px) {

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-label {
    font-size: 13px;
  }

  .badge {
    font-size: 12px;
    padding: 5px 10px;
  }

  .note,
  .small {
    font-size: 12px;
  }
}

/* =========================
   End of combined stylesheet
   ========================= */
