/* ---------------------------------------------------------------------------
   Sites › Websites, laid out as GHL's list (public/sites.js, websiteList):
   the title and actions on the page, then one card with the breadcrumb, the
   Recent / List toggle, search, the table and the pager.
--------------------------------------------------------------------------- */

.wsl { display: flex; flex-direction: column; gap: 18px; }

.wsl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wsl-title { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.wsl-sub { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.wsl-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wsl-square { padding: 8px 10px; }
.wsl-ai { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 45%, var(--line)); }
:root[data-theme] .btn.ghost.wsl-ai { color: var(--purple); }

.wsl-card { padding: 18px 20px 16px; }
.wsl-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.wsl-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; }
.wsl-crumb { color: var(--text); padding: 4px; border-radius: 6px; }
.wsl-crumb:hover { background: var(--hover); }
.wsl-sep { color: var(--dim); display: inline-flex; }
.wsl-crumb-on { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wsl-tools { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.wsl-views { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.wsl-view {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 36px; border: 0; background: var(--surface); color: var(--muted);
}
.wsl-view + .wsl-view { border-left: 1px solid var(--line); }
.wsl-view:hover { color: var(--text); }
.wsl-view.on { background: var(--brand-soft); color: var(--brand); }

.wsl-search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--dim);
  width: 260px; max-width: 100%;
}
.wsl-search:focus-within { border-color: var(--brand); }
.wsl-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; padding: 0; }

.wsl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.wsl-table { font-size: 14px; }
.wsl-table th { background: var(--bg); color: var(--text); font-weight: 600; font-size: 13.5px; text-transform: none; letter-spacing: 0; }
.wsl-table th:last-child, .wsl-table td:last-child { width: 56px; text-align: center; }
.wsl-table td { padding: 14px 14px; }
.wsl-name { display: flex; align-items: center; gap: 10px; }
.wsl-name svg { color: var(--muted); flex: none; }
.wsl-zero { color: var(--dim); }
.wsl-more { padding: 4px; border-radius: 6px; color: var(--muted); }
.wsl-more:hover { background: var(--hover); }
.wsl-empty { text-align: center; padding: 40px 12px !important; }
.wsl-empty-title { font-weight: 600; font-size: 14.5px; }

.wsl-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.wsl-pager label { color: var(--text) !important; font-size: 13px !important; }
.wsl-count { margin: 0 6px; }
.wsl-pg { min-width: 36px; justify-content: center; }
.wsl-pg.on { border-color: var(--brand); color: var(--brand); }

.wsl-menu .row-menu-item { display: flex; align-items: center; gap: 9px; }
.wsl-menu .row-menu-item svg { color: var(--muted); }
.wsl-menu .row-menu-item.danger svg { color: inherit; }

/* ---------------------------------------------------------------------------
   Sites › Funnels · Stores · Webinars: the list (public/sites.js,
   siteList; Websites has its own, above). GHL's layout: the title and its three buttons over a card with
   the Home breadcrumb, the Recent / List toggle, search, the table and
   Rows per page paging. Colours come from the theme tokens, so Midnight
   (midnight.css) restyles it with the rest of the app.
--------------------------------------------------------------------------- */

.st-head { padding: 4px 2px 16px; }
.st-head .widget-title { font-size: 17px; }

/* Create folder: a square icon button the height of its neighbours. */
.btn.st-square { padding: 8px 10px; }
/* Build with AI: outlined in the AI colour, in every theme (midnight.css
   restyles .btn.ghost under :root[data-theme]). */
:root .st-head .btn.ghost.st-ai { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 45%, transparent); }
:root .st-head .btn.ghost.st-ai:hover { border-color: var(--purple); }

.st-list { padding: 16px 18px; }
.st-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.st-bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.st-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; }
.st-crumb { padding: 5px; border-radius: 7px; color: var(--muted); }
.st-crumb:hover { background: var(--hover); }
.st-sep { color: var(--dim); }
.st-crumb-on { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.st-views button { padding: 7px 10px; }

.st-search {
  display: flex; align-items: center; gap: 7px; padding: 0 10px; min-width: 240px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--dim);
}
.st-search:focus-within { border-color: var(--brand); }
.st-search input { border: 0; outline: 0; background: none; color: var(--text); padding: 8px 0; font: inherit; font-size: 13.5px; width: 100%; }

.st-table { border: 1px solid var(--line); border-radius: 8px; }
.st-table .table th { background: var(--bg); font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.st-table .table th + th, .st-table .table td + td { border-left: 1px solid var(--line-soft); }
.st-table .table td:last-child, .st-table .table th:last-child { width: 56px; text-align: center; }
.st-table .table td { padding-top: 14px; padding-bottom: 14px; }
.st-name { font-weight: 500; color: var(--text); }
.st-name.has-ico { display: inline-flex; align-items: center; gap: 8px; }
.st-name.has-ico .ico { color: var(--muted); }

.st-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.st-range { color: var(--muted); }
.st-pages { display: flex; gap: 4px; }
.st-page {
  min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px;
  background: none; color: var(--text); font: inherit; font-size: 13px;
}
.st-page:hover { background: var(--hover); }
.st-page.on { border-color: var(--brand); color: var(--brand); font-weight: 600; }

.st-empty { padding: 48px 16px; text-align: center; display: grid; justify-items: center; gap: 6px; }
.st-empty-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 6px; }
.st-empty-title { font-weight: 600; font-size: 14.5px; color: var(--text); }

.st-menu { position: fixed; min-width: 180px; }
.st-menu .row-menu-item { display: flex; align-items: center; gap: 10px; }
.st-menu .row-menu-item .ico { color: var(--muted); }
.st-menu .row-menu-item.danger .ico { color: inherit; }

@media (max-width: 640px) {
  .st-head .widget-head, .st-head { flex-wrap: wrap; }
  .st-bar-right { margin-left: 0; width: 100%; }
  .st-search { flex: 1; min-width: 0; }
  .st-pager { justify-content: flex-start; }
}

/* Stores: the setup guide over the list, and its task drawer (storesOnboarding). */
.st-guide { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 16px; border: 1px solid var(--brand); border-radius: 10px; background: var(--brand-soft); }
.st-guide-ico { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--brand); }
.st-guide-txt { flex: 1; min-width: 0; }
.st-guide-title { font-weight: 600; color: var(--brand); }
.st-guide-sub { font-size: 13px; color: var(--brand); opacity: .85; margin-top: 2px; }
.st-guide-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.st-guide-prog { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.st-progress { width: 64px; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.st-progress > span { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.st-drawer-back { position: fixed; inset: 0; z-index: 1000; background: rgba(16,24,40,.45); display: flex; justify-content: flex-end; }
.st-drawer { width: min(480px, 100vw); height: 100%; background: var(--surface); color: var(--text); display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(16,24,40,.25); }
.st-drawer-head { display: flex; gap: 10px; align-items: flex-start; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.st-drawer-body { flex: 1; overflow: auto; padding: 18px 20px; }
.st-drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.st-task { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.st-task .tick { flex: 0 0 auto; color: var(--muted); margin-top: 1px; }
.st-task .tick.done { color: var(--green); }
.st-task .t { font-weight: 600; }
.st-task .d { font-size: 13px; color: var(--muted); margin: 3px 0 8px; }
@media (max-width: 640px) { .st-guide { flex-wrap: wrap; } }

/* ----- Create new funnel (cf-*) ------------------------------------------- */
.cf-modal > div:first-child { border-bottom: 0 !important; padding: 18px 20px 4px !important; }
.cf-modal > div:first-child .widget-title { font-size: 17px; }
.cf-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 6px 4px 4px; }
.cf-card { border: 2px solid transparent; border-radius: 12px; padding: 16px 20px 22px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.cf-card.on { border-color: var(--brand); }
.cf-card[aria-disabled="true"] { cursor: default; }
.cf-ai { background: linear-gradient(180deg, color-mix(in srgb, var(--purple) 16%, var(--surface)), var(--surface)); }
.cf-tpl { background: linear-gradient(180deg, color-mix(in srgb, #f97316 16%, var(--surface)), var(--surface)); }
.cf-blank, .cf-art { height: 178px; border-radius: 10px; margin-bottom: 18px; }
.cf-blank { border: 1px dashed color-mix(in srgb, var(--muted) 55%, transparent); background: var(--surface); padding: 0 24px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.cf-label, .ns-label { font-size: 14px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 6px; }
.cf-req { color: var(--red); }
.cf-blank input { width: 100%; }
.cf-err { color: var(--red); font-size: 12.5px; min-height: 16px; }
.cf-art { position: relative; overflow: hidden; color: #fff; padding: 20px 14px; }
.cf-art-text { display: grid; gap: 6px; font-weight: 600; font-size: 15px; line-height: 1.35; max-width: 50%; position: relative; z-index: 1; }
.cf-art-ai { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.cf-mock { position: absolute; right: 16px; top: 22px; bottom: 22px; width: 38%; background: #fff; border-radius: 4px; padding: 8px; display: grid; gap: 6px; align-content: start; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.cf-mock i { display: block; height: 6px; border-radius: 3px; background: #e5e7eb; }
.cf-mock i.bar { background: #c4b5fd; width: 60%; }
.cf-mock i.img { height: 44px; background: linear-gradient(135deg, #fde68a, #f472b6, #60a5fa); }
.cf-mock i.short { width: 55%; }
.cf-art-tpl { background: linear-gradient(135deg, #fdba74, #f9a8d4); color: #3b1d0f; }
.cf-tiles i { position: absolute; width: 70px; height: 92px; border-radius: 6px; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); transform: rotate(-24deg); }
.cf-tiles i:nth-child(1) { right: 70px; top: 8px; background: linear-gradient(#e9d5ff, #fff); }
.cf-tiles i:nth-child(2) { right: 18px; top: 34px; background: linear-gradient(#bae6fd, #fff); }
.cf-tiles i:nth-child(3) { right: 96px; top: 104px; background: linear-gradient(#fef08a, #fff); }
.cf-title { font-size: 17px; font-weight: 600; color: var(--text); }
.cf-desc { font-size: 14px; color: var(--muted); line-height: 1.5; }
.cf-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 22px 4px 4px; }
@media (max-width: 760px) { .cf-cards { grid-template-columns: 1fr; gap: 14px; } .cf-blank, .cf-art { height: 150px; } }

/* ----- a funnel: header and tabs (fd-*) ------------------------------------ */
.fd { padding: 4px 2px; }
.btn.fd-back { color: var(--brand); padding: 2px 0; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.fd-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; }
.fd-name { font-size: 22px; font-weight: 500; margin: 0; color: var(--text); overflow-wrap: anywhere; }
.fd-actions { margin-left: auto; display: flex; gap: 10px; }
.btn.fd-share { padding: 9px 11px; }
.btn.fd-info { padding: 9px 11px; color: var(--muted); background: var(--surface); }
.fd-tabs { gap: 26px; overflow-x: auto; scrollbar-width: thin; }
.fd-tabs .tab-btn { white-space: nowrap; font-size: 14.5px; }
.fd-info-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; font-size: 13.5px; }
.fd-info-list dt { color: var(--muted); }
.fd-info-list dd { margin: 0; display: flex; align-items: center; gap: 4px; overflow-wrap: anywhere; min-width: 0; }
.btn.fd-copy { padding: 2px 4px; }

/* ----- Steps (fs-*) ---------------------------------------------------------- */
.fs { display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); align-items: stretch; border-radius: 6px; overflow: hidden; }
.fs-side { background: var(--brand-soft); padding: 0 10px 12px; min-height: 164px; }
.fs-side-head { display: flex; align-items: center; gap: 10px; padding: 22px 12px; margin: 0 -10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--brand) 14%, transparent); color: var(--green); }
.fs-side-head h2 { margin: 0; font-size: 22px; font-weight: 400; color: var(--muted); }
.fs-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.fs-step { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.fs-step.on { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.fs-step.dragging { opacity: .5; }
.fs-step.over { outline: 2px dashed var(--brand); outline-offset: 2px; }
.fs-grip { display: grid; place-items: center; padding: 0 2px 0 6px; color: var(--dim); cursor: grab; }
.fs-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 4px; background: none; border: 0; text-align: left; font: inherit; color: var(--text); cursor: pointer; border-radius: 8px; }
.fs-pick:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.fs-num { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--brand-soft); color: var(--brand); }
.fs-text { display: grid; min-width: 0; }
.fs-step-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-step-path { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.fs-add { width: 100%; justify-content: center; padding: 10px 14px; font-weight: 600; }
.fs-archived { margin-top: 14px; font-size: 13.5px; }
.fs-archived summary { cursor: pointer; color: var(--muted); padding: 4px 2px; }
.fs-arch-row { display: flex; align-items: center; gap: 6px; padding: 8px 2px; border-top: 1px solid color-mix(in srgb, var(--brand) 14%, transparent); }
.fs-arch-name { flex: 1; min-width: 0; }
.btn.link.danger { color: var(--red); }
.fs-main { background: var(--surface); min-height: 164px; padding: 22px 24px; }
.fs-empty { text-align: center; font-size: 26px; font-weight: 300; color: var(--muted); padding: 10px 0; }
.fs-main-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.fs-main-head > div:first-child { flex: 1; min-width: 220px; }
.fs-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fs-title h2 { margin: 0; font-size: 20px; font-weight: 500; overflow-wrap: anywhere; }
.fs-url { display: flex; align-items: center; gap: 2px; margin-top: 6px; font-size: 13.5px; min-width: 0; }
.fs-url a { color: var(--brand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.btn.fs-icon { padding: 3px 5px; color: var(--muted); }
.fs-acts { display: flex; gap: 8px; align-items: center; }
.btn.fs-more { padding: 8px 9px; }
.fs-note { margin-top: 12px; font-size: 13px; color: var(--muted); }
.fs-thumb { position: relative; margin-top: 18px; height: 420px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.fs-thumb iframe { width: 200%; height: 200%; border: 0; transform: scale(.5); transform-origin: 0 0; background: #fff; pointer-events: none; }
.fs-thumb-loading { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 13px; }
.fs-thumb-open { position: absolute; inset: 0; background: transparent; border: 0; cursor: pointer; }
.fs-thumb-open:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.fs-thumb-open:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
@media (max-width: 820px) { .fs { grid-template-columns: 1fr; } .fs-thumb { height: 300px; } }

/* ----- Website pages (wp-*) -------------------------------------------------- */
.wp-bar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.wp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wp-row { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 12px 6px; }
.wp-row.dragging { opacity: .5; }
.wp-row.over { outline: 2px dashed var(--brand); outline-offset: 2px; }
.wp-grip { flex: 0 0 auto; display: grid; place-items: center; padding: 6px 2px; background: none; border: 0; border-radius: 6px; color: var(--dim); cursor: grab; }
.wp-grip:focus-visible { outline: 2px solid var(--brand); }
.wp-thumb { position: relative; flex: 0 0 auto; width: 160px; height: 100px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
/* The page at 1280px wide, shrunk to the thumbnail. */
.wp-thumb iframe { width: 1280px; height: 800px; border: 0; transform: scale(.125); transform-origin: 0 0; background: #fff; pointer-events: none; }
.wp-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.wp-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wp-name h3 { margin: 0; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.wp-row .fs-acts { flex: 0 0 auto; }
.wp .fs-archived { margin-top: 16px; }
@media (max-width: 760px) {
  .wp-row { flex-wrap: wrap; padding: 12px; gap: 12px; }
  .wp-grip { display: none; }
  .wp-thumb { width: 96px; height: 60px; }
  .wp-thumb iframe { transform: scale(.075); }
  .wp-row .fs-acts { width: 100%; justify-content: flex-end; }
}

/* ----- New step in funnel (ns-*) ------------------------------------------- */
.ns-modal > div:first-child { border-bottom: 0 !important; padding: 18px 20px 6px !important; }
.ns-head { flex: 1; display: flex; align-items: center; gap: 10px; }
.ns-head h2 { margin: 0; font-size: 17px; font-weight: 500; }
.ns-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand-soft) 50%, transparent); }
.ns-field { display: grid; gap: 6px; margin-bottom: 8px; }
.ns-field input { width: 100%; }
.ns-sub { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.ns-help { display: inline-grid; place-items: center; color: var(--muted); cursor: help; }
.ns-beta { font-size: 12px; font-weight: 600; color: #b54708; background: #fef0c7; border-radius: 6px; padding: 2px 8px; margin-left: 8px; }
