/* Campus Cuts client appointments: My appointments (appointments.html) and Appointment details (appointment.html).
   Built on tokens.css and chrome.css (card, status-banner, countdown, btn, field, est, modal, toast).
   Only tokens.css variables and fonts. Phone first: cards are full width lists at phone size, past cards sit 2-up. */

.ap { overflow-x: clip; }
.ap-main {
  position: relative; isolation: isolate; display: block; min-height: 72vh;
  padding: calc(var(--top-h) + clamp(28px, 5vw, 64px)) 0 clamp(72px, 10vw, 128px);
}
.ap-main:focus { outline: none; }
.ap-main::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 auto 0; height: 720px; pointer-events: none;
  background:
    radial-gradient(60% 70% at 88% 0%, rgba(107, 63, 168, .34), transparent 70%),
    radial-gradient(40% 40% at 0% 10%, rgba(255, 59, 78, .07), transparent 70%);
}

/* ---------- page heads ---------- */
.ap-kick {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font: 500 12px/1.3 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--violet);
}
.ap-kick::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .7; }
.ap-kick b { color: var(--paper); font-weight: 700; letter-spacing: .08em; }
.ap-h1 {
  margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(46px, 12.4vw, 136px); line-height: .86; letter-spacing: -.005em; color: var(--paper);
  text-wrap: balance; overflow-wrap: anywhere;
}
.ap-h1 em { font-style: normal; color: var(--violet); }
.ap-h1--detail { font-size: clamp(40px, 9.6vw, 104px); }
.ap-sub { margin: 14px 0 0; font: 500 14px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ap-sub b { color: var(--paper); font-weight: 700; }
.ap-lede { margin: 0; max-width: 44ch; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.5; color: var(--muted); }

/* the barber pole: a thin striped rule that turns slowly */
.ap-pole {
  display: block; width: min(260px, 60%); height: 6px; margin: clamp(20px, 3vw, 30px) 0; border-radius: 3px;
  background: repeating-linear-gradient(-45deg, var(--neon) 0 8px, var(--paper) 8px 16px, var(--plum) 16px 24px, var(--paper) 24px 32px);
  background-size: 45.25px 45.25px;
  box-shadow: 0 0 18px rgba(255, 59, 78, .25);
  opacity: .9;
}
@media (prefers-reduced-motion: no-preference) {
  .ap-pole { animation: ap-pole 2.4s linear infinite; }
}
@keyframes ap-pole { to { background-position: 45.25px 0; } }

.ap-head__row { display: grid; gap: 22px; align-items: end; }
.ap-head__cta { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) {
  .ap-head__row { grid-template-columns: 1fr auto; }
}
@media (max-width: 520px) {
  .ap-head__cta .btn { flex: 1 1 0; padding-inline: 14px; }
}

/* ---------- sections ---------- */
.ap-list { margin-top: clamp(36px, 5vw, 60px); }
.ap-sec + .ap-sec { margin-top: clamp(40px, 6vw, 64px); }
.ap-sec__h {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px;
  font: 800 clamp(26px, 3.4vw, 36px)/1 var(--f-display); letter-spacing: .05em; text-transform: uppercase;
}
.ap-sec__n {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  border: 1px solid var(--line-2); font: 700 12px/1 var(--f-mono); letter-spacing: .04em; color: var(--muted);
}
.ap-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .ap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
.ap-grid--past { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .ap-grid--past { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1140px) { .ap-grid--past { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- chair avatar: the chair number in the chair color ---------- */
.ap-av {
  --c: var(--violet); --s: 52px;
  position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 50%;
  display: grid; place-items: center; align-content: center; gap: 1px;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 34%, transparent), color-mix(in srgb, var(--c) 10%, var(--ink-3)) 70%);
  border: 2px solid var(--c); color: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 14%, transparent);
}
.ap-av__k { font: 700 8px/1 var(--f-mono); letter-spacing: .14em; opacity: .8; }
.ap-av__n { font: 900 calc(var(--s) * .46)/.9 var(--f-display); }
.ap-av--sm { --s: 34px; box-shadow: none; border-width: 1.5px; }
.ap-av--sm .ap-av__k { display: none; }
.ap-av--lg { --s: 64px; }

/* ---------- appointment card ---------- */
.ap-card {
  position: relative; display: flex; flex-direction: column; gap: 16px; min-width: 0;
  transition: border-color .25s, box-shadow .35s var(--ease-out), transform .35s var(--ease-out);
}
.ap-card > .status-banner { margin-bottom: 0; }
.ap-card:hover { border-color: var(--line-2); box-shadow: 0 24px 60px -32px rgba(0, 0, 0, .9); }
.ap-card__top { display: flex; align-items: flex-start; gap: 14px; }
.ap-card__who { flex: 1; min-width: 0; padding-top: 2px; }
.ap-card__barber { margin: 0; font: 800 22px/1.02 var(--f-display); letter-spacing: .04em; text-transform: uppercase; overflow-wrap: anywhere; }
.ap-card__chair { margin: 6px 0 0; font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ap-card__when {
  margin: 0; font: 800 clamp(24px, 6.6vw, 30px)/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; color: var(--paper);
}
.ap-card__when .at { color: var(--muted); font-weight: 700; }
.ap-card__svc { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.4; }
.ap-card__svc b { color: var(--paper); font-weight: 600; }
.ap-card__note {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: var(--r-s);
  background: rgba(227, 184, 102, .08); border: 1px solid rgba(227, 184, 102, .28); color: var(--paper); font-size: 14px; line-height: 1.45;
}
.ap-card__note svg { flex: none; margin-top: 1px; color: var(--brass); }
.ap-card__note--declined { background: rgba(244, 241, 234, .05); border-color: var(--line-2); }
.ap-card__note--declined svg { color: var(--muted); }
.ap-card__acts { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.ap-card__view { flex: 1 1 auto; min-width: 0; }

/* round icon button: call the shop */
.ap-icon {
  position: relative; flex: none; width: 48px; height: 48px; padding: 0; margin: 0;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--ink-3); color: var(--paper); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s, color .2s, background-color .2s, transform .25s var(--ease-out);
}
.ap-icon:hover { border-color: var(--violet); color: var(--violet); transform: translateY(-1px); }
.ap-icon:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

/* compact past cards (2-up on phones) */
.ap-card--past { --card-pad: 14px; gap: 10px; }
.ap-card--past .status-banner { min-height: 32px; padding-block: 7px; font-size: 11px; letter-spacing: .12em; }
.ap-card--past .status-banner > :nth-child(2) { display: none; }
.ap-card--past .ap-card__when { font-size: clamp(20px, 5.4vw, 24px); line-height: 1.02; }
.ap-card--past .ap-card__when .t { display: block; color: var(--muted); font-size: .72em; margin-top: 4px; }
.ap-card--past .ap-card__svc { margin: 0; font-size: 14px; }
.ap-card--past .ap-card__by { margin: 0; display: flex; align-items: center; gap: 8px; font: 500 12px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 0; }
.ap-card--past .ap-card__by span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-card--past .ap-av--sm { --s: 26px; }
.ap-card--past .ap-av--sm .ap-av__n { font-size: 13px; }
.ap-card--past .ap-card__acts { flex-direction: column; align-items: stretch; gap: 8px; }
.ap-card--past .btn { padding-inline: 10px; font-size: 14px; letter-spacing: .07em; }

/* entrance and live change */
@media (prefers-reduced-motion: no-preference) {
  .ap-in { animation: ap-rise .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .ap-card.is-flash { animation: ap-flash 1.4s var(--ease-out); }
  .ap-card.is-flash > .status-banner { animation: ap-banner 1.4s var(--ease-out); }
}
@keyframes ap-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes ap-flash { 0% { box-shadow: 0 0 0 0 rgba(165, 124, 255, .0); } 25% { box-shadow: 0 0 0 4px rgba(165, 124, 255, .45); } 100% { box-shadow: 0 0 0 0 rgba(165, 124, 255, 0); } }
@keyframes ap-banner { 0% { filter: brightness(1.8); } 100% { filter: none; } }

/* ---------- empty state ---------- */
.ap-empty {
  position: relative; overflow: hidden; display: grid; gap: 18px; justify-items: start;
  padding: clamp(28px, 5vw, 56px); border: 1px dashed var(--line-2); border-radius: var(--r-l);
  background: linear-gradient(160deg, rgba(107, 63, 168, .16), transparent 60%), var(--ink-2);
}
.ap-empty__big {
  margin: 0; font: 900 clamp(40px, 9vw, 88px)/.88 var(--f-display); text-transform: uppercase; color: var(--paper);
}
.ap-empty__big em { font-style: normal; color: var(--violet); }
.ap-empty__p { margin: 0; max-width: 46ch; color: var(--muted); }
.ap-empty--small { padding: 22px; gap: 12px; }
.ap-empty--small .ap-empty__big { font-size: clamp(28px, 6vw, 40px); }

/* ---------- list page footer notes ---------- */
.ap-foot { display: grid; gap: 12px; margin-top: clamp(40px, 6vw, 64px); padding-top: 22px; border-top: 1px solid var(--line); }
.ap-walk { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 600; color: var(--paper); }
.ap-walk__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 6px rgba(255, 59, 78, .9), 0 0 16px rgba(255, 59, 78, .5); }
.ap-demo { margin: 0; max-width: 64ch; font: 500 12.5px/1.6 var(--f-mono); letter-spacing: .02em; color: var(--faint); }
.ap-demo strong { color: var(--muted); }

/* ---------- details page ---------- */
.ap-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -6px 0 18px -4px; padding: 0 4px;
  font: 700 12px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none;
  transition: color .2s;
}
.ap-back:hover { color: var(--paper); }
.ap-head--detail .ap-pole { margin-bottom: 0; }
.ap-detail { display: grid; gap: 20px; margin-top: clamp(26px, 4vw, 40px); }
.ap-detail__main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ap-detail__side { min-width: 0; }
@media (min-width: 1000px) {
  .ap-detail { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: 28px; align-items: start; }
  .ap-detail__side { position: sticky; top: calc(var(--top-h) + 20px); }
}
.ap-summary { display: flex; flex-direction: column; gap: 20px; }
.ap-card--detail .ap-card__when { font-size: clamp(28px, 7.4vw, 40px); }
.ap-card--detail .ap-card__barber { font-size: 24px; }
.ap-card__foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ap-callbtn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; max-width: 100%; padding: 0 18px 0 6px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--ink-3); color: var(--paper); cursor: pointer;
  font: 700 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s, color .2s;
}
.ap-callbtn:hover { border-color: var(--violet); color: var(--violet); }
.ap-callbtn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.ap-callbtn__i {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: var(--violet-soft); color: var(--violet);
}
.ap-callbtn__n { color: var(--muted); font-weight: 500; letter-spacing: .04em; white-space: nowrap; }
@media (max-width: 380px) { .ap-callbtn__n { display: none; } }

/* round actions: reschedule and cancel */
.ap-acts { display: flex; justify-content: center; gap: clamp(36px, 12vw, 72px); padding: 4px 0 2px; }
.ap-round {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; margin: 0;
  background: none; border: 0; color: var(--paper); text-decoration: none; cursor: pointer;
  font: 700 12px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; -webkit-tap-highlight-color: transparent;
}
.ap-round__i {
  width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--violet); background: var(--violet-soft); color: var(--violet);
  transition: transform .3s var(--ease-out), background-color .25s, color .25s, box-shadow .35s var(--ease-out);
}
.ap-round:hover .ap-round__i { transform: translateY(-2px); background: var(--violet); color: var(--ink); box-shadow: 0 12px 32px -12px rgba(165, 124, 255, .85); }
.ap-round--danger .ap-round__i { border-color: var(--neon); background: rgba(255, 59, 78, .1); color: var(--neon); }
.ap-round--danger:hover .ap-round__i { background: var(--neon); color: var(--ink); box-shadow: var(--neon-glow); }
.ap-round:focus-visible { outline: none; }
.ap-round:focus-visible .ap-round__i { outline: 2px solid var(--paper); outline-offset: 4px; }

/* status alerts: declined, cancelled, done */
.ap-alert {
  display: grid; gap: 12px; padding: 20px; border-radius: var(--r-m);
  border: 1px solid var(--line-2); background: var(--ink-2);
}
.ap-alert__h { margin: 0; font: 800 24px/1.02 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.ap-alert__p { margin: 0; color: var(--muted); }
.ap-alert__q {
  margin: 0; padding: 12px 14px; border-left: 3px solid var(--violet); background: var(--ink-3); border-radius: 0 var(--r-s) var(--r-s) 0;
  color: var(--paper);
}
.ap-alert__q small { display: block; margin-bottom: 4px; font: 700 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ap-alert--late { border-color: rgba(255, 59, 78, .45); }
.ap-alert--late .ap-alert__q { border-left-color: var(--neon); }
.ap-alert__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.ap-forget {
  justify-self: start; min-height: 44px; padding: 0 2px; background: none; border: 0; cursor: pointer;
  font: 600 14px/1 var(--f-body); color: var(--faint); text-decoration: underline; text-underline-offset: 3px;
}
.ap-forget:hover { color: var(--paper); }

/* details rows */
.ap-panel__h {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 4px;
  font: 800 26px/1 var(--f-display); letter-spacing: .05em; text-transform: uppercase;
}
.ap-rows { list-style: none; margin: 0; padding: 0; }
.ap-row {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; grid-template-areas: "i t p";
  gap: 4px 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line);
}
.ap-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ap-row__i {
  grid-area: i; align-self: start; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--ink-3); border: 1px solid var(--line); color: var(--violet);
}
.ap-row__t { grid-area: t; min-width: 0; }
.ap-row__t p { margin: 0; }
.ap-row__main { font-weight: 700; color: var(--paper); line-height: 1.35; }
.ap-row__main + .ap-row__main { margin-top: 2px !important; }
.ap-row__sub { margin-top: 3px !important; color: var(--muted); font-size: 15px; line-height: 1.4; }
.ap-row__sub .mono { font-family: var(--f-mono); font-size: 13.5px; }
.ap-row__p { grid-area: p; justify-self: end; }
@media (max-width: 560px) {
  .ap-row { grid-template-columns: 42px minmax(0, 1fr); grid-template-areas: "i t" "i p"; }
  .ap-row__p { justify-self: start; margin-top: 8px; }
}
.ap-pill {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; margin: 0; border-radius: 999px;
  border: 1px solid rgba(165, 124, 255, .45); background: var(--violet-soft); color: var(--violet); cursor: pointer;
  font: 700 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .3s;
}
.ap-pill:hover { background: var(--violet); color: var(--ink); box-shadow: 0 10px 26px -12px rgba(165, 124, 255, .8); }
.ap-pill:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

/* payment summary */
.ap-pay__rows { list-style: none; margin: 8px 0 0; padding: 0; }
.ap-pay__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px dashed var(--line-2); }
.ap-pay__name { min-width: 0; color: var(--paper); font-weight: 600; }
.ap-pay__name small { display: block; margin-top: 2px; font: 500 12.5px/1.3 var(--f-mono); color: var(--muted); letter-spacing: .03em; }
.ap-pay__amt { flex: none; font: 700 17px/1.2 var(--f-mono); color: var(--brass); }
.ap-pay__total { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-top: 16px; }
.ap-pay__total span:first-child { font: 800 26px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }
.ap-pay__total .ap-pay__amt { font: 900 40px/1 var(--f-display); letter-spacing: .01em; }
.ap-pay__fee {
  display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 12px 14px; border-radius: var(--r-s);
  background: rgba(91, 214, 154, .08); border: 1px solid rgba(91, 214, 154, .3); color: var(--paper); font-weight: 600;
}
.ap-pay__fee svg { flex: none; color: var(--ok); }
.ap-pay__note { margin: 10px 0 0; font: 500 12.5px/1.55 var(--f-mono); letter-spacing: .02em; color: var(--faint); }
.ap-pay--void .ap-pay__amt { color: var(--faint); text-decoration: line-through; }

/* ---------- chair policy panel (detail page side column) ---------- */
.ap-policy {
  border-color: rgba(165, 124, 255, .32);
  background: linear-gradient(165deg, rgba(107, 63, 168, .22), rgba(107, 63, 168, .04) 62%), var(--ink-2);
}
.ap-policy__head { display: flex; align-items: center; gap: 12px; }
.ap-policy__head .ap-panel__h { margin: 0; }
.ap-policy__i {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--ink-3); border: 1px solid var(--line); color: var(--violet);
}
.ap-policy__list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; }
.ap-policy__list li {
  position: relative; padding: 12px 0 12px 22px; border-top: 1px solid var(--line);
  font-size: 15.5px; line-height: 1.45; color: var(--paper);
}
.ap-policy__list li:last-child { padding-bottom: 0; }
.ap-policy__list li::before {
  content: ""; position: absolute; left: 3px; top: calc(12px + .55em); width: 7px; height: 7px; border-radius: 2px;
  background: var(--violet); transform: rotate(45deg);
}

/* ---------- cancel dialog ---------- */
.ap-m__what { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--r-s); background: var(--ink-3); border: 1px solid var(--line); color: var(--paper) !important; line-height: 1.45; }
.ap-m__what strong { display: block; font: 800 20px/1.1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.ap-warn { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--r-s); border: 1px solid rgba(255, 59, 78, .55); background: rgba(255, 59, 78, .1); }
.ap-warn__h { margin: 0 0 4px !important; font: 700 11px/1 var(--f-mono) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--neon) !important; }
.ap-warn__p { margin: 0 !important; color: var(--paper) !important; font-weight: 700; }
.ap-check { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 0 0 14px; cursor: pointer; font-weight: 600; }
.ap-check input { flex: none; width: 22px; height: 22px; margin: 0; }
.ap-m__p { margin: 0 0 16px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ap-icon:hover, .ap-round:hover .ap-round__i { transform: none; }
}
