/* Guided first run and the Workspace setup list. */
#firstRunDialog { width: min(620px, calc(100vw - 32px)); }
#firstRunDialog .first-run-email-status:empty { display: none; }
#firstRunDialog .first-run-primary { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
#firstRunDialog .first-run-primary small { color: inherit; font-size: 11px; font-weight: 500; opacity: .85; }

.first-run-promise { display: grid; gap: 12px; margin: 18px 0 12px; padding: 0; list-style: none; }
.first-run-promise li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface-muted); }
.first-run-promise li > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--color-accent-surface); color: var(--color-accent); font-weight: 800; }
.first-run-promise div { display: grid; gap: 4px; }
.first-run-promise strong { font-size: 15px; line-height: 1.35; }
.first-run-promise small { color: var(--color-text-muted); line-height: 1.45; }

.first-run-fields { margin: 16px 0 8px; }
.first-run-hours { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.first-run-hours legend { margin-bottom: 8px; padding: 0; font-weight: 600; }
.first-run-hours .weekday-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.first-run-hours .weekday-picker label { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 10px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); font-weight: 500; }
.first-run-hours-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.first-run-channels .first-run-door .button { width: auto; }
.first-run-channel-state { margin: 4px 0 0; color: var(--color-success, #14804a); font-size: 14px; font-weight: 600; }
.first-run-channel-state[hidden] { display: none; }
.first-run-channel-aside { margin-top: 10px; font-size: 13px; }
.first-run-ending { display: grid; gap: 8px; margin: 4px 0 14px; }
.first-run-ending > label { display: grid; gap: 2px; font-weight: 600; }
.first-run-ending > label small { color: var(--color-text-muted); font-weight: 400; }
.first-run-ending textarea { width: 100%; min-height: 84px; resize: vertical; }
.first-run-website-setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface-muted); }
.first-run-website-setting[hidden] { display: none; }
.first-run-autopilot { margin: 0 0 14px; }
.first-run-website-setting .product-email-copy { display: grid; gap: 2px; }
.first-run-website-setting .product-email-copy small { color: var(--color-text-muted); }
.first-run-website-setting .product-email-switch { position: relative; display: block; width: 42px; height: 24px; cursor: pointer; }
.first-run-website-setting .product-email-switch input { position: absolute; inset: 0; width: 42px; height: 24px; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.first-run-website-setting .product-email-switch > span { position: absolute; inset: 0; border: 1px solid var(--color-border-strong); border-radius: 999px; background: var(--color-surface); transition: background-color .16s ease, border-color .16s ease; }
.first-run-website-setting .product-email-switch > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--color-text-muted); transition: transform .16s ease, background-color .16s ease; }
.first-run-website-setting .product-email-switch input:checked + span { border-color: var(--color-accent); background: var(--color-accent); }
.first-run-website-setting .product-email-switch input:checked + span::after { background: #fff; transform: translateX(18px); }
.first-run-website-setting .product-email-switch input:focus-visible + span { outline: 3px solid rgba(49, 84, 216, .28); outline-offset: 2px; }
.first-run-ending-preview { display: grid; gap: 4px; padding: 12px 14px; border: 1px dashed var(--color-border-strong, var(--color-border)); border-radius: 12px; }
.first-run-ending-preview > span { color: var(--color-text-muted); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.first-run-ending-preview p { margin: 0; white-space: pre-line; line-height: 1.5; }
.first-run-ending-preview p.is-empty { color: var(--color-text-muted); }

.first-run-next { display: grid; gap: 4px; margin: 16px 0 14px; padding: 16px; border: 1px solid var(--color-accent); border-radius: 14px; background: var(--color-accent-surface); }
.first-run-next .eyebrow { margin: 0; }
.first-run-next strong { font-size: 17px; }
.first-run-next small { color: var(--color-text-muted); }
.first-run-reach { display: grid; gap: 8px; margin-top: 12px; }
.first-run-reach .button { width: 100%; }
.first-run-plan { display: grid; gap: 6px; margin: 10px 0 0; padding: 12px 0 0 18px; border-top: 1px solid var(--color-accent); }
.first-run-plan li { font-size: 14px; line-height: 1.5; }
.first-run-plan-note { margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.first-run-know { display: grid; gap: 8px; margin: 0 0 8px; padding-left: 20px; line-height: 1.5; }

.setup-pop { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 10px; width: min(340px, calc(100vw - 24px)); max-height: min(70vh, 560px); padding: 14px 14px 6px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); box-shadow: 0 18px 48px -18px #0f172a59, 0 2px 8px -4px #0f172a1f; overflow: hidden; }
.setup-pop[hidden] { display: none; }
.setup-pop header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.setup-pop h2 { margin: 0; font-size: 15px; line-height: 1.3; }
.setup-pop header p { margin: 1px 0 0; color: var(--color-text-muted); font-size: 12px; }
.setup-pop-hide { display: grid; place-items: center; width: 30px; height: 30px; margin: -4px -4px 0 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--color-text-muted); cursor: pointer; }
.setup-pop-hide:hover { background: var(--color-surface-muted); color: var(--color-text); }
.setup-pop-hide svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

.setup-pop ul { display: grid; margin: 0 -14px; padding: 0 14px; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.setup-pop li { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 10px; row-gap: 6px; align-items: start; padding: 9px 0; border-top: 1px solid var(--color-border); }
.setup-pop li:first-child { border-top: 0; }

.setup-pop li > div:not(.setup-checklist-actions) { display: grid; gap: 1px; min-width: 0; }
.setup-pop li strong { font-size: 13px; line-height: 1.35; }
.setup-pop li small { color: var(--color-text-muted); font-size: 12px; line-height: 1.35; }
.setup-pop li.is-done strong { color: var(--color-text-muted); font-weight: 500; }
.setup-pop li.is-done small { display: none; }

.setup-pop-badge { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #E66A16; color: #fff; font-size: 22px; font-weight: 900; line-height: 1; box-shadow: 0 10px 24px -10px #fd720bcc, 0 2px 6px -2px #0f172a33; cursor: pointer; }
.setup-pop-badge[hidden] { display: none; }
.setup-pop-badge:hover { transform: translateY(-1px); }
.setup-pop-badge:focus-visible, .setup-pop-hide:focus-visible { outline: 3px solid rgba(253, 114, 11, .4); outline-offset: 2px; }
body:not(.signed-in-mode) .setup-pop, body:not(.signed-in-mode) .setup-pop-badge { display: none; }

/* "AfterLeads needs you": the same corner window, only for what the owner must answer. */
.needs-you-pop li { grid-template-columns: 20px minmax(0, 1fr); }
.needs-you-mark { display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: #C2540A; color: #fff; font-size: 11px; font-weight: 900; line-height: 1; }
.needs-you-pop li small { color: var(--color-text); }
.decision-card { display: grid; gap: 4px; min-width: 0; }
.needs-you-pop li > .decision-card { gap: 4px; }
.decision-name { justify-self: start; padding: 0; border: 0; background: none; color: var(--color-text); font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.decision-name::after { content: " \203A"; color: var(--color-text-muted); }
.decision-name:hover { text-decoration: underline; }
.decision-question { margin: 0; color: var(--color-text); font-size: 13px; line-height: 1.4; }
.decision-card small { color: var(--color-text-muted); font-size: 12px; line-height: 1.35; }
.decision-options { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.decision-options .button, .setup-pop .decision-options .button { min-height: 32px; height: auto; padding: 5px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.2; }
.decision-options .text-button { padding: 4px 6px; font-size: 12px; }
.decision-options button[disabled] { opacity: .55; cursor: progress; }
.needs-you-badge { background: #0f172a; font-size: 16px; box-shadow: 0 10px 24px -10px #0f172a99, 0 2px 6px -2px #0f172a33; }
.needs-you-badge::after { content: ""; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border: 2px solid var(--color-surface, #fff); border-radius: 50%; background: #FD720B; }
.needs-you-pop.is-stacked, .needs-you-badge.is-stacked { bottom: 76px; }

@media (max-width: 560px) {
  .first-run-hours-times { grid-template-columns: 1fr 1fr; }
  .setup-pop { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-height: 60dvh; }
  .setup-pop li.is-done { display: none; }
  .setup-pop li:not(.is-done) ~ li { border-top: 1px solid var(--color-border); }
  .setup-pop-badge { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .needs-you-pop.is-stacked, .needs-you-badge.is-stacked { bottom: calc(68px + env(safe-area-inset-bottom)); }
}
/* Phone full screen puts the app bar at the bottom: sit just above it. */
@media (max-width: 760px) {
  :root[data-fullscreen="on"] body.signed-in-mode .setup-pop,
  :root[data-fullscreen="on"] body.signed-in-mode .setup-pop-badge { bottom: calc(var(--app-bar-h, 56px) + 12px + env(safe-area-inset-bottom)); }
  :root[data-fullscreen="on"] body.signed-in-mode .needs-you-pop.is-stacked,
  :root[data-fullscreen="on"] body.signed-in-mode .needs-you-badge.is-stacked { bottom: calc(var(--app-bar-h, 56px) + 68px + env(safe-area-inset-bottom)); }
}

/* Done-for-you setup: one screen to check what AfterLeads prepared. */
.setup-assistant { display: grid; gap: 14px; margin: 4px 0 8px; }
.setup-assistant-part { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); }
.setup-assistant-part h3 { margin: 0; font-size: 15px; }
.setup-assistant-part label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.setup-assistant-part textarea, .setup-assistant-part input:not([type="checkbox"]) { width: 100%; box-sizing: border-box; font: inherit; font-weight: 400; }
.setup-assistant-note { margin: 0; color: var(--color-text-muted); font-size: 13px; line-height: 1.45; }
.setup-assistant-loading { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--color-text-muted); font-size: 14px; }
.setup-assistant-loading span { width: 14px; height: 14px; flex: none; border: 2px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; animation: setup-assistant-spin .9s linear infinite; }
@keyframes setup-assistant-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .setup-assistant-loading span { animation: none; } }

.setup-assistant-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; background: var(--color-surface-muted); flex: none; }
.setup-assistant-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.setup-assistant-quotes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.setup-assistant-quotes li { display: grid; gap: 6px; padding: 10px; border-radius: 10px; background: var(--color-surface-muted); }
.setup-assistant-quote { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 400 !important; }
.setup-assistant-quote input[type="checkbox"] { width: 18px !important; height: 18px !important; min-width: 0; flex: 0 0 18px; margin: 3px 0 0; padding: 0; }
.setup-assistant-quote span { flex: 1; }
.setup-assistant-quote span { display: grid; gap: 2px; min-width: 0; }
.setup-assistant-quote small { color: var(--color-text-muted); overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .setup-assistant-pair { grid-template-columns: 1fr; }
  
}
/* Setup: the website logo is an explained choice, and text boxes grow to fit. */
.setup-assistant-part .setup-assistant-logo-choice { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 10px; cursor: pointer; }
.setup-assistant-logo-choice span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.setup-assistant-logo-choice strong { font-size: 14px; }
.setup-assistant-logo-choice small { font-size: 12px; color: var(--color-text-muted); }
.setup-assistant-logo-choice input { width: 18px; height: 18px; accent-color: #00788F; flex: none; }
.setup-assistant-part textarea[data-setup-grow] { resize: none; overflow: hidden; min-height: 44px; }

.setup-assistant-part .setup-assistant-logo-choice small { font-weight: 400; }

/* The first screen after sign-up: add someone you quoted, or get an enquiry page. */
.first-run-quick { display: grid; gap: 12px; margin: 24px 0 8px; }
.first-run-quick .button { width: 100%; min-height: 52px; justify-content: center; font-size: 16px; }
#firstRunWelcomeStep .first-run-actions { justify-content: space-between; }
/* The case in one line (lesson 7). */
.decision-case { margin: 0; color: var(--color-text-secondary, #536881); font-size: 13px; line-height: 1.4; }
