/* Surgery calendar — templates/surgery-calendar. Figma: Catalog — Surgery Calendar › "03 Agenda · Compact (Kennewick)",
   "04 Month grid · Compact (Kennewick)", "05 Agenda · Mobile (Kennewick)". Color = procedure, never surgeon. */

.sc {
  --sc-cataract: var(--teal-700);
  --sc-yag: var(--orange-500);
  --sc-lvc: var(--navy-700);
  --sc-corneal: var(--stone-400);
  --sc-oculoplastic: var(--charcoal-500);
  display: grid;
  grid-template-columns: minmax(0, 760px) 340px;
  grid-template-areas:
    'head refer'
    'main side';
  grid-template-rows: auto 1fr;
  justify-content: space-between;
  column-gap: var(--sp-48);
  padding-bottom: var(--sp-120);
}
.sc--index {
  display: block;
  padding-top: 61px;
}

/* ---- Heading ---- */
.sc-head {
  grid-area: head;
  padding-top: var(--sp-64);
}
.sc-head__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-12) var(--sp-16);
  margin-top: var(--sp-16);
}
.sc-head__lead {
  margin-top: var(--sp-16);
  color: var(--pcli-color-text-secondary);
}
.sc-office {
  position: relative;
}
.sc-office__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--pcli-color-border-input);
  border-radius: 99px;
  font-size: var(--fs-button-s);
  font-weight: 600;
  line-height: 1.35;
  color: var(--pcli-color-text-link);
  cursor: pointer;
  list-style: none;
}
.sc-office__toggle::-webkit-details-marker {
  display: none;
}
.sc-office[open] .sc-office__toggle svg {
  transform: rotate(180deg);
}
.sc-office__list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  max-height: 360px;
  overflow-y: auto;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--pcli-color-border-default);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgb(18 32 38 / 0.12);
}
.sc-office__list a {
  display: block;
  padding: 8px 16px;
  font-size: var(--fs-body-m);
  color: var(--pcli-color-text-primary);
  text-decoration: none;
}
.sc-office__list a:hover,
.sc-office__list a:focus-visible {
  background: var(--pcli-color-bg-subtle);
  color: var(--pcli-color-text-link);
}

/* ---- Procedure chips (the dot doubles as the color legend) ---- */
.sc-main {
  grid-area: main;
  min-width: 0;
}
.sc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
  margin-top: var(--sp-32);
}
.sc-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  padding: 4px 14px 4px 12px;
  border: 1px solid var(--pcli-color-border-input);
  border-radius: 10px;
  background: var(--white);
  font-size: var(--fs-body-s);
  line-height: 1.5;
  color: var(--pcli-color-text-primary);
  text-decoration: none;
  white-space: nowrap;
}
.sc-chip:hover {
  border-color: var(--pcli-color-border-strong);
}
.sc-chip.is-active {
  background: var(--charcoal-900);
  border-color: var(--charcoal-900);
  color: var(--white);
}
.sc-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sc-cataract);
}
.sc-dot--yag {
  background: var(--sc-yag);
}
.sc-dot--lvc {
  background: var(--sc-lvc);
}
.sc-dot--corneal {
  background: var(--sc-corneal);
}
.sc-dot--oculoplastic {
  background: var(--sc-oculoplastic);
}
.sc-chip.is-active .sc-dot--lvc {
  background: var(--stone-300); /* navy on the black active chip would disappear */
}

/* ---- Range tabs, month title and List / Grid ---- */
.sc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-24);
  margin-top: var(--sp-16);
  border-bottom: 1px solid var(--pcli-color-border-default);
}
.sc-tabs {
  display: flex;
  gap: var(--sp-24);
}
.sc-tab {
  padding: 10px 2px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  font-size: var(--fs-title-s);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--pcli-color-text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.sc-tab:hover {
  color: var(--pcli-color-text-strong);
}
.sc-tab.is-active {
  border-bottom-color: var(--charcoal-900);
  color: var(--pcli-color-text-strong);
}
.sc-month {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  padding-bottom: var(--sp-12);
}
.sc-month__title {
  font-size: var(--fs-heading-m);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--pcli-color-text-strong);
}
.sc-month__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--pcli-color-border-default);
  border-radius: 4px;
  color: var(--pcli-color-icon-default);
}
.sc-month__step:hover {
  border-color: var(--pcli-color-border-strong);
}
.sc-month__step.is-off {
  color: var(--stone-300);
}
.sc-views {
  display: flex;
  gap: var(--sp-4);
  padding-bottom: var(--sp-8);
}
.sc-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: var(--fs-button-s);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--pcli-color-text-primary);
  text-decoration: none;
}
.sc-view.is-active {
  background: var(--charcoal-900);
  color: var(--white);
}

/* ---- List: weeks of compact rows ---- */
.sc-list {
  margin-top: var(--sp-16);
}
.sc-list--phone {
  display: none;
}
.sc-week__label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0 6px 12px;
  font-size: var(--fs-body-l);
  font-weight: 400;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--pcli-color-text-secondary);
}
.sc-week__note {
  font-size: var(--fs-body-s);
  line-height: 1.5;
  text-transform: none;
  color: var(--teal-800);
}
.sc-rows,
.sc-row__entries {
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Rows sit indented under their week label; a day with several surgeries keeps its date level with the first. */
.sc-rows {
  padding-left: 22px;
}
.sc-row {
  display: flex;
  align-items: flex-start;
  gap: 34px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--pcli-color-border-subtle);
}
.sc-week--this .sc-row {
  background: var(--pcli-color-bg-selected);
}
.sc-row__date {
  display: flex;
  align-items: baseline;
  gap: var(--sp-8);
  flex: none;
  width: 110px;
  font-size: var(--fs-title-s);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.sc-row__weekday {
  width: 44px;
  text-transform: uppercase;
  color: var(--pcli-color-text-tertiary);
}
.sc-row__day {
  color: var(--pcli-color-text-strong);
  white-space: nowrap;
}
.sc-row__entries {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sc-entry {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sc-entry__procedure {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-title-s);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--pcli-color-text-strong);
}
.sc-entry__surgeon {
  font-size: var(--fs-body-s);
  line-height: 1.5;
  color: var(--pcli-color-text-secondary);
  white-space: nowrap;
}
.sc-more {
  margin-top: var(--sp-16);
  text-align: center;
}
.sc-empty {
  margin-top: var(--sp-24);
  font-size: var(--fs-body-m);
  line-height: 1.55;
  color: var(--pcli-color-text-secondary);
}

/* ---- Month grid: Monday–Friday ---- */
.sc-grid {
  margin-top: var(--sp-16);
  border-left: 1px solid var(--pcli-color-border-subtle);
  border-bottom: 1px solid var(--pcli-color-border-subtle);
}
.sc-grid__head,
.sc-grid__row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.sc-grid__head {
  margin-left: -1px;
  padding: 0 8px 12px;
  background: var(--white);
}
.sc-grid__head span {
  font-size: var(--fs-overline);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--pcli-color-text-tertiary);
}
.sc-day {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 140px;
  padding: 8px;
  border-top: 1px solid var(--pcli-color-border-subtle);
  border-right: 1px solid var(--pcli-color-border-subtle);
  background: var(--white);
}
.sc-day.is-dim {
  background: var(--pcli-color-bg-subtle);
}
.sc-day__date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-title-s);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--pcli-color-text-strong);
}
.sc-day.is-dim .sc-day__date {
  color: var(--stone-400);
}
.sc-day__pill {
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--teal-800);
  color: var(--white);
}
.sc-day__today {
  font-size: var(--fs-overline);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--teal-800);
}
.sc-event {
  display: flex;
  flex-direction: column;
  padding: 5px 6px 5px 10px;
  border-radius: 4px;
  background: var(--pcli-color-bg-subtle);
  box-shadow: inset 4px 0 0 var(--sc-cataract);
}
.sc-event--yag {
  box-shadow: inset 4px 0 0 var(--sc-yag);
}
.sc-event--lvc {
  box-shadow: inset 4px 0 0 var(--sc-lvc);
}
.sc-event--corneal {
  box-shadow: inset 4px 0 0 var(--sc-corneal);
}
.sc-event--oculoplastic {
  box-shadow: inset 4px 0 0 var(--sc-oculoplastic);
}
.sc-day.is-dim .sc-event {
  opacity: 0.55;
}
.sc-event__procedure {
  font-size: var(--fs-title-s);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--pcli-color-text-strong);
}
.sc-event__surgeon {
  font-size: var(--fs-body-s);
  line-height: 1.5;
  color: var(--pcli-color-text-secondary);
}

/* ---- Notice and updated time ---- */
.sc-notice {
  display: flex;
  gap: 10px;
  margin-top: var(--sp-16);
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--orange-100);
  font-size: var(--fs-body-s);
  line-height: 1.5;
  color: var(--pcli-color-text-primary);
}
.sc-notice svg {
  flex: none;
  margin-top: 2px;
  color: var(--orange-800);
}
.sc-notice__title {
  font-weight: 600;
  color: var(--orange-800);
}
.sc-updated {
  margin-top: var(--sp-24);
  font-size: var(--fs-body-s);
  line-height: 1.5;
  color: var(--pcli-color-text-tertiary);
}

/* ---- Right column: office, phones, surgeons ---- */
.sc-side {
  grid-area: side;
  padding: 0 10px 0 10px;
}
.sc-side__pdf {
  margin: var(--sp-48) 0 var(--sp-24);
  text-align: center;
}
.sc-side__eyebrow {
  margin-top: var(--sp-48);
  font-size: var(--fs-overline);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--pcli-color-text-eyebrow);
}
.sc-side__pdf + .sc-side__eyebrow {
  margin-top: 0;
}
.sc-side__address {
  margin-top: var(--sp-16);
  font-size: var(--fs-body-m);
  line-height: 1.55;
  color: var(--pcli-color-text-primary);
}
.sc-phones {
  margin: var(--sp-16) 0 0;
  padding-bottom: var(--sp-16);
  border-bottom: 1px solid var(--pcli-color-border-default);
}
.sc-phones div {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-16);
  padding: 3px 0;
  font-size: var(--fs-body-m);
  line-height: 1.55;
}
.sc-phones dt {
  color: var(--pcli-color-text-secondary);
}
.sc-phones dd {
  margin: 0;
  font-weight: 600;
  color: var(--pcli-color-text-strong);
}
.sc-phones a {
  color: var(--pcli-color-text-link);
  text-decoration: none;
}
.sc-team__title {
  margin-top: var(--sp-24);
  font-size: var(--fs-title-m);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--pcli-color-text-strong);
}
.sc-team {
  margin: var(--sp-8) 0 0;
  padding: 0;
  list-style: none;
}
.sc-person {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  padding: 10px 0;
  text-decoration: none;
}
.sc-person__photo {
  flex: none;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--stone-150);
}
.sc-person__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sc-person__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.sc-person__name {
  font-size: var(--fs-title-s);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--pcli-color-text-strong);
}
.sc-person__role {
  font-size: var(--fs-body-s);
  line-height: 1.5;
  color: var(--pcli-color-text-secondary);
}
.sc-person__go {
  flex: none;
  color: var(--pcli-color-text-link);
}
.sc-person:hover .sc-person__name {
  color: var(--pcli-color-text-link);
}
.sc-side__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
  margin-top: var(--sp-16);
}

/* ---- Referral card: hangs from the nav bar at the top of the right column ---- */
.sc-refer {
  grid-area: refer;
  align-self: start;
  padding: var(--sp-24);
  border-radius: 0 0 8px 8px;
  background: var(--pcli-color-bg-inverse);
  color: var(--pcli-color-text-inverse);
}
.sc-refer__title {
  font-size: var(--fs-title-l);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
}
.sc-refer__text {
  margin: var(--sp-16) 0;
  font-size: var(--fs-body-s);
  line-height: 1.5;
  color: var(--stone-300);
}

/* ---- Choose an office (/surgery-calendar). Figma: "00 Choose an office · Five columns by state" (1814:1947), "· Mobile"
   (1817:2161). States A–Z in five columns; a large state spans several (index.twig sets --span). Rollover as on the
   Locations map list: soft fill, city turns orange, the pin's ring appears, an arrow shows. ---- */
.sc--index .sc-head {
  padding-top: 0;
}
.sc--index .t-heading-xl {
  margin-top: 14px;
}
.sc--index .sc-head__lead {
  margin-top: 14px;
}
.sc--index .eyebrow,
.sc--index .sc-head__lead {
  padding-left: 20px;
} /* eyebrow and intro sit 20px in from the heading, in line with the state names */
.sc-states {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  column-gap: 20px;
  margin-top: 28px;
  padding: 0 5px;
}
.sc-states__col {
  grid-column: span var(--span, 1);
}
.sc-state__h {
  margin: 0;
  padding: 20px 16px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-700);
}
.sc-state__list {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: var(--span, 1);
  column-gap: 20px;
}
.sc-state__list li {
  break-inside: avoid;
}
.sc-loc {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  box-sizing: border-box;
  padding: 4px 16px 4px 18px;
  border-radius: 8px;
  color: var(--pcli-color-text-strong);
  text-decoration: none;
  transition: background 0.15s;
}
.sc-loc__pin {
  position: relative;
  flex: 0 0 18px;
  height: 18px;
}
.sc-loc__pin::before,
.sc-loc__pin::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--orange-500);
}
.sc-loc__pin::before {
  inset: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.sc-loc__pin::after {
  inset: 5px;
}
.sc-loc__city {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-title-m);
  font-weight: 600;
  line-height: 1.25;
  transition: color 0.15s;
}
.sc-loc__arrow {
  font-weight: 600;
  line-height: 1.25;
  color: var(--pcli-color-text-eyebrow);
  opacity: 0;
  transition: opacity 0.15s;
}
.sc-loc:hover,
.sc-loc:focus-visible {
  background: var(--pcli-color-bg-subtle);
}
.sc-loc:hover .sc-loc__city,
.sc-loc:focus-visible .sc-loc__city {
  color: var(--pcli-color-text-eyebrow);
}
.sc-loc:hover .sc-loc__pin::before,
.sc-loc:focus-visible .sc-loc__pin::before {
  opacity: 0.35;
}
.sc-loc:hover .sc-loc__arrow,
.sc-loc:focus-visible .sc-loc__arrow {
  opacity: 1;
}
.sc-loc:focus-visible {
  outline-offset: -2px;
}

/* ---- Tablet: one column, referral card last ---- */
@media (max-width: 1100px) {
  .sc-states {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sc-states__col--wide {
    grid-column: 1 / -1;
  }
  .sc-states__col--wide .sc-state__list {
    columns: 3;
  }
  .sc {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'head' 'main' 'side' 'refer';
    grid-template-rows: none;
    padding-bottom: var(--sp-64);
  }
  .sc-side {
    max-width: 560px;
    padding: 0;
  }
  .sc-refer {
    margin-top: var(--sp-40);
    border-radius: 8px;
  }
}

/* ---- Phones (Figma 05): list only, chips and tabs scroll sideways, rows stack ---- */
@media (max-width: 720px) {
  .sc-head {
    padding-top: var(--sp-24);
  }
  .sc--index {
    padding-top: 32px;
    padding-bottom: 48px;
  }
  .sc--index .t-heading-xl,
  .sc--index .sc-head__lead {
    margin-top: 12px;
  }
  .sc--index .t-heading-xl {
    font-size: 38px;
    line-height: 1.15;
    letter-spacing: -0.035em;
  }
  .sc--index .sc-head__lead {
    font-size: var(--fs-body-m);
    line-height: 1.55;
  } /* Figma mobile: heading 38px, intro 15px */
  .sc--index .eyebrow,
  .sc--index .sc-head__lead {
    padding-left: 0;
  }
  .sc-states {
    grid-template-columns: minmax(0, 1fr);
    margin: 16px 0 0 -16px;
    padding: 0;
  }
  .sc-states__col,
  .sc-states__col--wide {
    grid-column: auto;
  }
  .sc-states__col .sc-state__list {
    columns: 1;
  }
  .sc-head__title {
    flex-direction: column;
    align-items: flex-start;
    margin-top: var(--sp-8);
  }
  .sc-chips,
  .sc-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .sc-chips {
    margin-top: var(--sp-24);
  }
  .sc-tabs {
    gap: var(--sp-20);
  }
  .sc-views,
  .sc-grid {
    display: none;
  }
  .sc-list--phone {
    display: block;
  }
  .sc-week__label {
    padding-left: 0;
  }
  .sc-rows {
    padding-left: 0;
  }
  .sc-row {
    gap: var(--sp-16);
    padding: 12px;
    border-bottom-color: var(--pcli-color-border-default);
  }
  .sc-week--this .sc-row {
    border-bottom-color: transparent;
  }
  .sc-row__date {
    flex-direction: column;
    gap: 1px;
    width: 52px;
  }
  .sc-row__weekday {
    width: auto;
    letter-spacing: 0.04em;
  }
  .sc-row__entries {
    gap: 10px;
  }
  .sc-entry {
    display: grid;
    grid-template-columns: 8px 1fr;
    column-gap: 10px;
    align-items: start;
  }
  .sc-entry .sc-dot {
    margin-top: 6px;
  }
  .sc-entry__surgeon {
    grid-column: 2;
    white-space: normal;
  }
  .sc-more .btn {
    width: 100%;
  }
  .sc-side__pdf {
    margin-top: var(--sp-40);
  }
  .sc-side__pdf .btn {
    width: 100%;
  }
}
