/* The welcome page (home.js) that replaces the concierge chat on the first tab.
   Colours come from the booking app's theme variables, so each salon keeps its own look. */
#view-concierge.has-home > :not(.home) { display: none !important; }
#view-concierge.has-home.is-active { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.home {
  width: min(520px, 100%); margin: 0 auto; text-align: center;
  padding: 16px 20px calc(var(--tabbar-h) + var(--safe-b) + 28px);
}
.festive .home { padding-top: 108px; } /* clear of the string of holiday lights */
.home-back {
  display: block; min-height: 44px; margin: 0 0 4px -4px; padding: 0 4px; border: 0; background: none;
  font: 500 1rem var(--sans); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ---------- Muse ---------- */
.muse-stage { display: grid; justify-items: center; gap: 4px; }
.muse { width: 132px; height: 156px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.muse svg { width: 100%; height: 100%; overflow: visible; image-rendering: pixelated; }
.muse svg rect, .muse svg ellipse { stroke: none; }
.mx-o { fill: #3b3147; } .mx-g { fill: #b7b4c4; } .mx-d { fill: #8d899c; } .mx-w { fill: #f6f3f8; }
.mx-p { fill: #f29aa6; } .mx-c { fill: #ffb3bd; } .mx-y { fill: var(--gold); } .mx-b { fill: color-mix(in srgb, var(--gold) 65%, #000); }
.mx-h { fill: #e0457f; } .mx-H { fill: #a82a60; } .mx-i { fill: #ff8fb5; } .mx-f { fill: #ffb62e; } .mx-F { fill: #e8782a; } .mx-n { fill: #e3a878; }
.mx-r { fill: #2fb7a6; } .mx-R { fill: #1c8478; } .mx-l { fill: #7fe0d0; } .mx-m { fill: #7a4a2b; }
.mx-k { fill: #1d1626; } .mx-e { fill: #fff; }
.muse-mouth { fill: #7a2f3d; opacity: 0; transform-box: fill-box; transform-origin: 50% 0; }
.muse-shadow { fill: var(--ink); opacity: .12; transform-box: fill-box; transform-origin: center; animation: muse-shadow 3.4s ease-in-out infinite; }
.muse-body { transform-box: fill-box; transform-origin: 50% 100%; animation: muse-bob 3.4s ease-in-out infinite; }
.muse-eyes { transform-box: fill-box; transform-origin: center; animation: muse-flutter 4.2s infinite; }
.muse-tail { transform-box: fill-box; transform-origin: 0 100%; animation: muse-tail 1.8s ease-in-out infinite alternate; }
.muse.is-talking .muse-smile { opacity: 0; }
.muse.is-talking .muse-mouth { opacity: 1; animation: muse-talk .3s steps(2) infinite alternate; }
.muse.is-talking .muse-body { animation-duration: 1.5s; }
.muse:active .muse-body { animation: muse-boing .4s ease; }
@keyframes muse-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2px); } }
@keyframes muse-shadow { 0%, 100% { transform: scaleX(1); opacity: .12; } 50% { transform: scaleX(.85); opacity: .07; } }
@keyframes muse-flutter { 0%, 60%, 64%, 68%, 72%, 76%, 100% { transform: scaleY(1); } 62%, 70% { transform: scaleY(.12); } 66%, 74% { transform: scaleY(.45); } }
@keyframes muse-tail { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
@keyframes muse-talk { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes muse-boing { 30% { transform: scale(1.08, .9); } 60% { transform: scale(.95, 1.06); } }

.muse-bubble {
  position: relative; width: 100%; min-height: 4.2em; display: grid; place-items: center; padding: 10px 18px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface-2); margin-top: 10px;
}
.muse-bubble::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 16px; height: 16px; margin-left: -8px;
  background: var(--surface-2); border: solid var(--line); border-width: 1px 0 0 1px; transform: rotate(45deg);
}
.muse-bubble p { margin: 0; font: 500 1.125rem/1.35 var(--sans); color: var(--ink); text-wrap: balance; }

/* ---------- salon name, status, actions ---------- */
.home-name { margin: 16px 0 0; font-size: 1.9rem; line-height: 1.1; text-wrap: balance; }
.home-status { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 0; font: 500 1rem var(--sans); color: var(--ink-2); }
.home-status[data-open="true"] { color: var(--ok); }
.home-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.home-status[data-open="false"] .home-dot { background: none; box-shadow: inset 0 0 0 2px currentColor; }

.home-acts { display: grid; gap: 10px; margin-top: 16px; text-align: left; }
.home-act {
  display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 14px 12px 16px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink);
  text-decoration: none; box-shadow: var(--shadow); transition: transform .12s;
}
.home-act:active { transform: scale(.98); }
.home-act-icon { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.home-act svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.home-act-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.home-act-text strong { font: 600 1.125rem/1.25 var(--sans); }
.home-act-text small { font: 400 .95rem/1.3 var(--sans); color: var(--ink-2); }
.home-act .go { flex: none; width: 20px; height: 20px; color: var(--ink-2); }
.home-act.is-primary { min-height: 80px; border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.home-act.is-primary .home-act-icon { background: color-mix(in srgb, var(--accent-ink) 18%, transparent); color: var(--accent-ink); }
.home-act.is-primary .home-act-text strong { font-size: 1.25rem; }
.home-act.is-primary .home-act-text small, .home-act.is-primary .go { color: var(--accent-ink); opacity: .9; }
.home-act.is-quiet { min-height: 60px; box-shadow: none; background: none; }
.home-act.is-quiet .home-act-icon { width: 38px; height: 38px; background: var(--surface-2); color: var(--ink-2); }
.home-act.is-quiet .home-act-text strong { font-size: 1rem; font-weight: 500; }

.home-contact { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; margin: 18px 0 0; color: var(--ink-2); }
.home-contact a { display: inline-flex; align-items: center; min-height: 44px; font: 500 1rem var(--sans); color: var(--accent); text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .muse-body, .muse-shadow, .muse-eyes, .muse-tail, .muse.is-talking .muse-mouth { animation: none; }
  .home-act { transition: none; }
}

/* A signed-in customer's upcoming visits (app only) */
.home-visits { margin-top: 18px; text-align: left; }
.home-visits[hidden] { display: none; }
.home-visits h2 { margin: 0 0 8px; font: 600 1.05rem var(--sans); color: var(--ink); }
.home-visits ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.home-visit {
  display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface-2);
}
.home-visit-when { font: 600 .95rem var(--sans); color: var(--accent); }
.home-visit strong { font: 600 1.05rem/1.3 var(--sans); }
.home-visit small { font: 400 .95rem var(--sans); color: var(--ink-2); }
.home-visits-more { display: inline-flex; align-items: center; min-height: 44px; font: 500 1rem var(--sans); color: var(--accent); text-underline-offset: 3px; }
.home-visits-none { margin: 0; color: var(--ink-2); }

/* "Add another service" under the "Date & time" heading on the Book page (phones only) */
.book-more {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin: 2px 0 16px; padding: 10px 14px 10px 10px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 65%, transparent); border-radius: 20px;
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); color: var(--ink);
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .12s;
}
.book-more:active { transform: scale(.98); }
.book-more-plus {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--candy, var(--accent)); color: var(--accent-ink); box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 35%, transparent);
}
.book-more-plus svg, .book-more-go { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.book-more-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.book-more-text strong { font: 600 1.075rem/1.25 var(--sans); }
.book-more-text small { font: 400 .9rem/1.3 var(--sans); color: var(--ink-2); }
.book-more-go { flex: none; color: var(--accent); }
.book-more.is-nudged { animation: book-more-nudge 1.1s ease-out 2; }
@keyframes book-more-nudge {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .book-more.is-nudged { animation: none; } }
@media (min-width: 768px) { .book-more { display: none; } }
