/* Blue Water special-order chat (/special-order/) */
.so-main { padding-bottom: 2rem; }
.so-welcome-wrap { max-width: 760px; padding-top: 2rem; padding-bottom: 2rem; }
.so-welcome h1 { margin: .2rem 0 .8rem; }
.so-lede { font-size: 1.12rem; line-height: 1.55; }
.so-sub { font-size: 1.25rem; margin: 1.4rem 0 .6rem; }
.so-steps { margin: 0 0 1rem 1.2rem; padding: 0; display: grid; gap: .55rem; line-height: 1.5; }
.so-steps li::marker { color: var(--teal); font-weight: 700; }
.so-limits { background: var(--panel, #fff8ee); border: 1px solid var(--panel-edge, #c4a56a); border-radius: 12px; padding: .75rem 1rem; }
.so-human { margin-top: 1.4rem; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.so-human-label { margin: 0 0 .6rem; font-weight: 600; }
.so-pow { min-height: 2.2rem; }
.so-pow-status { margin: 0; color: var(--ink, #1a2428); }
.so-pow-status:empty { display: none; }
.so-error { color: #8a1f1f; font-weight: 600; margin: .6rem 0 0; }
.so-privacy { color: var(--muted); font-size: .92rem; margin-top: 1rem; }

/* chat */
.so-chat-wrap { max-width: 820px; display: flex; flex-direction: column; padding-top: 1rem; }
.so-chat-head h1 { font-size: 1.6rem; margin: 0 0 .2rem; }
.so-chat-sub { color: var(--muted); margin: 0 0 .6rem; font-size: .95rem; }
.so-log { display: flex; flex-direction: column; gap: .7rem; min-height: 320px; max-height: calc(100vh - 300px); overflow-y: auto;
  padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); scroll-behavior: smooth; }
.so-msg { max-width: 86%; padding: .65rem .9rem; border-radius: 16px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.so-msg.customer { align-self: flex-end; background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.so-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.so-msg.system { align-self: center; background: var(--sand); color: var(--ink); font-size: .93rem; text-align: center; max-width: 95%; }
.so-msg.typing { align-self: flex-start; color: var(--muted); font-style: italic; background: transparent; border: 0; padding-left: .2rem; }
.so-who { display: block; font-size: .75rem; opacity: .75; margin-bottom: .15rem; font-weight: 600; }

/* cards */
.so-card { align-self: flex-start; width: min(100%, 520px); display: grid; grid-template-columns: 120px 1fr; gap: .9rem;
  border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: .9rem; box-shadow: 0 4px 14px rgba(16,42,51,.06); }
.so-card.no-img { grid-template-columns: 1fr; }
.so-card-img { width: 120px; height: 120px; object-fit: contain; border-radius: 10px; background: var(--sand); }
.so-card h3 { margin: 0 0 .2rem; font-size: 1.08rem; }
.so-card .so-meta { color: var(--muted); font-size: .9rem; margin: 0 0 .4rem; }
.so-kv { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; margin: .3rem 0; font-size: .97rem; }
.so-kv dt { color: var(--muted); }
.so-kv dd { margin: 0; font-weight: 600; }
.so-badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.so-badge.in { background: #e3f1e7; color: #245c38; }
.so-badge.out { background: #fbe9e2; color: #8a3a1f; }
.so-badge.est { background: #fff3d6; color: #7a5a12; }
.so-card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.so-note { font-size: .88rem; color: var(--muted); margin: .35rem 0 0; }

/* buttons & forms */
.so-btn { display: inline-block; border: 0; border-radius: 10px; padding: .6rem 1rem; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--teal); color: #fff; }
.so-btn:disabled { opacity: .55; cursor: default; }
.so-btn-ghost { background: #fff; color: var(--teal); border: 1.5px solid var(--teal); }
.so-btn-approve { background: var(--cactus); }
.so-btn-decline { background: var(--adobe); margin-top: .8rem; }
.so-compose { display: flex; gap: .5rem; margin-top: .7rem; align-items: flex-end; }
.so-compose textarea { flex: 1; resize: none; min-height: 48px; max-height: 160px; padding: .7rem .9rem; border: 1.5px solid var(--line);
  border-radius: 14px; font: inherit; background: #fff; }
.so-compose textarea:focus { outline: 2px solid var(--water-lt); outline-offset: 1px; }
.so-slow { margin-top: .6rem; padding: .6rem .9rem; border-radius: 10px; background: #fff3d6; color: #5e4710; font-size: .95rem; }

.so-order { align-self: stretch; border: 1.5px solid var(--clay); border-radius: 16px; background: var(--panel, #fff8ee); padding: 1rem; }
.so-order h3 { margin: 0 0 .3rem; }
.so-order .so-item { margin: 0 0 .6rem; font-weight: 600; }
.so-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .8rem; }
.so-field { display: flex; flex-direction: column; gap: .25rem; }
.so-field.full { grid-column: 1 / -1; }
.so-field label, .so-label { font-weight: 600; font-size: .93rem; }
.so-field input, .so-field select, .so-order textarea, .so-review textarea { font: inherit; padding: .55rem .7rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%; box-sizing: border-box; }
.so-unit-toggle { display: inline-flex; border: 1.5px solid var(--teal); border-radius: 10px; overflow: hidden; }
.so-unit-toggle button { border: 0; background: #fff; color: var(--teal); font: inherit; font-weight: 700; padding: .5rem .9rem; cursor: pointer; }
.so-unit-toggle button[aria-pressed="true"] { background: var(--teal); color: #fff; }
.so-est { margin: .4rem 0 0; font-size: .95rem; }
.so-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.so-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* review page */
.so-review-body { background: var(--sand); }
.so-review { max-width: 680px; margin: 2rem auto; padding: 1.5rem; background: #fff; border-radius: 16px; border: 1px solid var(--line); }
.so-review-table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; }
.so-review-table th { text-align: left; color: var(--muted); font-weight: 600; padding: .35rem .6rem .35rem 0; vertical-align: top; width: 34%; }
.so-review-table td { padding: .35rem 0; }

@media (max-width: 600px) {
  .so-card { grid-template-columns: 88px 1fr; }
  .so-card-img { width: 88px; height: 88px; }
  .so-card.no-img { grid-template-columns: 1fr; }
  .so-grid { grid-template-columns: 1fr; }
  .so-msg { max-width: 92%; }
  .so-log { max-height: calc(100vh - 280px); min-height: 260px; }
  .so-welcome-wrap { padding-top: 1.2rem; }
}

/* WB-34 instant name suggestions (store's own in-stock items), shown above the message box */
.so-suggest {
  list-style: none; margin: .4rem 0 .35rem; padding: .25rem 0;
  border: 1px solid rgba(16, 42, 51, .18); border-radius: 12px;
  background: #fffdf8; box-shadow: 0 8px 22px rgba(16, 42, 51, .12);
  max-height: 15rem; overflow-y: auto;
}
.so-suggest[hidden] { display: none; }
.so-suggest-head { padding: .3rem .85rem; font-size: .78rem; color: #5a6a6e; }
.so-suggest-item {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem;
  padding: .5rem .85rem; cursor: pointer; min-height: 40px;
}
.so-suggest-item + .so-suggest-item { border-top: 1px solid rgba(16, 42, 51, .08); }
.so-suggest-item:hover, .so-suggest-item:focus { background: #f3efe4; }
.so-suggest-name { font-weight: 650; color: #102a33; }
.so-suggest-meta { font-size: .85rem; color: #4d6270; }
/* WB-34: let the message box grow to fit the wrapped placeholder on narrow phones */
@media (max-width: 480px) { .so-compose textarea { min-height: 76px; } }
/* WB-34: on narrow phones the stock card's label column squeezed values ("Member / price"); stack label over value */
@media (max-width: 400px) {
  .so-card .so-kv { grid-template-columns: 1fr; gap: 0; }
  .so-card .so-kv dd { margin: 0 0 .3rem; }
}

/* Intro fix (Dec 3, 2026): after the human check, keep the intro visible and wait for "Start chat" */
.so-verified { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.so-verified[hidden] { display: none; }
.so-verified-badge { margin: 0; font-weight: 700; color: #1f6b3a; }
.so-btn-start { background: var(--teal, #1f5d6b); color: #fff; padding: .8rem 1.6rem; font-size: 1.05rem; min-height: 48px; }
.so-btn-start:focus-visible { outline: 3px solid var(--water-lt, #7fb3bf); outline-offset: 2px; }
