/* Termini – booking widget. Inherits the site's font; one accent color (--trm-primary) set in settings. */
.trm-app {
  --trm-primary: #2f6f73;
  --trm-accent: color-mix(in srgb, var(--trm-primary) 12%, #fff);
  --trm-ink: #1f2a2b;
  --trm-muted: #66727a;
  --trm-line: #e3e7e8;
  --trm-soft: #f5f7f7;
  --trm-radius: 12px;
  color: var(--trm-ink);
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.5;
}
.trm-app *, .trm-app *::before, .trm-app *::after { box-sizing: border-box; }
.trm-card { background: #fff; border: 1px solid var(--trm-line); border-radius: 16px; padding: 24px; transition: opacity .15s; }
.trm-card.is-busy { opacity: .75; }
.trm-loading { padding: 32px; text-align: center; color: var(--trm-muted); }
.trm-title { font-size: 1.35em; margin: 4px 0 14px; line-height: 1.25; }
.trm-muted { color: var(--trm-muted); }

/* progress */
.trm-steps { display: flex; gap: 8px; list-style: none; margin: 0 0 22px; padding: 0; counter-reset: none; }
.trm-steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 3px solid var(--trm-line); color: var(--trm-muted); font-size: 14px; margin: 0; }
.trm-steps li.is-current { border-color: var(--trm-primary); color: var(--trm-ink); font-weight: 600; }
.trm-steps li.is-done { border-color: color-mix(in srgb, var(--trm-primary) 45%, #fff); }
.trm-num { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--trm-soft); font-size: 13px; flex: none; }
.trm-steps li.is-current .trm-num { background: var(--trm-primary); color: #fff; }
.trm-steps li.is-done .trm-num { background: color-mix(in srgb, var(--trm-primary) 18%, #fff); color: var(--trm-primary); }

/* services */
.trm-search { width: 100%; padding: 12px 14px; border: 1px solid var(--trm-line); border-radius: 10px; font: inherit; margin-bottom: 18px; background: var(--trm-soft); }
.trm-search:focus { outline: 2px solid color-mix(in srgb, var(--trm-primary) 40%, transparent); background: #fff; }
.trm-cat h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--trm-muted); margin: 18px 0 8px; font-weight: 700; }
.trm-services { display: grid; gap: 8px; }
.trm-service { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border: 1px solid var(--trm-line); border-radius: var(--trm-radius); background: #fff; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.trm-service:hover, .trm-service:focus-visible { border-color: var(--trm-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--trm-primary) 12%, transparent); outline: none; }
.trm-service-name { font-weight: 600; }
.trm-service-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 14px; color: var(--trm-muted); white-space: nowrap; }
.trm-price { color: var(--trm-ink); font-weight: 600; }

/* summary */
.trm-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--trm-soft); border-radius: var(--trm-radius); margin-bottom: 18px; }
.trm-summary strong { display: block; }
.trm-sum-time { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--trm-line); }
.trm-sum-main .trm-muted, .trm-sum-time .trm-muted { font-size: 14px; }
.trm-link { background: none; border: 0; color: var(--trm-primary); font: inherit; font-weight: 600; cursor: pointer; padding: 2px 0; text-decoration: underline; text-underline-offset: 3px; }

/* chips */
.trm-block { margin: 18px 0; }
.trm-label { font-weight: 600; margin-bottom: 8px; }
.trm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.trm-chip { border: 1px solid var(--trm-line); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; color: inherit; }
.trm-chip.is-on { background: var(--trm-primary); border-color: var(--trm-primary); color: #fff; }

/* calendar */
.trm-cal { border: 1px solid var(--trm-line); border-radius: var(--trm-radius); padding: 14px; }
.trm-cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.trm-cal-head strong { text-transform: capitalize; }
.trm-nav { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--trm-line); background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; }
.trm-nav:disabled { opacity: .35; cursor: default; }
.trm-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.trm-dow { text-align: center; font-size: 12px; color: var(--trm-muted); padding: 4px 0; font-weight: 600; }
.trm-day { height: 46px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: 15px; color: #b5bdbf; display: flex; align-items: center; justify-content: center; position: relative; padding: 0; }
.trm-day.is-pad { visibility: hidden; }
.trm-day.is-free { background: color-mix(in srgb, var(--trm-primary) 10%, #fff); color: var(--trm-ink); font-weight: 600; cursor: pointer; }
.trm-day.is-free::after { content: ""; position: absolute; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--trm-primary); }
.trm-day.is-free:hover { background: color-mix(in srgb, var(--trm-primary) 20%, #fff); }
.trm-day.is-free.is-on, .trm-day.is-free.is-on:hover { background: var(--trm-primary); color: #fff; }
.trm-day.is-free.is-on::after { background: #fff; }
.trm-day.is-today span { text-decoration: underline; text-underline-offset: 3px; }
.trm-legend { font-size: 13px; color: var(--trm-muted); margin: 10px 0 0; display: flex; align-items: center; gap: 6px; }
.trm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--trm-primary); display: inline-block; }
.trm-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.trm-time { padding: 10px 0; border: 1px solid var(--trm-line); border-radius: 10px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.trm-time:hover, .trm-time:focus-visible { border-color: var(--trm-primary); color: var(--trm-primary); outline: none; }
.trm-empty { padding: 18px; background: var(--trm-soft); border-radius: var(--trm-radius); }
.trm-empty p { margin: 0 0 6px; }

/* form */
.trm-form { display: grid; gap: 14px; }
.trm-field span { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.trm-field input { width: 100%; padding: 12px 14px; border: 1px solid #cfd6d8; border-radius: 10px; font: inherit; background: #fff; color: inherit; }
.trm-field input:focus { outline: 2px solid color-mix(in srgb, var(--trm-primary) 40%, transparent); border-color: var(--trm-primary); }
.trm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.trm-note { margin: 0; font-size: 14px; color: var(--trm-muted); }
.trm-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--trm-muted); }
.trm-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--trm-primary); }
.trm-check a { color: var(--trm-primary); }
.trm-primary { background: var(--trm-primary); color: #fff; border: 0; border-radius: 10px; padding: 14px 20px; font: inherit; font-weight: 700; cursor: pointer; }
.trm-primary:disabled { opacity: .6; cursor: default; }
.trm-secondary { display: inline-block; padding: 14px 20px; border-radius: 10px; border: 1px solid var(--trm-line); color: var(--trm-ink); text-decoration: none; font-weight: 600; }
.trm-error { background: #fbeaea; color: #8a2c2c; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 15px; }

/* done */
.trm-done { text-align: center; padding: 10px 0; }
.trm-check-big { width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--trm-primary) 14%, #fff); color: var(--trm-primary); display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 10px; font-weight: 700; }
.trm-done-main { font-size: 17px; }
.trm-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }

@media (max-width: 520px) {
  .trm-day { height: auto; aspect-ratio: 1; min-height: 38px; }
  .trm-card { padding: 16px; border-radius: 12px; }
  .trm-lbl { display: none; }
  .trm-steps li.is-current .trm-lbl { display: inline; }
  .trm-service { flex-direction: column; align-items: flex-start; gap: 4px; }
  .trm-service-meta { flex-direction: row; gap: 10px; }
}

/* category tabs */
.trm-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin-bottom: 4px; scrollbar-width: thin; }
.trm-tab { flex: none; border: 1px solid var(--trm-line); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--trm-muted); cursor: pointer; text-transform: uppercase; letter-spacing: .03em; }
.trm-tab.is-on { background: var(--trm-primary); border-color: var(--trm-primary); color: #fff; }

/* free-day strip */
.trm-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.trm-label-row .trm-label { margin: 0; }
.trm-toggle { font-size: 14px; }
.trm-toggle-row { text-align: right; margin: 8px 0 0; }
.trm-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.trm-sday { flex: none; scroll-snap-align: start; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 4px; border: 1px solid var(--trm-line); border-radius: 14px; background: #fff; font: inherit; color: var(--trm-ink); cursor: pointer; }
.trm-sday strong { font-size: 20px; line-height: 1.1; }
.trm-sdow { font-size: 12px; font-weight: 700; color: var(--trm-muted); letter-spacing: .04em; }
.trm-smon { font-size: 12px; color: var(--trm-muted); }
.trm-sday.is-on { background: var(--trm-primary); border-color: var(--trm-primary); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--trm-primary) 30%, transparent); }
.trm-sday.is-on .trm-sdow, .trm-sday.is-on .trm-smon { color: #fff; opacity: .9; }
