/* SCA Assessment System - Preview UI custom styles */

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* The school's blue. The lighter end is blue-600, not blue-500, so white
   text on the header passes WCAG AA (APP-03). */
.sca-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

.card-hover {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.heatmap-4 { background-color: #dcfce7; color: #166534; }
.heatmap-3 { background-color: #dbeafe; color: #1e40af; }
.heatmap-2 { background-color: #fef9c3; color: #854d0e; }
.heatmap-1 { background-color: #fee2e2; color: #991b1b; }

.status-watch { background-color: #fef3c7; color: #92400e; }
.status-concern { background-color: #ffedd5; color: #9a3412; }
.status-critical { background-color: #fee2e2; color: #991b1b; }

.grade-a { color: #15803d; font-weight: 700; }
.grade-b { color: #2563eb; font-weight: 700; }
.grade-c { color: #ca8a04; font-weight: 700; }
.grade-d { color: #ea580c; font-weight: 700; }
.grade-f { color: #dc2626; font-weight: 700; }

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* ------------------------------------------------------------ APP-03 */

/* Hidden means hidden, even for a .btn: the Calendar, Today and Yesterday
   buttons stay out of sight until their script shows them. */
[hidden] { display: none !important; }

/* A visible outline on whatever has the keyboard's focus. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}

/* One clear main button per page (blue), the rest white, red only for
   removing. All at least 44 px high, so they can be tapped on a phone. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: #1e3a8a; color: #fff; }
.btn-primary:hover { background: #1e40af; }
.btn-secondary { background: #fff; color: #334155; border-color: #94a3b8; }
.btn-secondary:hover { background: #f8fafc; }
.btn-danger { background: #fff; color: #b91c1c; border-color: #fca5a5; }
.btn-danger:hover { background: #fef2f2; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
/* A button that has been pressed and is waiting for the server (forms.js). */
button[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.btn-small { min-height: 44px; padding: 0.375rem 0.75rem; font-weight: 500; }

/* Boxes big enough to tap. */
.field {
  width: 100%;
  min-height: 44px;
  border-radius: 0.375rem;
  border: 1px solid #94a3b8;
  padding: 0.5rem 0.625rem;
  font-size: 1rem;
  background: #fff;
  color: #0f172a;
}
.field[aria-invalid="true"] { border-color: #dc2626; }

/* A tick box with room around it to tap. */
.tick { width: 1.25rem; height: 1.25rem; }

/* Mark entry: rows still without a mark, and the Save bar on a long list. */
.row-empty { background-color: #fffbeb; }
.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 12px -6px rgba(15, 23, 42, 0.15);
}
.score { width: 5.5rem; text-align: right; }
.pct { min-width: 3.25rem; display: inline-block; }

/* A table wider than a phone scrolls inside its box, not the page. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
