/* primp.ing. Signature: the mirror (.ch-mirror), an arch-topped frame like a salon mirror. Cover photos, the hero and
   portraits sit in it, wherever a shop's face appears. Everything else is Empire UI. Prefix: ch- (chair). Bump ASSET_V
   in src/lib/shop.tsx on change. */

/* ---- The mirror ---- */
.ch-mirror {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 22rem;
  border-radius: 999px 999px 0.75rem 0.75rem;
  border: 6px solid var(--primary);
  outline: 1px solid var(--border);
  outline-offset: 4px;
  overflow: hidden;
  background: var(--muted);
  display: grid;
  place-items: center;
}
.ch-mirror img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ch-mirror-initial {
  font-family: var(--font-heading, serif);
  font-size: clamp(3rem, 12vw, 6rem);
  color: var(--primary);
  line-height: 1;
}
.ch-mirror-sm {
  max-width: 4rem;
  border-width: 3px;
  outline-offset: 2px;
}
.ch-mirror-sm .ch-mirror-initial {
  font-size: 1.5rem;
}

/* ---- Marketing ---- */
.ch-hero-art {
  position: relative;
  display: grid;
  justify-items: start;
  padding-bottom: 2rem;
}
.ch-hero-mirror {
  max-width: 18rem;
}
.ch-hero-word {
  font-family: var(--font-heading, serif);
  font-size: 1.6rem;
  color: var(--primary);
}
.ch-example {
  position: absolute;
  bottom: 0;
  right: 0;
  max-width: 13rem;
  padding: 0.75rem 1rem;
  gap: 0.375rem;
  background: var(--card);
}
.ch-example p {
  margin: 0;
}
.ch-prof-links,
.ch-prof-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.ch-prof-list {
  display: grid;
  gap: 0.75rem;
}
.ch-how {
  padding-left: 1.25rem;
  display: grid;
  gap: 1rem;
}
.ch-faq {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
}
.ch-faq summary {
  cursor: pointer;
  font-weight: 600;
}
.ch-preview-wrap {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  align-items: start;
}
.ch-preview-frame {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  background: var(--background);
}
@media (max-width: 760px) {
  .ch-preview-wrap {
    grid-template-columns: 1fr;
  }
  .ch-example {
    position: static;
    margin-top: 1rem;
  }
}

/* ---- Menus and lists ---- */
.ch-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ch-menu li,
.ch-menu li > a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.ch-menu li > a {
  flex: 1;
  padding: 0;
  border: 0;
  text-decoration: none;
  color: inherit;
}
.ch-menu li > a .ch-menu-name {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ch-menu-name {
  flex: 1 1 12rem;
}
.ch-menu-price,
.ch-option-price {
  font-family: var(--font-heading, serif);
  font-variant-numeric: tabular-nums;
}
.ch-menu-move {
  display: inline-flex;
  gap: 0.25rem;
}
.ch-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.ch-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}
.ch-steps {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}
form.inline {
  display: inline;
}

/* ---- Choices (booking steps, forms) ---- */
.ch-choice {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.ch-choice legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.ch-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--card);
}
.ch-option:has(input:checked) {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.ch-option-name {
  flex: 1;
}
.ch-chips-choice {
  display: flex;
  flex-wrap: wrap;
}
.ch-chips-choice legend {
  width: 100%;
}
.ch-chips-choice .chip:has(input:checked) {
  border-color: var(--primary);
  color: var(--primary);
}
.ch-chips-choice .chip input {
  accent-color: var(--primary);
}
.ch-consent {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.ch-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
}
.ch-time-grid .ch-time {
  text-align: center;
}

/* ---- The shop's page ---- */
.ch-shop {
  display: grid;
  gap: 2rem;
}
.ch-shop-head {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
}
.ch-shop-title h1 {
  font-family: var(--font-heading, serif);
  margin-bottom: 0.25rem;
}
@media (max-width: 640px) {
  .ch-shop-head {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .ch-shop-head .row {
    justify-content: center;
  }
  .ch-shop-cover {
    max-width: 14rem;
  }
}
.ch-openings {
  margin-top: 1.25rem;
}
.ch-openings .chips {
  flex-wrap: wrap;
  overflow: visible;
}
.ch-section h2 {
  margin-bottom: 0.75rem;
}
.ch-cat h3 {
  margin: 1.25rem 0 0.25rem;
}
.ch-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem;
}
.ch-people {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 1rem;
}
.ch-portfolio,
.ch-photos {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.5rem;
}
.ch-portfolio img,
.ch-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  display: block;
}
.ch-hours {
  border-collapse: collapse;
}
.ch-hours th,
.ch-hours td {
  padding: 0.25rem 1rem 0.25rem 0;
  text-align: left;
  font-weight: normal;
}
.ch-policy-line,
.ch-booked-with {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.ch-summary,
.ch-when {
  border-left: 3px solid var(--primary);
  padding-left: 0.75rem;
}
.ch-evidence summary {
  cursor: pointer;
}

/* ---- Today ---- */
.ch-day {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ch-day-row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.ch-day-time {
  font-family: var(--font-heading, serif);
  font-variant-numeric: tabular-nums;
}
.ch-day-state {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.ch-day-row.ch-done .ch-day-who,
.ch-day-row.ch-no_show .ch-day-who {
  color: var(--muted-foreground);
}
.ch-walkin {
  margin-top: 1.5rem;
}
.ch-walkin summary {
  list-style: none;
  cursor: pointer;
  margin-bottom: 1rem;
}
.ch-walkin summary::-webkit-details-marker {
  display: none;
}

/* ---- Calendar board ---- */
.ch-board {
  --row: 1.25rem;
  display: grid;
  grid-template-columns: 3.5rem repeat(var(--cols), minmax(8rem, 1fr));
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.ch-times-col,
.ch-col {
  display: grid;
  grid-template-rows: 2.5rem repeat(var(--rows), var(--row));
  position: relative;
}
.ch-col {
  border-left: 1px solid var(--border);
}
.ch-col-head {
  position: sticky;
  top: 0;
  grid-row: 1;
  padding: 0.5rem;
  font-weight: 600;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-time-label {
  font-size: 0.7rem;
  color: var(--muted-foreground);
  padding-right: 0.25rem;
  text-align: right;
  line-height: 1;
}
.ch-cell {
  grid-column: 1;
  border-top: 1px dashed color-mix(in oklab, var(--border) 50%, transparent);
}
.ch-cell:hover,
.ch-cell.ch-over {
  background: color-mix(in oklab, var(--primary) 10%, transparent);
}
.ch-block {
  grid-column: 1;
  z-index: 1;
  margin: 1px 3px;
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  line-height: 1.2;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
  background: color-mix(in oklab, var(--primary) 14%, var(--card));
  border-left: 3px solid var(--primary);
  color: var(--foreground);
  text-decoration: none;
  cursor: grab;
}
.ch-block.ch-done {
  background: var(--muted);
}
.ch-block.ch-no_show {
  border-left-color: var(--destructive, #b42318);
  background: var(--muted);
  text-decoration: line-through;
}
.ch-block.ch-pending {
  border-left-style: dashed;
}
.ch-block.ch-private {
  background: var(--muted);
  border-left-color: var(--border);
  cursor: default;
}
.ch-block.ch-dragging {
  opacity: 0.4;
}
.ch-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--destructive, #b42318);
  z-index: 2;
  pointer-events: none;
}
.sr-only-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---- Hours ---- */
.ch-week {
  width: 100%;
  border-collapse: collapse;
}
.ch-week th,
.ch-week td {
  padding: 0.375rem 0.5rem 0.375rem 0;
  text-align: left;
  vertical-align: middle;
}
.ch-week thead th {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  font-weight: 600;
}
.ch-shift {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.ch-shift .input {
  width: 8.5rem;
}
.ch-week-wrap {
  max-width: 100%;
  overflow-x: auto;
}
@media (max-width: 640px) {
  .ch-week thead {
    display: none;
  }
  .ch-week tr {
    display: grid;
    gap: 0.25rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
  }
}

/* ---- Settings, share ---- */
.ch-settings-cover {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
}
.ch-qr svg {
  width: 12rem;
  height: auto;
  display: block;
}

/* ---- Booking progress ---- */
.ch-progress {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  gap: 0.25rem;
  counter-reset: step;
}
.ch-progress li {
  flex: 1;
  counter-increment: step;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  border-top: 3px solid var(--border);
  padding-top: 0.375rem;
}
.ch-progress li::before {
  content: counter(step) ". ";
}
.ch-progress li.done {
  border-top-color: color-mix(in oklab, var(--primary) 45%, var(--border));
}
.ch-progress li.on {
  border-top-color: var(--primary);
  color: var(--foreground);
  font-weight: 600;
}
.ch-block.ch-done .muted,
.ch-block.ch-no_show .muted {
  color: var(--foreground);
}
.ch-statement {
  font-family: var(--font-heading, serif);
  font-size: 1.125rem;
  margin: 1rem 0 1.5rem;
}
.ch-tip-custom {
  width: 5rem;
  margin-left: 0.25rem;
}
