/* ==========================================================================
   Book a call
   The Menu tab mirrored into the bottom-right corner: same white body, same
   two pixel steps (turned 180 degrees), same type. Opening grows the form
   panel out of the tab exactly the way the menu panel grows out of the Menu
   tab; closing folds it back onto the tab. Markup: tools/add_book_call.py,
   motion: js/book-call.js.
   ========================================================================== */

.bookcall-tab,
.bookcall-panel { --tab-w: 26.4rem; --tab-h: 6.6rem; --step: 3.3rem; --step-2: 1.6rem; }

/* ---------- the tab ---------- */
.bookcall-tab {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 940;                        /* above content, below the loader (1000) and cookie banner (9999) */
  width: var(--tab-w);
  height: var(--tab-h);
  color: var(--black);
  letter-spacing: -0.04em;
  text-decoration: none;
  transform: translateY(calc(100% + 0.2rem));
  transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}
.bookcall-tab.is-in { transform: none; }
.bookcall-tab.is-covered { visibility: hidden; }
.bookcall-tab__body {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding-left: 3.6rem;
  background: var(--white);
  font-size: 2.4rem;
  white-space: nowrap;
}
.bookcall-tab__body img { width: 2.2rem; height: 2.2rem; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.bookcall-tab:hover .bookcall-tab__body img,
.bookcall-tab:focus-visible .bookcall-tab__body img { transform: rotate(-10deg) scale(1.12); }
.bookcall-tab__body > span { position: relative; }
.bookcall-tab__body > span::after {   /* mint underline draws in on hover */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.3rem;
  height: 0.2rem;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}
.bookcall-tab:hover .bookcall-tab__body > span::after,
.bookcall-tab:focus-visible .bookcall-tab__body > span::after { transform: scaleX(1); }
.bookcall-tab:focus-visible { outline: none; }

/* over the white / mint / lavender hero blocks the tab turns black, like the
   Menu tab does over the same blocks (js/book-call.js samples what is under it) */
.bookcall-tab__body, .bookcall-tab .bookcall-step { transition: background-color .3s ease, color .3s ease; }
.bookcall-tab__body img { transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), filter .3s ease; }
.bookcall-tab.is-dark { color: var(--white); }
.bookcall-tab.is-dark .bookcall-tab__body,
.bookcall-tab.is-dark .bookcall-step { background: var(--black); }
.bookcall-tab.is-dark .bookcall-tab__body img { filter: invert(1); }

/* the Menu tab's two steps, turned 180 degrees: they hang off the top-left
   corner, so the shape climbs out of the bottom-right of the window */
.bookcall-step { position: absolute; top: 0; background: var(--white); pointer-events: none; }
.bookcall-step--1 { right: calc(100% - 0.1rem); width: var(--step); height: var(--step); }
.bookcall-step--2 { right: calc(100% + var(--step) - 0.2rem); width: var(--step); height: var(--step-2); }

/* ---------- backdrop ---------- */
.bookcall-backdrop {
  position: fixed;
  inset: 0;
  z-index: 955;
  background: rgba(1, 1, 1, .72);
  opacity: 0;
  transition: opacity .5s ease;
}
.bookcall-backdrop.is-on { opacity: 1; }
.bookcall-backdrop[hidden] { display: none; }

/* ---------- the panel ---------- */
.bookcall-panel {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 960;
  width: min(76rem, 100vw);
  color: var(--black);
}
.bookcall-panel[hidden] { display: none; }
.bookcall-panel__body {
  display: flex;
  flex-direction: column;
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--white);
}
.bookcall-panel__foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; flex: none; background: var(--white); }
.bookcall-panel__close {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  width: var(--tab-w);
  height: var(--tab-h);
  padding: 0 0 0 3.6rem;
  border: 0;
  background: var(--black);
  color: var(--white);
  font: inherit;
  font-size: 2.4rem;
  letter-spacing: -0.04em;
  cursor: pointer;
}
/* Close is the tab itself, turned black inside the white panel, with its steps */
.bookcall-panel__close .bookcall-step { background: var(--black); }
.bookcall-panel__close img { width: 2rem; height: 2rem; filter: invert(1); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.bookcall-panel__close:hover img,
.bookcall-panel__close:focus-visible img { transform: rotate(90deg); }
.bookcall-panel__close:focus-visible { outline: none; }

/* ---------- the form (contact form language) ---------- */
.bookcall__form {
  display: flex;
  flex-direction: column;
  gap: 3.6rem;
  padding: 6rem 6rem 1.2rem;
  font-family: var(--sans);
}
.bookcall__head { display: flex; flex-direction: column; align-items: flex-start; gap: 1.6rem; }
.tag--ink { background: var(--black); color: var(--white); font-size: 1.6rem; }
.bookcall__title {
  margin: 0;
  font-weight: 400;
  font-size: 4.8rem;
  line-height: 1.05;
  letter-spacing: -0.06em;
}
.bookcall__title em { font-family: var(--pixel); font-style: normal; }
.bookcall__note { margin: 0; color: #5c5c5c; font-size: 2rem; line-height: 1.4; letter-spacing: -0.04em; }

.bookcall__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem 3.2rem; }
.bookcall__field { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.bookcall__field--full { grid-column: 1 / -1; }
.bookcall__field label { font-size: 1.6rem; letter-spacing: -0.04em; }
.bookcall__opt { color: var(--muted-2); }
.bookcall__field input,
.bookcall__field select,
.bookcall__field textarea {
  width: 100%;
  min-width: 0;
  min-height: 4.8rem;
  padding: 1.2rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--muted-2);
  border-radius: 0;
  color: var(--black);
  font: inherit;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  transition: border-color .25s ease;
}
.bookcall__field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4rem;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23010101' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 0.4rem center;
}
.bookcall__field select:invalid { color: var(--muted-2); }
.bookcall__field textarea { height: 9rem; resize: none; }
.bookcall__field input::placeholder,
.bookcall__field textarea::placeholder { color: var(--muted-2); }
.bookcall__field input:focus-visible,
.bookcall__field select:focus-visible,
.bookcall__field textarea:focus-visible { outline: none; border-bottom-color: var(--black); }

.bookcall__tz { margin: -1.8rem 0 0; color: #5c5c5c; font-size: 1.4rem; letter-spacing: -0.02em; }
.bookcall__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.bookcall__status { margin: 0; font-size: 1.7rem; line-height: 1.5; color: #0a7a52; }
.bookcall__status[hidden] { display: none; }
.bookcall__form .btn { align-self: flex-start; }

html.bookcall-open { overflow: hidden; }

/* ---------- below 1200px rem is a fixed 10px: Menu tab's small size ---------- */
@media (max-width: 1199px) {
  .bookcall-tab,
  .bookcall-panel { --tab-w: 16.4rem; --tab-h: 4.4rem; --step: 2.2rem; --step-2: 1.1rem; }
  .bookcall-tab__body,
  .bookcall-panel__close { padding-left: 2rem; gap: 1rem; font-size: 1.6rem; }
  .bookcall-tab__body img { width: 1.6rem; height: 1.6rem; }
  .bookcall-panel__close img { width: 1.6rem; height: 1.6rem; }
  .bookcall__form { padding: 4rem 3.2rem 1rem; gap: 3rem; }
  .bookcall__title { font-size: 3.6rem; }
  .bookcall__note { font-size: 1.7rem; }
  .tag--ink { font-size: 1.3rem; }
}
@media (max-width: 599px) {
  .bookcall__form { padding: 3.2rem 2rem 0.8rem; gap: 2.6rem; }
  .bookcall__title { font-size: 3rem; }
  .bookcall__fields { grid-template-columns: 1fr; gap: 2.2rem; }
  .bookcall__tz { margin-top: -1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bookcall-tab { transition: opacity .2s linear; transform: none; opacity: 0; }
  .bookcall-tab.is-in { opacity: 1; }
}
