/* Office-hours booking: scheduler, details form, confirmation, manage + admin pages.
   Uses the site palette from site.css (navy accent, pale-blue tint, red stripe). */
.bk { --bk-red: #85192c; --bk-red-tint: #f7eef0; font-family: var(--serif); color: var(--ink); background: #fff; border: 1px solid var(--rule); }
.bk *, .bk *::before, .bk *::after { box-sizing: border-box; }
.bk-pane { padding: 28px 30px 30px; }
.bk-preview { margin: 0; padding: 10px 30px; background: var(--accent-tint); border-bottom: 1px solid var(--rule); font-size: 14px; font-style: italic; color: var(--ink-soft); }
.bk-status { padding: 60px 24px; text-align: center; font-style: italic; color: var(--muted); }
.bk-kicker { margin: 0 0 6px; font: 700 11px/1.2 Arial, Helvetica, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.bk-h { margin: 0 0 4px; font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.15; color: var(--accent-ink); }
.bk-sub { margin: 0; font-size: 15px; color: var(--muted); font-style: italic; }

/* Step 1: calendar + times */
.bk-pick { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 34px; margin-top: 22px; }
.bk-cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.bk-cal-head span { text-align: center; font: 700 11px/1 Arial, Helvetica, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.bk-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.bk-day { appearance: none; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 3px; min-height: 62px; padding: 8px 4px 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.bk-day b { font: 600 19px/1 var(--serif); font-feature-settings: "tnum"; }
.bk-day small { font-size: 11px; line-height: 1; color: var(--muted); font-style: italic; white-space: nowrap; }
.bk-day:hover:not([disabled]) { background: var(--accent-tint); border-color: var(--accent); }
.bk-day:focus-visible, .bk-time:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.bk-day[disabled] { cursor: default; background: var(--paper-warm); color: #a3acb8; border-color: var(--rule-soft); }
.bk-day[disabled] small { color: #a3acb8; }
.bk-day.is-blank { visibility: hidden; }
.bk-day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.bk-day[aria-pressed="true"] small { color: #d6e3f2; }
.bk-day.is-today:not([aria-pressed="true"]) b { text-decoration: underline; text-decoration-color: var(--bk-red); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.bk-legend { margin: 12px 0 0; font-size: 13px; font-style: italic; color: var(--muted); }
.bk-day.is-later[disabled] { background: repeating-linear-gradient(135deg, var(--accent-tint) 0 6px, #fff 6px 12px); border: 1px dashed var(--accent); color: var(--accent-ink); }
.bk-day.is-later[disabled] small { color: var(--accent); font-weight: 600; white-space: normal; line-height: 1.15; text-align: center; }
.bk-key { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
.bk-key li { display: flex; align-items: flex-start; gap: 9px; }
.bk-swatch { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 3px; background: #fff; border: 1px solid var(--rule); }
.bk-swatch.is-off { background: var(--paper-warm); border-color: var(--rule-soft); }
.bk-swatch.is-later { background: repeating-linear-gradient(135deg, var(--accent-tint) 0 4px, #fff 4px 8px); border: 1px dashed var(--accent); }

.bk-times-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--rule); }
.bk-times-head h3 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--accent-ink); }
.bk-times-head span { font-size: 13px; font-style: italic; color: var(--muted); }
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 380px; overflow: auto; padding: 2px; }
.bk-time { appearance: none; font: 600 15px/1 var(--serif); font-feature-settings: "tnum"; color: var(--accent); background: #fff; border: 1px solid var(--accent); border-radius: 3px; min-height: 44px; cursor: pointer; transition: background .15s, color .15s; }
.bk-time:hover { background: var(--accent-tint); color: var(--accent-ink); }
.bk-time[aria-pressed="true"] { background: var(--accent); color: #fff; }
.bk-empty { margin: 0; padding: 18px 0; font-style: italic; color: var(--muted); }

/* Notes */
.bk-note { margin: 18px 0 0; padding: 13px 16px; background: var(--accent-tint); border-left: 3px solid var(--bk-red); font-style: italic; font-size: 15px; line-height: 1.55; }
.bk-note b { font-style: normal; }
.bk-alert { margin: 0 0 18px; padding: 12px 16px; background: var(--bk-red-tint); border-left: 3px solid var(--bk-red); font-size: 15px; line-height: 1.5; }
.bk-alert:empty { display: none; }

/* Step 2: details form */
.bk-chosen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 14px 18px; margin: 20px 0 24px; background: var(--accent-tint); border: 1px solid #c9d9ec; }
.bk-chosen p { margin: 0; font-size: 17px; }
.bk-chosen p b { color: var(--accent-ink); }
.bk-link { appearance: none; background: none; border: 0; padding: 4px 0; font: italic 15px var(--serif); color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bk-link:hover { color: var(--accent-ink); }
.bk-form { display: grid; gap: 18px; }
.bk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.bk-field { display: grid; gap: 6px; align-content: start; }
.bk-field label, .bk-field .bk-label { font: 700 12px/1.3 Arial, Helvetica, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.bk-field .bk-opt { font-weight: 400; letter-spacing: 0; text-transform: none; font: italic 13px var(--serif); color: var(--muted); margin-left: 6px; }
.bk-field input[type=text], .bk-field input[type=email], .bk-field input[type=number], .bk-field input[type=url], .bk-field input[type=date], .bk-field input[type=time], .bk-field select, .bk-field textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 3px; padding: 10px 12px; min-height: 46px;
}
.bk-field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.bk-field input:focus, .bk-field select:focus, .bk-field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--accent); }
.bk-field [aria-invalid="true"] { border-color: var(--bk-red); background: #fffafa; }
.bk-err { margin: 0; font-size: 14px; color: var(--bk-red); font-style: italic; }
.bk-err:empty { display: none; }
.bk-hint { margin: 0; font-size: 13px; color: var(--muted); font-style: italic; }
.bk-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px; border: 1px dashed var(--rule); border-radius: 3px; background: var(--paper-warm); }
.bk-file input { font: 14px var(--serif); max-width: 100%; }
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 6px; }
.bk-actions .bk-hint { flex: 1 1 240px; }

/* Step 3: confirmation */
.bk-done { max-width: 640px; }
.bk-seal { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.bk-dl { margin: 22px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); border-top: 1px solid var(--rule); }
.bk-dl dt, .bk-dl dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.bk-dl dt { padding-right: 26px; font: 700 11px/1.9 Arial, Helvetica, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.bk-dl dd { font-size: 16px; overflow-wrap: anywhere; }
.bk-dl a, .bk-done a { color: var(--accent); }

/* Steps indicator in the section head */
.booking-steps li.is-current { color: var(--accent-ink); font-weight: 600; }
.booking-steps li.is-current span { background: var(--accent); color: #fff; }
.booking-steps li.is-done span { background: var(--accent-tint); }

@media (max-width: 820px) {
  .bk-pick { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .bk-times { max-height: none; }
}
@media (max-width: 520px) {
  .bk-pane { padding: 20px 16px 22px; }
  .bk-preview { padding: 10px 16px; }
  .bk-cal, .bk-cal-head { gap: 4px; }
  .bk-day { min-height: 54px; padding: 6px 2px; }
  .bk-day b { font-size: 16px; }
  .bk-day small { font-size: 10px; }
  .bk-dl { grid-template-columns: minmax(0, 1fr); }
  .bk-dl dt { padding-bottom: 0; border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .bk-day, .bk-time { transition: none; } }

/* Manage page: student files */
.bk-files { margin: 22px 0 8px; padding: 20px 22px 22px; border: 2px solid var(--bk-red); border-radius: 3px; }
.bk-files .bk-kicker { color: var(--bk-red); margin-bottom: 12px; }
.bk-files .bk-file { margin-top: 12px; }
.bk-files .bk-hint { margin-top: 8px; }
.bk-files .bk-note { margin-top: 16px; }
.bk-files-empty { margin: 0; font-size: 17px; line-height: 1.55; }
.bk-filelist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.bk-filelist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.bk-fname { font-weight: 600; overflow-wrap: anywhere; }
.bk-fmeta { font-size: 14px; color: var(--muted); font-style: italic; }
.bk-filelist .bk-link { margin-left: auto; }
.bk-files-prof { border-color: var(--accent); }
.bk-files-prof .bk-kicker { color: var(--accent); }
.bk-fname a { color: var(--accent); }
.bk-purpose { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.bk-purpose legend { padding: 0; margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.bk-purpose label { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; cursor: pointer; }
.bk-purpose input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--accent); }
.bk-profnote { flex-basis: 100%; margin-top: 6px; padding: 10px 14px; background: var(--accent-tint); font-size: 15px; line-height: 1.55; }
.bk-profnote p { margin: 0 0 8px; } .bk-profnote p:last-child { margin-bottom: 0; } .bk-profnote a { color: var(--accent); }
.bk-filelist .bk-profnote ul, .bk-filelist .bk-profnote ol { margin: 4px 0 8px; padding-left: 22px; border: 0; }
.bk-filelist .bk-profnote li { display: list-item; padding: 2px 0; border: 0; }
/* Booking form: file upload block */
.bk-upload-block { padding: 20px 22px 6px; border: 2px solid var(--bk-red); border-radius: 3px; background: var(--paper-warm); }
.bk-upload-title { margin: 0 0 14px; font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--bk-red); }
.bk-upload-title .bk-opt { font-family: var(--serif); }
.btn.btn-red { background: var(--bk-red); border-color: var(--bk-red); color: #fff; }
.btn.btn-red:hover { background: #6a1423; border-color: #6a1423; color: #fff; }
.bk-field .bk-purpose label { font: 400 15px/1.5 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); }
.bk-field .bk-purpose legend { font: 600 16px/1.4 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); }
.bk-upload-block .bk-upload-title .bk-opt { font: italic 400 15px var(--serif) !important; color: var(--muted) !important; margin-left: 10px; letter-spacing: 0; text-transform: none; vertical-align: middle; }
.bk-mailnote { margin: 4px 0 6px; padding: 16px 20px; border: 2px solid var(--bk-red); border-radius: 3px; background: var(--paper-warm); font-size: 17px; line-height: 1.55; }
.bk-mailnote p { margin: 0 0 10px; } .bk-mailnote p:last-child { margin-bottom: 0; }
.bk-done:focus { outline: none; }
/* Upload blocks: blue accents */
.bk-upload-block, .bk-files { border-color: var(--accent); }
.bk-upload-title, .bk-files .bk-kicker { color: var(--accent); }
/* My appointments (11/15/2026) */
.bk-filelist li.bk-mine { display: block; padding: 14px 0; }
.bk-mine p { margin: 4px 0 0; }
.bk-filelist .bk-mine .bk-link { margin-left: 0; display: inline-block; margin-top: 8px; }
.bk [hidden] { display: none !important; }
.bk-confirm { margin: 0 0 24px; padding: 18px 20px; border: 2px solid #85192c; background: #fff; }
.bk-confirm p { margin: 8px 0 0; }
.bk-confirm .bk-actions { margin-top: 16px; }
.bk-notenrolled { display: flex; gap: 10px; align-items: flex-start; margin: -6px 0 18px; font-size: 16px; line-height: 1.45; cursor: pointer; }
.bk-notenrolled input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.bk-form .bk-confirm { margin: 0 0 22px; }

/* "Not enrolled" warning (Lou, 11/15): a raised, animated 3-D card that sits above the form rather than in it. */
.bk-warn3d-stage { perspective: 1000px; margin: 4px 0 30px; }
.bk-warn3d {
  position: relative; transform-origin: 50% 0; transform-style: preserve-3d;
  padding: 20px 22px 20px 74px; border-radius: 8px;
  background: linear-gradient(160deg, #ffffff 0%, #fdf6f7 55%, #f7e9ec 100%);
  border: 1px solid #e6c9cf; border-top: 6px solid #85192c;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(20, 50, 90, .10), 0 12px 24px -10px rgba(133, 25, 44, .45), 0 34px 60px -24px rgba(20, 50, 90, .45);
  animation: bkWarnIn .75s cubic-bezier(.18, .9, .22, 1.18) both, bkWarnFloat 5s ease-in-out .9s infinite;
}
.bk-warn3d::after { /* a soft shadow on the "table" below the card */
  content: ""; position: absolute; left: 6%; right: 6%; bottom: -18px; height: 18px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 50, 90, .28), transparent); filter: blur(2px); z-index: -1;
  animation: bkWarnShadow 5s ease-in-out .9s infinite;
}
.bk-warn3d p { margin: 0; font-size: 17px; line-height: 1.55; color: #1b2430; }
.bk-warn3d-icon {
  position: absolute; left: 20px; top: 50%; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font: 700 22px/1 Georgia, serif; color: #fff;
  background: radial-gradient(circle at 35% 30%, #b8324a, #85192c 70%); box-shadow: 0 4px 10px -2px rgba(133, 25, 44, .6), inset 0 -2px 3px rgba(0, 0, 0, .25);
}
.bk-warn3d-icon::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(133, 25, 44, .45); animation: bkWarnPulse 2.2s ease-out 1s infinite; }
@keyframes bkWarnIn {
  0% { opacity: 0; transform: rotateX(-82deg) translateY(-18px) scale(.94); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: rotateX(0) translateY(0) scale(1); }
}
@keyframes bkWarnFloat { 0%, 100% { transform: translateY(0) rotateX(0); } 50% { transform: translateY(-4px) rotateX(2deg); } }
@keyframes bkWarnShadow { 0%, 100% { opacity: 1; transform: scaleX(1); } 50% { opacity: .65; transform: scaleX(.94); } }
@keyframes bkWarnPulse { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
@media (max-width: 560px) { .bk-warn3d { padding: 66px 18px 18px; } .bk-warn3d-icon { left: 50%; top: 16px; margin: 0 0 0 -19px; } }
@media (prefers-reduced-motion: reduce) { .bk-warn3d, .bk-warn3d::after, .bk-warn3d-icon::before { animation: none; } }
/* Phones (11/15): keep every field inside the card (the grid used to grow wider than the screen and cut fields off on the right). */
.bk-form { grid-template-columns: minmax(0, 1fr); }
.bk-row { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.bk-field > * { min-width: 0; }
.bk-field input[type=file] { max-width: 100%; }

/* "Already graded" (Lou, 11/19) */
.bk-graded { margin: 0; }
.bk-graded label { display: inline-flex; margin-right: 22px; }
.bk-graded-more { display: grid; gap: 18px; padding: 16px 18px; border-left: 3px solid var(--accent, #1f4a7a); background: var(--accent-tint, #e8f0f9); }
.bk-graded-more > div[data-graded-other] { display: grid; gap: 18px; }
.bk-graded-more [hidden] { display: none !important; }
.bk-field.bk-graded label { font: 400 16px/1.5 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); gap: 8px; align-items: center; }
.bk-field.bk-graded legend { font: 600 16px/1.4 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); margin-bottom: 6px; }
.bk [data-upload-block][hidden] { display: none !important; }
.bk-fineprint { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted, #5b6675); }

/* No-show list (Lou, 11/20) */
.bk-noshow { margin: 0 0 22px; padding: 16px 20px; border: 2px solid #85192c; border-radius: 4px; background: #fbf3f4; }
.bk-noshow h4 { margin: 0 0 6px; font: 600 19px/1.3 var(--serif); color: #85192c; }
.bk-noshow p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink); }
.bk [data-noshow][hidden] { display: none !important; }
.bk-form.is-noshow [data-not-enrolled-warning] { display: none !important; } /* one message at a time */
