/* ============================================================
   WeRhino — /quote (chat-style project request)
   Same tokens as home.css. Light page: no preloader, no WebGL.
   ============================================================ */

:root {
  --bg:        #0E0E0E;
  --bg-card:   #161616;
  --bg-raise:  #1E1E1E;
  --text:      #F8F8F8;
  --muted:     #A0A0A0;
  --accent:    #C9A86A;
  --accent-dim:rgba(201,168,106,0.15);
  --border:    rgba(248,248,248,0.08);
  --font-d:    'Cormorant Garamond', Georgia, serif;
  --font-b:    'Inter', system-ui, sans-serif;
  --ease:      cubic-bezier(0.22,1,0.36,1);
  --page-pad:  clamp(16px, 5vw, 80px);
  --radius:    6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-b); background: var(--bg); color: var(--text);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.q-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.q-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- header ---------- */
.q-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px var(--page-pad); border-bottom: 1px solid var(--border);
}
.q-header__logo img { width: 92px; height: auto; }
.q-header__right { display: flex; align-items: center; gap: 16px; }
.q-header__phone { font-size: .82rem; font-weight: 500; text-decoration: none; color: var(--accent); white-space: nowrap; }
.q-lang { display: flex; border: 1px solid var(--border); border-radius: 100px; overflow: hidden; }
.q-lang button { padding: 6px 10px; font-size: .68rem; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.q-lang button[aria-pressed="true"] { background: var(--accent-dim); color: var(--accent); }

/* ---------- layout ---------- */
.q-main {
  flex: 1; width: 100%; max-width: 1180px; margin-inline: auto;
  padding: clamp(16px, 4vw, 56px) var(--page-pad) 20px;
  display: grid; gap: clamp(18px, 4vw, 64px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px); align-items: start;
}
.q-label { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .4em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.q-title { font-family: var(--font-d); font-weight: 500; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -.01em; text-wrap: balance; }
.q-lead { margin-top: 1.2rem; color: var(--muted); max-width: 46ch; font-size: 1rem; }
.q-points { list-style: none; margin-top: 1.6rem; display: grid; gap: .7rem; }
.q-points li { position: relative; padding-left: 1.5rem; font-size: .92rem; }
.q-points li::before { content: ""; position: absolute; left: 0; top: .62em; width: .7rem; height: 1px; background: var(--accent); }

/* ---------- chat ---------- */
.q-chat {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden;
  height: min(680px, calc(100dvh - 150px)); min-height: 440px;
}
.q-chat__head {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  border-bottom: 1px solid var(--border); font-size: .8rem; font-weight: 500; color: var(--muted);
}
.q-chat__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.q-chat__head > span:not(.q-chat__dot) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-chat__dot { flex: none; }
.q-chat__restart { margin-left: auto; flex: none; white-space: nowrap; font-size: .72rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.q-chat__restart:hover { color: var(--text); }

.q-log { position: relative; flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }
.q-msg { max-width: 86%; padding: 11px 15px; border-radius: 16px; font-size: .95rem; overflow-wrap: anywhere; animation: q-in .35s var(--ease) both; }
.q-msg--bot { align-self: flex-start; background: var(--bg-raise); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.q-msg--user { align-self: flex-end; background: var(--accent); color: var(--bg); border-bottom-right-radius: 5px; font-weight: 500; }
.q-msg a:not(.q-btn) { color: var(--accent); }
.q-msg--result { max-width: 100%; align-self: stretch; border-color: rgba(201,168,106,.4); padding: 18px; }
.q-price { font-family: var(--font-d); font-size: clamp(1.9rem, 6vw, 2.5rem); line-height: 1.1; color: var(--accent); margin: 8px 0 10px; font-variant-numeric: lining-nums; }
.q-notes { list-style: none; display: grid; gap: 5px; margin-top: 10px; font-size: .84rem; color: var(--muted); }
.q-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.q-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: .9em 1.6em; border-radius: 100px;
  font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  background: var(--accent); color: var(--bg); transition: background .3s;
}
.q-btn:hover { background: #d9bc83; }
.q-btn--ghost { background: none; color: var(--text); border: 1px solid rgba(248,248,248,.25); }
.q-btn--ghost:hover { background: none; border-color: var(--accent); color: var(--accent); }

.q-thumbs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-self: flex-end; max-width: 86%; animation: q-in .35s var(--ease) both; }
.q-thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

/* drawings to tap (layout, height, sides…): gold = our cabinetry, grey = the room */
.q-cards { align-self: stretch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; animation: q-in .35s var(--ease) both; }
.q-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 9px;
  background: var(--bg-raise); border: 1px solid var(--border); border-radius: 12px;
  font-size: .82rem; font-weight: 500; line-height: 1.25; text-align: center; color: var(--text);
  transition: border-color .25s, background .25s, opacity .25s;
}
.q-card svg { width: 100%; max-width: 150px; height: auto; }
.q-card:hover, .q-card:focus-visible { border-color: rgba(201,168,106,.6); }
.q-card[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-dim); }
.q-cards.is-done .q-card { cursor: default; pointer-events: none; }
.q-cards.is-done .q-card[aria-pressed="false"] { opacity: .35; }
.q-card .r { fill: none; stroke: #8a8a8a; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.q-card .g { fill: none; stroke: #6a6a6a; stroke-width: 1.2; stroke-dasharray: 3 3; }
.q-card .f { fill: #3a3a3a; }
.q-card .c { fill: var(--accent); }
.q-card .cl { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.q-card .k { fill: none; stroke: var(--bg); stroke-width: 1.5; }
.q-card .o { fill: none; stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; }

.q-typing { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; background: var(--bg-raise); border: 1px solid var(--border); border-radius: 16px; border-bottom-left-radius: 5px; }
.q-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: q-dot 1.1s infinite ease-in-out; }
.q-typing i:nth-child(2) { animation-delay: .15s; }
.q-typing i:nth-child(3) { animation-delay: .3s; }

.q-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px; }
.q-chips:not(:empty) { padding-bottom: 12px; }
.q-chip {
  padding: 10px 16px; border: 1px solid rgba(201,168,106,.55); border-radius: 100px;
  font-size: .86rem; font-weight: 500; color: var(--accent); min-height: 44px;
  transition: background .25s, color .25s; animation: q-in .35s var(--ease) both;
}
.q-chip:hover, .q-chip:focus-visible { background: var(--accent); color: var(--bg); }
.q-chip--main { background: var(--accent); color: var(--bg); }

.q-composer { display: flex; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.q-composer[hidden] { display: none; }
.q-composer input[type="text"], .q-composer input[type="tel"], .q-composer input[type="email"] {
  flex: 1; min-width: 0; padding: 12px 16px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px; /* 16px: no zoom on iOS */
}
.q-composer input::placeholder { color: #6f6f6f; }
.q-composer input:focus { outline: none; border-color: var(--accent); }
.q-send { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--bg); display: grid; place-items: center; }
.q-send:disabled { opacity: .4; cursor: default; }

.q-noscript { grid-column: 1 / -1; color: var(--muted); }
.q-noscript a { color: var(--accent); }
.no-js .q-chat { display: none; }

.q-footer { display: flex; justify-content: space-between; gap: 12px; padding: 14px var(--page-pad) calc(14px + env(safe-area-inset-bottom)); font-size: .72rem; color: var(--muted); border-top: 1px solid var(--border); }

@keyframes q-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes q-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------- phone: the conversation is the page ---------- */
@media (max-width: 860px) {
  .q-main { grid-template-columns: 1fr; padding-top: 16px; padding-bottom: 12px; gap: 14px; }
  .q-label { margin-bottom: .5rem; }
  .q-title { font-size: clamp(1.7rem, 7.4vw, 2.3rem); }
  .q-lead, .q-points { display: none; }
  .q-chat { height: calc(100dvh - 190px); min-height: 400px; }
  .q-footer { display: none; }
}
@media (max-width: 380px) {
  .q-header__phone { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .q-msg, .q-chip, .q-thumbs, .q-cards { animation: none; }
  .q-typing i { animation: none; opacity: .6; }
}

/* ============================================================
   /quote/status — the customer follows their request
   ============================================================ */
.s-main { flex: 1; width: 100%; max-width: 760px; margin-inline: auto; padding: clamp(20px, 5vw, 56px) var(--page-pad) 28px; }
.s-title { font-size: clamp(1.9rem, 5vw, 3rem); margin-bottom: clamp(18px, 3vw, 30px); }
.s-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: clamp(18px, 4vw, 28px); margin-bottom: 16px; }
.s-card h2 { font-family: var(--font-d); font-weight: 500; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: lining-nums; }
.s-card h3 { font-size: .68rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); margin: 22px 0 8px; }
.s-card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.s-card__head span { font-size: .78rem; color: var(--muted); }
.s-lead { color: var(--muted); }
.s-fine { font-size: .84rem; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.s-now { margin-top: 14px; }
.s-price { margin: 0; }

.s-form { margin-top: 18px; display: grid; gap: 8px; }
.s-form[hidden] { display: none; }
.s-form label { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.s-row { display: flex; flex-wrap: wrap; gap: 10px; }
.s-row input {
  flex: 1 1 220px; min-width: 0; padding: 12px 16px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px;
}
.s-row input:focus { outline: none; border-color: var(--accent); }
.s-row .q-btn:disabled { opacity: .5; cursor: default; }
.s-link { justify-self: start; font-size: .8rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.s-link:hover { color: var(--text); }
.s-msg { margin-top: 14px; font-size: .9rem; color: var(--accent); min-height: 1.4em; }

/* where the request is: one row of steps, the current one in gold */
.s-steps { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 18px; }
.s-steps li { position: relative; padding-top: 14px; font-size: .72rem; line-height: 1.25; color: #6f6f6f; }
.s-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px; background: #2a2a2a; }
.s-steps li.is-done { color: var(--muted); }
.s-steps li.is-done::before { background: rgba(201,168,106,.45); }
.s-steps li.is-now { color: var(--text); font-weight: 600; }
.s-steps li.is-now::before { background: var(--accent); }

.s-note { margin-top: 16px; padding: 14px 16px; border-left: 2px solid var(--accent); background: var(--accent-dim); border-radius: 0 10px 10px 0; }
.s-note strong { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.s-note p { white-space: pre-line; overflow-wrap: anywhere; }
.s-docs { display: flex; flex-wrap: wrap; gap: 8px; }
.s-doc { padding: 10px 16px; border: 1px solid rgba(201,168,106,.55); border-radius: 100px; font-size: .86rem; font-weight: 500; color: var(--accent); min-height: 44px; }
.s-doc:hover { background: var(--accent); color: var(--bg); }
.s-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.s-photos img { width: 104px; height: 104px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-raise); }
.s-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.s-foot[hidden] { display: none; }
@media (max-width: 520px) {
  .s-steps li { font-size: .62rem; }
}

/* many options at once (what goes inside the closet): three smaller cards per row */
.q-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.q-cards--3 .q-card { padding: 8px 4px 7px; font-size: .72rem; gap: 4px; }

/* the closet's first layout, drawn by the planner: one elevation per wall */
.q-plan { align-self: stretch; padding: 12px; background: var(--bg-raise); border: 1px solid rgba(201,168,106,.35); border-radius: 12px; display: grid; gap: 10px; color: var(--text); animation: q-in .35s var(--ease) both; }
.q-plan svg { font-family: var(--font-b); max-height: 260px; margin: 0 auto; }
.q-plan__list { font-size: .86rem; }
.q-plan__fine { font-size: .76rem; color: var(--muted); }
.q-parts { font-size: .9rem; margin: -4px 0 8px; }
.s-plan { margin-top: 10px; padding: 12px; background: var(--bg-raise); border: 1px solid var(--border); border-radius: 12px; display: grid; gap: 10px; }

/* booking the measurement visit: days, times, address */
.b-box { padding: 16px; background: var(--bg-raise); border: 1px solid rgba(201,168,106,.4); border-radius: 12px; display: grid; gap: 10px; margin-top: 14px; }
.b-box--chat { align-self: stretch; margin-top: 0; animation: q-in .35s var(--ease) both; }
.b-title { font-size: 1rem; }
.b-fine { font-size: .82rem; color: var(--muted); }
.b-label { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: grid; gap: 6px; }
.b-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }
.b-day { flex: none; min-width: 62px; padding: 8px 6px; border: 1px solid var(--border); border-radius: 12px; display: grid; justify-items: center; gap: 1px; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.b-day b { font-family: var(--font-d); font-size: 1.5rem; line-height: 1; color: var(--text); font-variant-numeric: lining-nums; letter-spacing: 0; }
.b-day[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.b-times { display: flex; flex-wrap: wrap; gap: 8px; }
.b-time { padding: 9px 14px; min-height: 42px; border: 1px solid rgba(201,168,106,.5); border-radius: 100px; font-size: .86rem; font-weight: 500; color: var(--accent); }
.b-time[aria-pressed="true"] { background: var(--accent); color: var(--bg); }
.b-form { display: grid; gap: 10px; }
.b-form[hidden] { display: none; }
.b-form input { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; letter-spacing: 0; text-transform: none; }
.b-form input:focus { outline: none; border-color: var(--accent); }
.b-form .q-btn { justify-self: start; }
.b-form .q-btn:disabled, .q-actions .q-btn:disabled { opacity: .5; cursor: default; }
.b-msg { font-size: .88rem; color: var(--accent); }
.b-msg:empty { display: none; }
.b-done { font-size: .95rem; }
.s-wait { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--accent-dim); font-size: .92rem; }
.s-book { margin-top: 14px; }

/* the plan in 3D (drag to turn) */
.v3d { border-radius: 12px; overflow: hidden; background: radial-gradient(120% 90% at 50% 20%, #3a3733 0%, #1b1a18 70%); min-height: 240px; display: grid; place-items: center; touch-action: none; }
.v3d canvas { display: block; width: 100% !important; cursor: grab; }
.v3d canvas:active { cursor: grabbing; }

/* a conversation that feels attended: who is on the other side, presence, typing, times */
.q-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--bg); border: 1px solid rgba(201,168,106,.5); display: grid; place-items: center; overflow: hidden; }
.q-avatar img { width: 22px; height: 22px; }
.q-chat__who { display: grid; line-height: 1.25; min-width: 0; }
.q-chat__who strong { font-size: .86rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-chat__who small { font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.q-live { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: q-live 2s infinite; flex: none; }
@keyframes q-live { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); } 70% { box-shadow: 0 0 0 7px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.q-msg--first { position: relative; margin-left: 32px; margin-top: 4px; }
.q-msg--bot:not(.q-msg--first):not(.q-msg--result) { margin-left: 32px; }
.q-msg--first::before { content: ""; position: absolute; left: -32px; bottom: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--bg) url(/assets/favicon.svg) center / 15px no-repeat; border: 1px solid rgba(201,168,106,.45); }
.q-typing { margin-left: 32px; align-items: center; }
.q-typing span { font-size: .72rem; color: var(--muted); margin-left: 4px; }
.q-time { font-size: .66rem; color: #7a7a7a; align-self: flex-start; margin: -6px 0 0 34px; }
.q-time--me { align-self: flex-end; margin: -6px 4px 0 0; }
.q-got { margin-top: 10px; font-size: .84rem; color: #4ade80; }
@media (prefers-reduced-motion: reduce) { .q-live { animation: none; } }

/* the rendered image of the plan */
.s-render { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-raise); min-height: 120px; cursor: zoom-in; }
