/* The clinic: styles for its worked example only. Shared pieces (fields, letter) are in ../styles.css.
   Every selector here starts with .cl- so nothing leaks into the other businesses. */

/* Shared status tag for proposed / not scheduled */
.cl-tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; border: 2px dashed var(--ink); background: var(--white); font-size: 0.76rem; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.cl-tag.is-ok { border-style: solid; border-color: var(--green); color: var(--green-deep); background: var(--green-wash); }

/* ---------- Next week's diary ---------- */

/* Next week's diary */
.cl-cal { width: 100%; margin-top: 12px; border-collapse: separate; border-spacing: 4px; table-layout: fixed; font-size: 0.86rem; }
.cl-cal caption { caption-side: top; text-align: left; padding: 0 4px 4px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.cl-cal th { padding: 2px; font-weight: 700; text-align: center; }
.cl-cal .cl-corner { width: 3.2em; }
.cl-cal th[scope="row"] { width: 3.2em; padding-right: 6px; text-align: right; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cl-cal th.is-blocked { color: var(--ink-soft); font-weight: 600; }
.cl-cal th.is-blocked s { text-decoration-thickness: 2px; text-decoration-color: var(--brick); }
.cl-cell { height: 52px; padding: 3px; border-radius: 8px; background: var(--white); box-shadow: inset 0 0 0 1.5px rgba(34, 50, 44, 0.28); text-align: center; vertical-align: middle; }
.cl-cell.is-busy { background: repeating-linear-gradient(-45deg, var(--paper-2) 0 6px, var(--paper) 6px 12px); box-shadow: none; }
.cl-cell.is-blocked { background: rgba(34, 50, 44, 0.07); box-shadow: none; }
.cl-cell.is-alt { background: var(--white); box-shadow: inset 0 0 0 2px var(--green); outline: 2px dashed var(--green); outline-offset: -6px; }
.cl-alt { font-size: 0.74rem; font-weight: 700; color: var(--green-deep); }
.cl-appt { display: grid; gap: 1px; padding: 6px 4px; border-radius: 8px; border: 2px dashed var(--ink); background: var(--mustard); line-height: 1.15; transition: box-shadow 0.18s ease; }
.cl-appt b { font-size: 0.8rem; }
.cl-appt small { font-size: 0.74rem; font-weight: 700; }
.cl-appt.hot { box-shadow: 0 0 0 3px var(--ink); }

.cl-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; padding-left: 4px; font-size: 0.8rem; color: var(--ink-soft); }
.cl-key > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cl-sw { width: 14px; height: 14px; border-radius: 4px; }
.cl-sw-free { background: var(--white); box-shadow: inset 0 0 0 1.5px rgba(34, 50, 44, 0.35); }
.cl-sw-busy { background: repeating-linear-gradient(-45deg, var(--paper-2) 0 3px, var(--paper) 3px 6px); box-shadow: inset 0 0 0 1px rgba(34, 50, 44, 0.25); }
.cl-sw-prop { background: var(--mustard); border: 2px dashed var(--ink); }
.cl-sw-alt { background: var(--white); border: 2px dashed var(--green); }

/* The appointment slip: stub on the left, details on the right */
.cl-ticket { display: grid; grid-template-columns: auto minmax(0, 1fr); margin-top: 14px; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--white); box-shadow: 3px 4px 0 var(--mustard-wash); overflow: hidden; transition: box-shadow 0.18s ease; }
.cl-ticket.hot { box-shadow: 0 0 0 3px var(--ink); }
.cl-stub { display: grid; align-content: center; justify-items: center; gap: 0; min-width: 5.2em; padding: 10px 12px; background: var(--mustard); border-right: 2px dashed var(--ink); }
.cl-stub-d { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.cl-stub-t { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.6rem; line-height: 1.05; }
.cl-tix { display: grid; gap: 2px; justify-items: start; padding: 10px 14px 12px; line-height: 1.35; }
.cl-tix-who { font-weight: 700; }
.cl-tix-what { font-size: 0.94rem; }
.cl-tix-alt { font-size: 0.88rem; color: var(--green-deep); font-weight: 600; }
.cl-tix .cl-tag { margin-top: 6px; }

/* Why this slot fits the email */
.cl-fits li + li { border-top: 1px solid rgba(34, 50, 44, 0.12); }
.cl-fit { width: 100%; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px; border: 0; border-radius: 6px; background: transparent; text-align: left; line-height: 1.35; cursor: pointer; }
.cl-fit:hover, .cl-fit:focus-visible, .cl-fit.hot { background: var(--mustard-wash); }
.cl-fit-ck { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; border: 2px solid var(--ink); background: var(--green-wash); }
.cl-fit-ck .tiny path { stroke-width: 2.4; }
.cl-fit-l { font-weight: 600; }
.cl-fit-v { font-size: 0.86rem; color: var(--ink-soft); font-weight: 600; text-align: right; }

/* ---------- The reminder ---------- */
.cl-mail-note { margin-top: 10px; font-size: 0.86rem; color: var(--ink-soft); }

/* When it goes: nothing moves until the booking is confirmed */
.cl-track { position: relative; display: grid; gap: 8px; margin-top: 14px; }
.cl-track li { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; line-height: 1.35; }
.cl-track li + li::before { content: ""; position: absolute; left: 8px; top: -9px; height: 10px; border-left: 2px dotted rgba(34, 50, 44, 0.4); }
.cl-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); }
.cl-track .is-wait .cl-dot { background: var(--mustard); }
.cl-track .is-later { color: var(--ink-soft); }
.cl-track .is-later .cl-dot { border-style: dashed; border-color: rgba(34, 50, 44, 0.55); }
.cl-track-l { font-weight: 600; font-size: 0.94rem; }
.cl-track-s { font-size: 0.8rem; font-weight: 700; }
.cl-track .is-wait .cl-track-s { color: var(--brick); }

/* Motion, as the diary opens (none with reduced motion). */
.anim .cl-appt.reveal { animation: flyin 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) 0.15s backwards; }

@media (max-width: 600px) {
  .cl-cal { border-spacing: 3px; font-size: 0.8rem; }
  .cl-cal .cl-corner, .cl-cal th[scope="row"] { width: 2.8em; padding-right: 3px; }
  .cl-cell { height: 44px; padding: 2px; }
  .cl-stub { min-width: 4.4em; padding: 8px; }
  .cl-stub-t { font-size: 1.35rem; }
  .cl-fit { grid-template-columns: 22px minmax(0, 1fr); gap: 0 8px; padding: 6px 8px; }
  .cl-fit-v { grid-column: 2; text-align: left; }
  /* Too narrow for words inside the diary cells: the colours carry it, explained by the key below */
  .cl-appt small, .cl-alt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cl-appt { padding: 8px 1px; }
  .cl-appt b { font-size: 0.8rem; }
}
