/* ==========================================================================
   /host-badge — "Book on Softbnb" badge explainer + generator.
   Built on css/softbnb-ds.css tokens (scoped to .sb-page); everything here is
   prefixed .hb so it cannot touch another page. Mobile-first.
   ========================================================================== */

.hb { padding-top: 66px; }                      /* the fixed site header */

.hb .sb-eyebrow { margin-bottom: var(--sb-3); }
.hb code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em; padding: 1px 6px; border-radius: 6px;
  background: var(--sb-surface-2); color: var(--sb-ink-soft);
}

.hb-card {
  background: var(--sb-surface);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-r-lg);
  box-shadow: var(--sb-shadow-1);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hb-hero { padding-block: var(--sb-7) var(--sb-6); }
.hb-hero__grid { display: grid; gap: var(--sb-7); align-items: center; }
.hb-hero .sb-h1 { color: var(--sb-ink); max-width: 16ch; }
.hb-hero__lede { margin-top: var(--sb-4); }
.hb-hero__actions { display: flex; flex-wrap: wrap; gap: var(--sb-3); margin-top: var(--sb-6); }
.hb-hero__actions .sb-btn { flex: 1 1 auto; }

@media (min-width: 576px) {
  .hb-hero__actions .sb-btn { flex: 0 0 auto; }
}
@media (min-width: 992px) {
  .hb-hero { padding-block: var(--sb-9) var(--sb-8); }
  .hb-hero__grid { grid-template-columns: 1.05fr 1fr; gap: var(--sb-8); }
}

/* The "your site" frames the badge is shown in. Decorative only. */
.hb-stage { position: relative; padding-bottom: var(--sb-7); }
.hb-site {
  background: #FFFFFF;
  border: 1px solid #E7DFD6;
  border-radius: var(--sb-r-md);
  box-shadow: var(--sb-shadow-3);
  overflow: hidden;
  max-width: 460px;
}
.hb-site__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid #EFE8E0; background: #F7F3EE;
}
.hb-site__bar i { width: 9px; height: 9px; border-radius: 50%; background: #D6CABB; }
.hb-site__bar span {
  margin-left: 10px; padding: 3px 12px; border-radius: 999px;
  background: #FFFFFF; color: #786D64; font-size: 1.2rem; font-family: var(--sb-font-meta);
}
.hb-site__body { padding: var(--sb-5); display: grid; gap: var(--sb-4); }
.hb-site__photo {
  height: 132px; border-radius: 10px;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(255,255,255,.55), transparent 55%),
    linear-gradient(135deg, #E9D8C4 0%, #CDB59A 45%, #A98B6C 100%);
}
.hb-site__lines { display: grid; gap: 8px; }
.hb-site__lines b { display: block; height: 9px; border-radius: 6px; background: #EFE8E0; }
.hb-site__lines b.is-short { width: 58%; }
.hb-site:not(.hb-site--dark) .hb-site__lines { padding-bottom: 72px; }
.hb-site__badge { display: flex; }
.hb-site__badge svg { max-width: 100%; height: auto; }

.hb-site--dark {
  position: absolute; right: 0; bottom: 0; width: 78%; max-width: 360px;
  background: #14100E; border-color: #2C2521;
}
.hb-site--dark .hb-site__bar { background: #1A1614; border-color: #2C2521; }
.hb-site--dark .hb-site__bar i { background: #4A3F37; }
.hb-site--dark .hb-site__bar span { background: #0F0D0C; color: #A99E95; }
.hb-site--dark .hb-site__lines b { background: #2C2521; }
.hb-site--dark .hb-site__body { padding: var(--sb-4) var(--sb-5) var(--sb-5); }

@media (max-width: 575.98px) {
  .hb-site { max-width: none; width: 92%; }
  .hb-site__photo { height: 96px; }
  .hb-site--dark { width: 80%; }
}

/* ── How it works ─────────────────────────────────────────────────────── */
.hb-how { padding-block: var(--sb-7); }
.hb-steps {
  list-style: none; margin: var(--sb-6) 0 0; padding: 0;
  display: grid; gap: var(--sb-4);
}
.hb-step {
  position: relative; padding: var(--sb-5);
  border-top: 1px solid var(--sb-border);
}
.hb-step__n {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--sb-primary-soft); color: var(--sb-primary-strong);
  font-weight: 700; font-size: var(--sb-t-small);
}
body.dark-mode .hb-step__n { color: var(--sb-gold); }
.hb-step__title { font-size: var(--sb-t-h4); font-weight: 500; color: var(--sb-ink); margin: var(--sb-3) 0 var(--sb-2); }
.hb-step__text { margin: 0; color: var(--sb-muted); font-size: var(--sb-t-small); line-height: var(--sb-lh-body); }

.hb-where {
  display: grid; gap: var(--sb-3); margin-top: var(--sb-6);
  grid-template-columns: 1fr;
}
.hb-where__item {
  display: grid; gap: 2px; padding: var(--sb-4) var(--sb-5);
  background: var(--sb-surface-2); border-radius: var(--sb-r-md);
}
.hb-where__item strong { font-weight: 500; color: var(--sb-ink); font-size: var(--sb-t-small); }
.hb-where__item span { color: var(--sb-muted); font-size: var(--sb-t-caption); }

@media (min-width: 576px) { .hb-where { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) {
  .hb-how { padding-block: var(--sb-8); }
  .hb-steps { grid-template-columns: repeat(3, 1fr); gap: var(--sb-6); }
  .hb-step { padding: var(--sb-5) 0 0; }
  .hb-where { grid-template-columns: repeat(4, 1fr); }
}

/* ── Generator ────────────────────────────────────────────────────────── */
.hb-gen { padding-block: var(--sb-7); }
.hb-gen .sb-h2 { margin-bottom: var(--sb-6); }
.hb-gen__grid { display: grid; gap: var(--sb-4); }
@media (min-width: 992px) {
  .hb-gen { padding-block: var(--sb-8); }
  .hb-gen__grid { grid-template-columns: minmax(280px, 380px) 1fr; gap: var(--sb-5); align-items: start; }
}

.hb-form { padding: var(--sb-5); display: grid; gap: var(--sb-5); }
.hb-field { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--sb-2); }
.hb-label {
  display: block; margin: 0; padding: 0;
  font-size: var(--sb-t-caption); font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sb-muted);
}
.hb-select {
  width: 100%; min-height: 48px; padding: 0 40px 0 14px;
  font: inherit; font-size: var(--sb-t-body); color: var(--sb-text);
  background: var(--sb-surface) 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 1.5l5 5 5-5' fill='none' stroke='%23786D64' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--sb-border-strong); border-radius: var(--sb-r-sm);
  -webkit-appearance: none; appearance: none;
}
.hb-select:focus-visible { outline: 3px solid var(--sb-focus); outline-offset: 2px; }

.hb-seg {
  display: flex; padding: 4px; gap: 4px;
  background: var(--sb-surface-2); border: 1px solid var(--sb-border); border-radius: var(--sb-r-sm);
}
.hb-seg__opt { flex: 1 1 0; margin: 0; position: relative; cursor: pointer; }
.hb-seg__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hb-seg__opt span {
  display: grid; place-items: center; min-height: 40px; padding: 0 var(--sb-3);
  border-radius: 6px; font-size: var(--sb-t-small); font-weight: 500; color: var(--sb-muted);
  transition: background var(--sb-dur-fast) var(--sb-ease), color var(--sb-dur-fast) var(--sb-ease);
}
.hb-seg__opt:hover span { color: var(--sb-ink); }
.hb-seg__opt input:checked + span { background: var(--sb-surface); color: var(--sb-ink); box-shadow: var(--sb-shadow-1); }
.hb-seg__opt input:focus-visible + span { outline: 3px solid var(--sb-focus); outline-offset: 1px; }

.hb-note { margin: 0; font-size: var(--sb-t-small); color: var(--sb-muted); line-height: var(--sb-lh-body); }
.hb-note strong { color: var(--sb-ink); font-weight: 500; }

.hb-out { padding: var(--sb-4); display: grid; gap: var(--sb-5); min-width: 0; }
@media (min-width: 576px) { .hb-out { padding: var(--sb-5); } }

.hb-preview {
  position: relative; display: grid; place-items: center;
  min-height: 150px; padding: var(--sb-7) var(--sb-4) var(--sb-6);
  border-radius: var(--sb-r-md);
  background-color: #FFFFFF;
  background-image: radial-gradient(#E7DFD6 1px, transparent 1px);
  background-size: 16px 16px;
  border: 1px solid var(--sb-border);
  transition: background-color var(--sb-dur) var(--sb-ease);
}
.hb-preview.is-dark { background-color: #14100E; background-image: radial-gradient(#2C2521 1px, transparent 1px); border-color: #2C2521; }
.hb-preview a { display: inline-flex; max-width: 100%; }
.hb-preview img { display: block; max-width: 100%; height: auto; }
.hb-preview__tag {
  position: absolute; top: 10px; left: 12px;
  font-size: var(--sb-t-micro); letter-spacing: .08em; text-transform: uppercase; color: #786D64;
}
.hb-preview.is-dark .hb-preview__tag { color: #A99E95; }

.hb-code { display: grid; gap: var(--sb-2); min-width: 0; }
.hb-code__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sb-3); }
.hb-textarea,
.hb-input {
  width: 100%; margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.3rem; line-height: 1.55; color: var(--sb-text);
  background: var(--sb-surface-2); border: 1px solid var(--sb-border); border-radius: var(--sb-r-sm);
  padding: 12px 14px;
}
.hb-textarea { resize: vertical; min-height: 168px; word-break: break-all; }
.hb-input { min-height: 46px; text-overflow: ellipsis; }
.hb-textarea:focus-visible,
.hb-input:focus-visible { outline: 3px solid var(--sb-focus); outline-offset: 2px; }
.hb-hint { margin: 0; font-size: var(--sb-t-caption); color: var(--sb-muted); }

.hb-copy {
  flex: none; min-height: 44px; padding: 0 var(--sb-4);
  font: inherit; font-size: var(--sb-t-small); font-weight: 500;
  color: var(--sb-ink); background: var(--sb-surface);
  border: 1px solid var(--sb-border-strong); border-radius: var(--sb-r-sm); cursor: pointer;
  transition: background var(--sb-dur-fast) var(--sb-ease), border-color var(--sb-dur-fast) var(--sb-ease), transform var(--sb-dur-press) var(--sb-ease);
}
.hb-copy:hover { background: var(--sb-surface-2); border-color: var(--sb-ink); }
.hb-copy:active { transform: scale(.97); }
.hb-copy.is-done { color: var(--sb-success); border-color: currentColor; }
.hb-copy:focus-visible { outline: 3px solid var(--sb-focus); outline-offset: 2px; }
.hb-status { margin: 0; min-height: 1.4em; font-size: var(--sb-t-small); color: var(--sb-success); }

/* Empty / signed-out states */
.hb-empty { padding: var(--sb-6) var(--sb-5); max-width: 640px; }
.hb-empty__title { margin: 0 0 var(--sb-2); font-size: var(--sb-t-h4); font-weight: 500; color: var(--sb-ink); }
.hb-empty__text { margin: 0; color: var(--sb-muted); font-size: var(--sb-t-small); line-height: var(--sb-lh-body); max-width: 52ch; }
.hb-empty__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sb-4) var(--sb-5); margin-top: var(--sb-5); }

/* ── What it shows ────────────────────────────────────────────────────── */
.hb-shows { padding-block: var(--sb-7); }
.hb-shows__grid { display: grid; gap: var(--sb-6); align-items: center; }
.hb-shows__lede { margin-top: var(--sb-4); }
.hb-sample { margin: 0; padding: var(--sb-6) var(--sb-5); display: grid; gap: var(--sb-4); justify-items: center; text-align: center; }
.hb-sample__badge { display: flex; max-width: 100%; }
.hb-sample__badge svg { max-width: 100%; height: auto; }
.hb-sample__cap { font-size: var(--sb-t-caption); color: var(--sb-muted); max-width: 40ch; }
@media (min-width: 992px) {
  .hb-shows { padding-block: var(--sb-8); }
  .hb-shows__grid { grid-template-columns: 1.2fr 1fr; gap: var(--sb-8); }
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.hb-faq { padding-block: var(--sb-6) var(--sb-8); }
.hb-faq__inner { max-width: 820px; }
.hb-faq__list { margin-top: var(--sb-5); border-top: 1px solid var(--sb-border); }
.hb-q { border-bottom: 1px solid var(--sb-border); }
.hb-q summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sb-4);
  min-height: 56px; padding: var(--sb-3) 0; cursor: pointer; list-style: none;
  font-size: var(--sb-t-body); font-weight: 500; color: var(--sb-ink);
}
.hb-q summary::-webkit-details-marker { display: none; }
.hb-q summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform var(--sb-dur) var(--sb-ease-out);
}
.hb-q[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.hb-q summary:focus-visible { outline: 3px solid var(--sb-focus); outline-offset: 2px; }
.hb-q p { margin: 0 0 var(--sb-4); color: var(--sb-muted); font-size: var(--sb-t-small); line-height: var(--sb-lh-body); max-width: 64ch; }

/* Bigger tap target for text links, underline kept under the words. */
.hb .sb-link { min-height: 44px; }
.hb .sb-link::after { bottom: 10px; }

/* headerH.blade.php paints every dark-mode field slate navy with !important,
   and softbnb-home.css answers that by making .sb-page inputs transparent and
   borderless. Neither suits a code box: restore this page's own field look. */
body.dark-mode .sb-page .hb-select,
body.dark-mode .sb-page textarea.hb-textarea,
body.dark-mode .sb-page input.hb-input:not([type=submit]):not([type=button]):not([type=checkbox]):not([type=radio]) {
  background-color: var(--sb-surface-2) !important;
  color: var(--sb-text) !important;
  -webkit-text-fill-color: var(--sb-text) !important;
  border-color: var(--sb-border-strong) !important;
}

/* headerH.blade.php also paints every dark-mode <section> slate navy with
   !important. Let this page's own warm ground show through instead. */
body.dark-mode .hb section { background-color: transparent !important; }
body.dark-mode .hb section.sb-section--sand { background-color: var(--sb-surface-2) !important; }

@media (prefers-reduced-motion: reduce) {
  .hb *, .hb *::after { transition: none !important; }
}

/* At night the lifted "selected" segment reads better one step lighter. */
body.dark-mode .hb-seg__opt input:checked + span { background: var(--sb-surface-3); }
