/* ==========================================================================
   Free-times calendar of a lesson page (mk_booker_block(), js/booker.js):
   compact choices over one week of every tutor's free times, the lesson
   taking shape on a ticket on the right. Built on the homepage tokens (.mk-home).
   ========================================================================== */

.mkb-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- layout ---------- */
.mkb { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.mkb-form { min-width: 0; }
.mk-site .mkb-empty { padding: 0; font: 500 15px/1.55 Montserrat, sans-serif; color: var(--mk-ink-2); }

/* Radio controls keep the native input, visually hidden, for keyboard and screen readers. */
.mkb input[type="radio"] { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }

/* ---------- choices: one line each, label on the left ---------- */
.mkb-filters { display: grid; gap: 10px; margin-bottom: 18px; }
.mkb-row { display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: start; gap: 10px; }
.mk-site .mkb-row-h { padding: 12px 0 0; white-space: nowrap; font: 700 11px/1.3 Montserrat, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--mk-ink-2); }
.mkb-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.mkb-pill { position: relative; }
.mkb-pill span { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--mk-line); font: 600 14px/1 Montserrat, sans-serif; color: var(--mk-ink); white-space: nowrap; cursor: pointer; transition: background-color .15s, color .15s, box-shadow .15s; }
.mkb-pill:hover span { box-shadow: inset 0 0 0 1px var(--mk-tan); }
.mkb-pill input:checked + span { background: var(--mk-navy); box-shadow: none; color: #fbf7f1; }
.mkb-pill input:focus-visible + span { outline: 2px solid var(--mk-gold); outline-offset: 2px; }
.mkb-pill .mkb-ic { width: 16px; height: 16px; margin-left: -3px; color: var(--mk-rust); }
.mkb-pill input:checked + span .mkb-ic { color: #e2c79a; }
/* Grades: square keys, the numerals in a column. */
.mkb-pill--num span { justify-content: center; width: 38px; padding: 0; border-radius: 10px; font-variant-numeric: tabular-nums; }
/* Nobody teaches it / no times there: quieter, still selectable. */
.mkb-pill.is-off span { background: #fbf8f4; color: #a9a197; }
.mkb-pill.is-off input:checked + span { background: #8a93a3; color: #fbf7f1; }

.mkb-tutors { display: grid; grid-auto-flow: column; grid-auto-columns: 214px; gap: 10px; padding: 4px 2px 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; }
.mkb-tutors[hidden] { display: none; }
.mkb-tutor { position: relative; scroll-snap-align: start; }
.mkb-tutor > span { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 12px; align-items: center; height: 100%; padding: 12px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--mk-line); cursor: pointer; transition: box-shadow .15s, background-color .15s; }
.mkb-tutor img, .mkb-tutor i { grid-row: 1 / 3; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; background: var(--mk-cream); }
.mkb-tutor b { font: 700 14.5px/1.25 Montserrat, sans-serif; color: var(--mk-ink); }
.mkb-tutor small { font: 500 12.5px/1.35 Montserrat, sans-serif; color: var(--mk-ink-2); }
.mkb-tutor input:checked + span { background: #fbf7f1; box-shadow: inset 0 0 0 1.5px var(--mk-navy); }
.mkb-tutor:hover > span { box-shadow: inset 0 0 0 1px var(--mk-tan); }
.mkb-tutor input:checked + span:hover { box-shadow: inset 0 0 0 1.5px var(--mk-navy); }
.mkb-tutor input:focus-visible + span { outline: 2px solid var(--mk-gold); outline-offset: 2px; }
.mk-site .mkb-tutors-note { grid-column: 1 / -1; padding: 0; font: 500 14px/1.5 Montserrat, sans-serif; color: var(--mk-ink-2); }

/* ---------- the week of free times ---------- */
.mkb-board { min-width: 0; }
.mkb-week { overflow: hidden; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--mk-line); }
.mkb-week-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--mk-line); }
.mk-site .mkb-week-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 0; }
.mkb-week-title b { font: 700 17px/1.2 Montserrat, sans-serif; color: var(--mk-ink); }
.mkb-week-title span { font: 500 14px/1.2 Montserrat, sans-serif; color: var(--mk-ink-2); }
.mkb-week-nav { display: flex; gap: 6px; }
.mkb-arrow { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--mk-line); color: var(--mk-ink); cursor: pointer; }
.mkb-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mkb-arrow:disabled { opacity: .35; cursor: default; }
.mkb-arrow:not(:disabled):hover { box-shadow: inset 0 0 0 1px var(--mk-navy); }
.mkb-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fbf8f4; border-bottom: 1px solid var(--mk-line); }
.mkb-day { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 9px; border: 0; background: none; font: 700 11px/1.2 Montserrat, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--mk-ink-2); cursor: default; }
.mkb-day b { font: 700 17px/1 Montserrat, sans-serif; letter-spacing: 0; color: var(--mk-ink); font-variant-numeric: tabular-nums; }
.mkb-day.is-past b, .mkb-day.is-past { color: #b9b2a8; }
.mkb-day.is-today b { display: grid; place-items: center; width: 30px; height: 30px; margin-top: -3px; border-radius: 50%; background: var(--mk-navy); color: #fbf7f1; }
.mkb-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: 150px; }
.mkb-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 6px 16px; }
.mkb-col + .mkb-col { box-shadow: inset 1px 0 0 #f1ebe2; }
.mk-site .mkb-col-h { display: none; }
.mk-site .mkb-none { padding: 0; text-align: center; font: 600 14px/1 Montserrat, sans-serif; color: #c9bfb2; }
.mkb-none em { display: none; }

.mkb-time { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; padding: 9px 4px 8px; border: 0; border-radius: 12px; background: var(--mk-cream-2); color: var(--mk-ink); cursor: pointer; transition: background-color .15s, color .15s; }
.mkb-time b { font: 700 15px/1 Montserrat, sans-serif; font-variant-numeric: tabular-nums; }
.mkb-time:hover { background: #ece3d6; }
.mkb-time:focus-visible { outline: 2px solid var(--mk-navy); outline-offset: 2px; }
.mkb-time.is-on { background: var(--mk-navy); color: #fbf7f1; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mk-gold); }
.mkb-time small { font: 600 11px/1.2 Montserrat, sans-serif; color: var(--mk-ink-2); text-align: center; }
.mkb-time.is-on small { color: #e2c79a; }
/* Who is free then: overlapping faces, a count past three. */
.mkb-faces { display: flex; justify-content: center; }
.mkb-faces img, .mkb-faces i { width: 20px; height: 20px; margin-left: -5px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; background: var(--mk-sand); box-shadow: 0 0 0 1.5px var(--mk-cream-2); }
.mkb-faces img:first-child, .mkb-faces i:first-child { margin-left: 0; }
.mkb-faces i { display: grid; place-items: center; font: 700 9px/1 Montserrat, sans-serif; font-style: normal; color: var(--mk-ink); }
.mkb-time.is-on .mkb-faces img, .mkb-time.is-on .mkb-faces i { box-shadow: 0 0 0 1.5px var(--mk-navy); }
.mkb-week-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 20px; border-top: 1px solid var(--mk-line); font: 500 13.5px/1.4 Montserrat, sans-serif; color: var(--mk-ink-2); }
.mk-site .mkb-week-foot a { font-weight: 700; color: var(--mk-ink); border-bottom: 1.5px solid var(--mk-gold); }
.mk-site .mkb-note { padding: 16px 18px; border-radius: 16px; background: #fbf7f1; box-shadow: inset 0 0 0 1px var(--mk-line); font: 500 15px/1.55 Montserrat, sans-serif; color: var(--mk-ink); }
.mk-site .mkb-note a { font-weight: 700; border-bottom: 1.5px solid var(--mk-gold); }

/* ---------- the ticket: the lesson taking shape ---------- */
.mkb-summary { position: sticky; top: calc(var(--mk-header-h, 85px) + 16px); min-width: 0; }
.mkb-ticket { position: relative; overflow: hidden; isolation: isolate; padding: 22px 22px 20px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px var(--mk-line), 0 24px 48px -32px rgba(37, 52, 74, .35); }
/* The brand's stripe set in the corner, as on the homepage hero. */
.mkb-ticket::before { content: ""; position: absolute; top: 0; right: 22px; z-index: -1; width: 46px; height: 34px; background: linear-gradient(90deg, #d7c7b7 0 22%, transparent 22% 26%, #cfa77f 26% 48%, transparent 48% 52%, #d78b58 52% 74%, transparent 74% 78%, #af6a29 78%); }
.mk-site .mkb-ticket-h { padding: 0; font: 700 11px/1.3 Montserrat, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--mk-ink-2); }
.mkb-match { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; align-items: center; margin-top: 16px; }
.mkb-match img, .mkb-match i { grid-row: 1 / 4; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; background: var(--mk-cream); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--mk-tan); }
.mk-site .mkb-match-k { padding: 0; font: 700 11px/1.3 Montserrat, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--mk-rust); }
.mkb-match b { font: 700 19px/1.2 Montserrat, sans-serif; letter-spacing: -.01em; color: var(--mk-ink); }
.mk-site .mkb-match a { justify-self: start; font: 600 13px/1.3 Montserrat, sans-serif; color: var(--mk-ink-2); border-bottom: 1px solid var(--mk-line); }
.mkb-match.is-new img, .mkb-match.is-new i, .mkb-when.is-new .mkb-when-t { animation: mkb-in .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes mkb-in { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.mkb-why { display: grid; gap: 7px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px dashed #e0d6c8; list-style: none; }
.mkb-why li { position: relative; margin: 0; padding: 0 0 0 24px; font: 500 13.5px/1.45 Montserrat, sans-serif; color: var(--mk-ink); }
.mkb-why li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 11px; height: 6px; border-left: 2px solid var(--mk-gold); border-bottom: 2px solid var(--mk-gold); transform: rotate(-45deg); }
.mkb-facts { display: grid; gap: 8px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px dashed #e0d6c8; }
.mkb-facts div { display: flex; justify-content: space-between; gap: 14px; }
.mkb-facts dt { font: 500 13.5px/1.4 Montserrat, sans-serif; color: var(--mk-ink-2); }
.mkb-facts dd { margin: 0; text-align: right; font: 600 13.5px/1.4 Montserrat, sans-serif; color: var(--mk-ink); }
/* The hour's price first, the first lesson as a line under it (as on the tutor pages). */
.mkb-price { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #e0d6c8; }
.mk-site .mkb-price p { padding: 0; font: 600 14px/1.3 Montserrat, sans-serif; color: var(--mk-ink-2); }
.mkb-price p b { font: 700 26px/1 Montserrat, sans-serif; letter-spacing: -.02em; color: var(--mk-ink); font-variant-numeric: tabular-nums; }
.mk-site .mkb-price .mkb-price-intro { margin-top: 6px; font-weight: 500; color: var(--mk-ink); }
.mkb-price .mkb-price-intro b { font: 700 14px/1.3 Montserrat, sans-serif; letter-spacing: 0; }
.mk-site .mkb-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 16px; padding: 16px 18px; border-radius: 14px; background: var(--mk-navy); font: 700 16px/1.2 Montserrat, sans-serif; color: #fbf7f1; text-align: center; transition: background-color .15s; }
.mk-site .mkb-cta:hover { background: #26354a; color: #fbf7f1; }
.mk-site .mkb-fine { margin-top: 12px; padding: 0; font: 500 12.5px/1.5 Montserrat, sans-serif; color: var(--mk-ink-2); }
.mkb-others { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #e0d6c8; }
.mk-site .mkb-others p { padding: 0; font: 600 12.5px/1.4 Montserrat, sans-serif; color: var(--mk-ink-2); }
.mkb-others ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.mkb-others li { margin: 0; padding: 0; }
.mkb-others button { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px; border: 0; border-radius: 999px; background: var(--mk-cream-2); font: 600 13px/1.2 Montserrat, sans-serif; color: var(--mk-ink); cursor: pointer; }
.mkb-others button:hover { background: #ece3d6; }
.mkb-others img, .mkb-others i { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; background: var(--mk-sand); }
.mkb-hint { display: grid; gap: 10px; margin-top: 14px; }
.mk-site .mkb-hint p { padding: 0; font: 500 14px/1.5 Montserrat, sans-serif; color: var(--mk-ink); }
.mkb-hint b { font-weight: 700; }
.mkb-soon { justify-self: start; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--mk-cream-2); font: 500 14px/1.4 Montserrat, sans-serif; color: var(--mk-ink); text-align: left; cursor: pointer; }
.mkb-soon:hover { background: #ece3d6; }
.mk-site .mkb-lost { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #fbf7f1; font: 500 13.5px/1.45 Montserrat, sans-serif; color: var(--mk-ink); }

/* A time picked before the grade or subject: the time, who is free, the question. */
.mkb-when { margin-top: 14px; }
.mk-site .mkb-when-d { padding: 0; font: 600 14px/1.3 Montserrat, sans-serif; color: var(--mk-ink-2); }
.mk-site .mkb-when-t { margin-top: 2px; padding: 0; font: 700 34px/1.05 Montserrat, sans-serif; letter-spacing: -.02em; color: var(--mk-ink); font-variant-numeric: tabular-nums; }
.mk-site .mkb-when-who { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 0; font: 600 13.5px/1.3 Montserrat, sans-serif; color: var(--mk-ink); }
.mkb-when-who .mkb-faces img, .mkb-when-who .mkb-faces i { width: 26px; height: 26px; margin-left: -7px; box-shadow: 0 0 0 2px #fff; }
.mkb-when-who .mkb-faces img:first-child, .mkb-when-who .mkb-faces i:first-child { margin-left: 0; }
.mkb-when-who .mkb-faces i { font-size: 10px; }
.mkb-ask { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #e0d6c8; }
.mk-site .mkb-ask-q { padding: 0; font: 700 15px/1.3 Montserrat, sans-serif; color: var(--mk-ink); }
.mk-site .mkb-ask-q + .mkb-ask-opts { margin-top: 10px; }
.mkb-ask-opts + .mkb-ask-q { margin-top: 16px; }
.mkb-ask-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.mkb-ask-opt { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 15px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--mk-line); font: 600 14px/1 Montserrat, sans-serif; color: var(--mk-ink); cursor: pointer; transition: background-color .15s, color .15s, box-shadow .15s; }
.mkb-ask-opt:hover { background: var(--mk-navy); box-shadow: none; color: #fbf7f1; }
.mkb-ask-opt:focus-visible { outline: 2px solid var(--mk-gold); outline-offset: 2px; }
.mk-site .mkb-noscript { grid-column: 1 / -1; padding: 16px 18px; border-radius: 14px; background: #fbf7f1; font: 500 15px/1.5 Montserrat, sans-serif; }
@media (min-width: 901px) { .mkb-bar { display: none !important; } }

/* ---------- phones: a bar with the booking button ---------- */
.mkb-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -1px 0 var(--mk-line), 0 -12px 30px -18px rgba(37, 52, 74, .4); }
.mkb-bar[hidden] { display: none; }
@media (max-width: 900px) {
  body:has(.mkb-bar:not([hidden])) .joinchat { bottom: calc(120px + env(safe-area-inset-bottom)); }
}
.mk-site .mkb-bar p { flex: 1; min-width: 0; padding: 0; font: 600 14px/1.3 Montserrat, sans-serif; color: var(--mk-ink); }
.mkb-bar p small { display: block; font-weight: 500; color: var(--mk-ink-2); }
.mkb-bar .mkl-btn { flex: none; }

/* ---------- narrower screens ---------- */
@media (max-width: 1100px) {
  .mkb { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
}
@media (max-width: 900px) {
  .mkb { grid-template-columns: minmax(0, 1fr); }
  .mkb-summary { position: static; }
  .mkb-ticket { scroll-margin-top: 16px; }
  /* One day at a time: the day strip picks it. */
  .mkb-day { cursor: pointer; border-radius: 12px; }
  .mkb-day.has-times::after { content: ""; width: 5px; height: 5px; margin-top: 1px; border-radius: 50%; background: var(--mk-rust); }
  .mkb-day.is-active { background: #fff; box-shadow: inset 0 0 0 1.5px var(--mk-navy); }
  .mkb-days { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 8px; }
  .mkb-cols { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .mkb-col { display: none; padding: 16px; }
  .mkb-col.is-active { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); align-content: start; gap: 8px; }
  .mk-site .mkb-col-h { display: block; grid-column: 1 / -1; padding: 0; font: 700 14.5px/1.3 Montserrat, sans-serif; color: var(--mk-ink); }
  .mk-site .mkb-none { grid-column: 1 / -1; text-align: left; font-size: 14px; color: var(--mk-ink-2); }
  .mkb-none span { display: none; }
  .mkb-none em { display: inline; font-style: normal; }
  .mkb-time { padding: 11px 6px 10px; }
}
@media (max-width: 700px) {
  /* Label over its choices; places and tutors scroll sideways instead of stacking up. */
  .mkb-row { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .mk-site .mkb-row-h { padding: 0; }
  .mkb-row:not(.mkb-row--grades) .mkb-pills { flex-wrap: nowrap; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .mkb-row:not(.mkb-row--grades) .mkb-pills::-webkit-scrollbar { display: none; }
  .mkb-pill { flex: none; }
  .mkb-tutors { margin: 0 -16px; padding: 4px 16px 8px; }
  .mkb-sec { padding-bottom: 96px; }
  .mk-site .mkb-when-t { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .mkb-match.is-new img, .mkb-match.is-new i, .mkb-when.is-new .mkb-when-t { animation: none; }
}
