/* ==========================================================================
   Book a demo (demo.html). Loaded after neishot-bespoke.css and uses its
   tokens (--ns-ink, --ns-signal, --ns-line ...). Squared tiles and buttons
   (no capsules), hairline borders, no one-side accent stripes. The selected
   tile shows a tinted fill, a full border and a bottom keyline, like the
   product matrix on the home page.
   ========================================================================== */

.ns-demo { background: var(--ns-bg); }
.ns-demo-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.ns-demo-main { min-width: 0; }

/* Steps ---------------------------------------------------------------- */
.ns-demo-step { background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 12px; padding: 26px 26px 24px; margin: 0 0 18px; min-width: 0; }
.ns-demo-step legend { float: left; width: 100%; display: flex; align-items: baseline; gap: 12px; font-family: var(--ns-display); font-weight: 600; font-size: 1.2rem; color: var(--ns-ink); margin: 0 0 18px; padding: 0; letter-spacing: -0.01em; }
.ns-demo-step legend + * { clear: both; }
.ns-demo-num { font-family: var(--ns-mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; color: var(--ns-signal-deep); }

/* Selectable tiles (radio inside a label) ------------------------------ */
.ns-demo-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--ns-line); border: 1px solid var(--ns-line); border-radius: 10px; overflow: hidden; }
.ns-demo-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--ns-line); border: 1px solid var(--ns-line); border-radius: 10px; overflow: hidden; }
.ns-demo-tile { --p: var(--ns-signal); position: relative; display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 15px 16px 16px; background: var(--ns-surface); cursor: pointer; transition: background .18s ease; min-width: 0; }
.ns-demo-tile:hover { background: #fbfdff; }
.ns-demo-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ns-demo-tile-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--ns-ink); line-height: 1.25; }
.ns-demo-tile-name::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--p); }
.ns-demo-tile-line { font-size: 13px; line-height: 1.4; color: var(--ns-muted); padding-left: 16px; }
.ns-demo-tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--p); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.ns-demo-tile.is-checked { background: color-mix(in srgb, var(--p) 7%, #fff); }
.ns-demo-tile.is-checked::after { transform: scaleX(1); }
.ns-demo-tile.is-checked .ns-demo-tile-name::after { content: "\2713"; margin-left: auto; font-size: 13px; color: color-mix(in srgb, var(--p) 70%, #000); }
.ns-demo-tile:focus-within { outline: 2px solid var(--ns-signal-deep); outline-offset: -2px; z-index: 1; }
/* Eleven products: the last tile takes the spare cell so the matrix closes. */
.ns-demo-tile-other { grid-column: span 2; }
.ns-demo-ways .ns-demo-tile-name::before { display: none; }
.ns-demo-ways .ns-demo-tile-line { padding-left: 0; }

/* Day and time pickers -------------------------------------------------- */
.ns-demo-hint { font-size: 14.5px; margin: 0 0 14px; color: var(--ns-ink-soft); }
.ns-demo-status { font-size: 14.5px; color: var(--ns-muted); padding: 14px 0 6px; }
.ns-demo-status.is-error { color: #8a1c1c; background: #fdf1f1; border: 1px solid #f3cccc; border-radius: 8px; padding: 14px 16px; }
.ns-demo-status.is-error a { color: #8a1c1c; font-weight: 600; text-decoration: underline; }
.ns-demo-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 0 0 18px; }
.ns-demo-day, .ns-demo-time { font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px solid var(--ns-line); border-radius: 8px; background: var(--ns-surface); color: var(--ns-ink); cursor: pointer; padding: 10px 6px; line-height: 1.2; transition: border-color .15s ease, background .15s ease; -webkit-appearance: none; appearance: none; }
.ns-demo-day:hover, .ns-demo-time:hover { border-color: var(--ns-signal); }
.ns-demo-day:focus-visible, .ns-demo-time:focus-visible { outline: 2px solid var(--ns-signal-deep); outline-offset: 2px; }
.ns-demo-day .wd { font-family: var(--ns-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ns-muted); }
.ns-demo-day .dn { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ns-demo-day .mo { font-size: 12px; color: var(--ns-muted); }
.ns-demo-day[aria-checked="true"], .ns-demo-time[aria-checked="true"] { background: var(--ns-signal-deep); border-color: var(--ns-signal-deep); color: #fff; }
.ns-demo-day[aria-checked="true"] .wd, .ns-demo-day[aria-checked="true"] .mo { color: #d6ecfa; }
.ns-demo-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.ns-demo-time { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 12px 6px; }
.ns-demo-times-head { grid-column: 1 / -1; font-size: 14px; font-weight: 600; color: var(--ns-ink); margin: 0 0 2px; }
.ns-demo-yourtime { font-size: 13.5px; color: var(--ns-muted); margin: 12px 0 0; }

/* Fields ------------------------------------------------------------------ */
.ns-demo-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.ns-demo-field { margin: 0; min-width: 0; }
.ns-demo-field-wide { grid-column: 1 / -1; }
#dm-address-wrap { margin-top: 16px; }
.ns-demo-field label { display: block; font-size: 14px; font-weight: 600; color: var(--ns-ink); margin: 0 0 6px; }
.ns-demo-optional { font-weight: 400; color: var(--ns-muted); }
.ns-home .ns-demo-field input, .ns-home .ns-demo-field textarea { display: block; width: 100%; font: inherit; font-size: 16px; color: var(--ns-ink); background: #fff; border: 1px solid var(--ns-line) !important; border-radius: 8px !important; padding: 11px 13px; margin: 0; box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease; }
.ns-home .ns-demo-field textarea { resize: vertical; min-height: 56px; }
.ns-home .ns-demo-field input:focus, .ns-home .ns-demo-field textarea:focus { outline: none; border-color: var(--ns-signal) !important; box-shadow: 0 0 0 3px rgba(21,146,214,.14); }
.ns-home .ns-demo-field input.is-invalid, .ns-home .ns-demo-field textarea.is-invalid { border-color: #c0392b !important; }
.ns-demo-help { font-size: 12.5px; line-height: 1.45; color: var(--ns-muted); margin: 6px 0 0; }
.ns-demo-error { font-size: 13px; line-height: 1.45; color: #a32020; margin: 6px 0 0; }
.ns-demo-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Product questions (built by ns-demo.js from foyer's list) ------------------
   Squared choice blocks: a hairline box, a full border and a tinted fill when
   chosen. Round marker for one answer, square marker for several. */
.ns-demo-questions { display: grid; gap: 22px; }
.ns-demo-q { margin: 0; min-width: 0; }
.ns-demo-q[hidden] { display: none !important; }
/* .ns-home p is muted site-wide: the question itself reads like the field labels. */
.ns-home .ns-demo-q-label { font-size: 14px; font-weight: 600; color: var(--ns-ink); margin: 0 0 8px; }
.ns-demo-q-more { font-weight: 400; color: var(--ns-muted); }
.ns-demo-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.ns-demo-choice { position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 11px 12px; min-height: 46px; min-width: 0; border: 1px solid var(--ns-line); border-radius: 8px; background: var(--ns-surface); color: var(--ns-ink); font-size: 14.5px; font-weight: 500; line-height: 1.3; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.ns-demo-choice:hover { border-color: var(--ns-signal); }
.ns-demo-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ns-demo-choice::before { content: ""; flex: 0 0 auto; box-sizing: border-box; width: 16px; height: 16px; border: 1.5px solid #9fb0c2; border-radius: 50%; background: #fff; transition: border-color .15s ease, background-color .15s ease; }
.ns-demo-choice.is-multi::before { border-radius: 4px; }
.ns-demo-choice.is-checked { border-color: var(--ns-signal-deep); background: color-mix(in srgb, var(--ns-signal) 8%, #fff); }
.ns-demo-choice.is-checked::before { border-color: var(--ns-signal-deep); background: var(--ns-signal-deep); box-shadow: inset 0 0 0 3px #fff; }
.ns-demo-choice.is-multi.is-checked::before { box-shadow: none; background: var(--ns-signal-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px 12px no-repeat; }
.ns-demo-choice:focus-within { outline: 2px solid var(--ns-signal-deep); outline-offset: 2px; }
.ns-demo-choice-text { min-width: 0; overflow-wrap: anywhere; }
.ns-home .ns-demo-field input.ns-demo-q-short { max-width: 240px; }

/* Submit ------------------------------------------------------------------ */
.ns-demo-submit { background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 12px; padding: 22px 26px; }
.ns-demo-summary { font-size: 15px; color: var(--ns-ink); margin: 0 0 14px; }
.ns-demo-summary strong { font-weight: 600; }
.ns-demo-alert { font-size: 14.5px; color: #8a1c1c; background: #fdf1f1; border: 1px solid #f3cccc; border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; }
.ns-demo-alert a { color: #8a1c1c; font-weight: 600; text-decoration: underline; }
.ns-home .ns-demo-submit .ns-btn { justify-content: center; min-width: 220px; }
.ns-home .ns-demo-submit .ns-btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.ns-demo-small { font-size: 12.5px; line-height: 1.5; color: var(--ns-muted); margin: 14px 0 0; }

/* Summary panel (desktop) ----------------------------------------------- */
.ns-demo-aside { position: sticky; top: 110px; }
.ns-demo-panel { background: var(--ns-ink); border-radius: 14px; padding: 28px 28px 26px; position: relative; overflow: hidden; color: #e8eef5; }
.ns-demo-panel::before { content: ""; position: absolute; right: -80px; top: -80px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(56,182,255,.18); pointer-events: none; }
.ns-demo-panel::after { content: ""; position: absolute; right: -46px; top: -46px; width: 152px; height: 152px; border-radius: 50%; border: 1px solid rgba(56,182,255,.12); pointer-events: none; }
.ns-demo-panel-tag { font-size: 11px; letter-spacing: .16em; color: #8fd3ff; margin-bottom: 16px; }
.ns-demo-panel-list { margin: 0; display: grid; gap: 12px; }
.ns-demo-panel-list > div { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; }
.ns-demo-panel-list dt { font-family: var(--ns-mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8ea3b8; padding-top: 3px; }
.ns-demo-panel-list dd { margin: 0; font-size: 15px; color: #fff; overflow-wrap: anywhere; }
.ns-demo-panel-list dd .ns-demo-sub { display: block; font-size: 12.5px; color: #b9ccdf; }
.ns-demo-panel-rule { height: 1px; background: rgba(255,255,255,.12); margin: 22px 0 18px; }
.ns-demo-panel-head { font-weight: 600; color: #fff !important; margin: 0 0 10px; font-size: 15px; }
.ns-demo-panel-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ns-demo-panel-points li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.5; color: #c9d7e5; }
.ns-demo-panel-points li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #38b6ff; }

/* Success ------------------------------------------------------------------ */
.ns-demo-done { max-width: 760px; margin: 0 auto; background: var(--ns-surface); border: 1px solid var(--ns-line); border-radius: 14px; padding: 38px 38px 34px; outline: none; }
.ns-demo-done-tag { font-size: 11px; letter-spacing: .16em; color: #157a47; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ns-demo-done-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.ns-demo-done h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0 0 10px; }
.ns-demo-done-lead { font-size: 1.05rem; color: var(--ns-ink-soft); margin: 0 0 22px; }
.ns-demo-done-list { margin: 0 0 26px; border: 1px solid var(--ns-line); border-radius: 10px; padding: 16px 20px; display: grid; gap: 10px; }
.ns-demo-done-list > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; }
.ns-demo-done-list dt { font-family: var(--ns-mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ns-muted); padding-top: 3px; }
.ns-demo-done-list dd { margin: 0; color: var(--ns-ink); overflow-wrap: anywhere; }
.ns-demo-done-list dd a { color: var(--ns-signal-deep); }
.ns-demo-done h3 { font-size: 1.1rem; margin: 0 0 10px; }
.ns-demo-done-steps { margin: 0 0 26px; padding-left: 20px; color: var(--ns-ink-soft); }
.ns-demo-done-steps li { margin: 0 0 8px; line-height: 1.55; }
.ns-demo-done-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 992px) {
    .ns-demo-grid { grid-template-columns: 1fr; }
    .ns-demo-aside { display: none; }
}
@media (max-width: 640px) {
    .ns-demo-step { padding: 20px 16px 18px; border-radius: 10px; }
    .ns-demo-submit { padding: 18px 16px; }
    .ns-demo-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ns-demo-tile { padding: 13px 12px 14px; }
    .ns-demo-tile-line { font-size: 12.5px; padding-left: 0; }
    .ns-demo-fields { grid-template-columns: 1fr; }
    .ns-demo-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .ns-demo-choice { padding: 10px; font-size: 14px; gap: 8px; }
    .ns-demo-days { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .ns-demo-times { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .ns-home .ns-demo-submit .ns-btn { width: 100%; min-width: 0; }
    .ns-demo-done { padding: 26px 18px 24px; }
    .ns-demo-done-list > div { grid-template-columns: 1fr; gap: 2px; }
    .ns-demo-done-actions .ns-btn { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 360px) {
    .ns-demo-products { grid-template-columns: 1fr; }
    .ns-demo-tile-other { grid-column: auto; }
    .ns-demo-days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ns-demo-choices { grid-template-columns: 1fr; }
}
