@import url("./site-redirects.css");
@import url("./site-code.css");
@import url("./site-versions.css");

/* =========================================================================
   views/site-settings — a website's settings sections: Tracking codes (src/features/sites/siteTrackingPanel.js) and
   the redirects list, in the admin's site dialogs (Sites board → a card's ⋯) and the client's Website → Settings tab.
   Built from the shared .field / .input / .field-msg / .btn; this file only lays them out.
   Prefix: sset- (site settings).
   ========================================================================= */
.sset { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.sset + .sset { padding-top: var(--space-6); border-top: 1px solid var(--border-faint); }
.sset-skel { display: flex; flex-direction: column; gap: var(--space-2-5); }
.sset-head { display: flex; flex-direction: column; gap: var(--space-1); }
.sset-title { margin: 0; font-size: var(--text-lg); font-weight: var(--fw-semibold); line-height: var(--leading-snug); color: var(--text-strong); }
.sset-lead { margin: 0; font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--text-muted); }

/* ---- the settings list (.slist): Code and Redirects, one system as Framer's (owner, 4 Nov 2026: "the redirect should
   follow the same exact system as the code"). A bar with a soft Filter and Add; a header row between hairlines, its
   first label on the list's left edge; 40px rows parted by hairlines, each a grip, the row's button (its cells) and ⋯
   on hover; the words quiet until the row is hovered (no fill). A list names its columns with --slist-cols: the row
   button's own grid, which the header adds the grip's and the ⋯'s columns to, so its labels sit on the cells. ---- */
.slist { --slist-cols: minmax(0, 1fr); display: flex; flex-direction: column; min-width: 0; container-type: inline-size; }
.slist-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.slist-bar-acts { display: inline-flex; align-items: center; gap: var(--space-1-5); margin-left: auto; }
.slist-filter.search { flex: 0 1 220px; min-width: 0; height: var(--control-sm); border-color: transparent; background: var(--surface-hover); }
.slist-filter.search:focus-within { border-color: var(--border-strong); background: var(--surface); }
.slist-add.btn { border-color: transparent; background: var(--surface-hover); box-shadow: none; }
.slist-head, .slist-row { display: grid; grid-template-columns: var(--control-xs) var(--slist-cols) var(--control-xs); align-items: center; column-gap: var(--space-2-5); }
.slist-head { min-height: 40px; border-top: 1px solid var(--border-faint); border-bottom: 1px solid var(--border-faint); font-size: var(--text-xs); color: var(--text-soft); }
.slist-head > :first-child { grid-column: 1 / 3; }   /* (its first label on the list's left edge, over the grips) */
.slist-head > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slist-items { position: relative; display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.slist-row { grid-template-columns: var(--control-xs) minmax(0, 1fr) var(--control-xs); min-height: 40px; border-bottom: 1px solid var(--border-faint); color: var(--text-muted); transition: color var(--dur-fast) var(--ease); }
/* (a row is also .sortable-row for the drag, whose shared look, leads-responsive.css: a grey fill, a border and a radius on
   every row, made the list a stack of grey boxes. Owner, 6 Nov 2026: "make the redirect look more like Framer… I think
   it's the bg fill". Here a row is only its hairline; the one being dragged lifts on the surface.) */
.slist .slist-row { border: 0; border-bottom: 1px solid var(--border-faint); border-radius: 0; background: none; box-shadow: none; }
.slist .slist-row.dragging { position: relative; z-index: 1; border-bottom-color: transparent; border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-md); }
.slist-open {
  display: grid; grid-template-columns: var(--slist-cols); align-items: center; column-gap: var(--space-2-5);
  min-width: 0; min-height: 40px; padding: 0; border: 0; border-radius: var(--radius-xs); background: none;
  color: inherit; font: inherit; font-size: var(--text-sm); text-align: left; cursor: pointer;
}
.slist-open:focus-visible { outline: none; box-shadow: var(--ring-primary); }
.slist-open > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slist-name { display: flex; align-items: center; gap: var(--space-2-5); }
.slist-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.slist-ico { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border: 1px solid var(--border-faint); border-radius: var(--radius-xs); background: var(--surface-sunk); color: var(--text-soft); }
.slist-ico svg { width: 12px; height: 12px; }
.slist-grip { display: inline-grid; place-items: center; width: var(--control-xs); height: var(--control-xs); padding: 0; border: 0; border-radius: var(--radius-xs); background: none; color: var(--text-placeholder); cursor: grab; touch-action: none; }
.slist-grip svg { width: 14px; height: 14px; }
.slist-grip:focus-visible { outline: none; box-shadow: var(--ring-primary); color: var(--text-muted); }
.slist-more { justify-self: center; display: inline-grid; place-items: center; width: var(--control-xs); height: var(--control-xs); }
.slist-more svg { width: 16px; height: 16px; }
.slist-tag { margin-left: var(--space-1); font-size: var(--text-xs); }
.slist-row.is-off { color: var(--text-placeholder); }
.slist-none { margin: 0; padding: var(--space-3) 0; font-size: var(--text-sm); color: var(--text-soft); }
.slist-foot { margin: var(--space-3) 0 0; font-size: var(--text-xs); color: var(--text-soft); }
@media (hover: hover) and (pointer: fine) {
  .slist-row:hover { color: var(--text-strong); }
  .slist-grip:hover { color: var(--text-muted); }
  .slist-add.btn:hover { border-color: transparent; background: var(--surface-hover-strong); }
  .slist-more { opacity: 0; }
  .slist-row:hover .slist-more, .slist-row:focus-within .slist-more, .slist-more[aria-expanded="true"] { opacity: 1; }
}
/* a narrow panel (a side sheet, a phone): no header row; a row's first cell over the rest */
@container (max-width: 520px) {
  .slist-head { display: none; }
  .slist-open { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; padding: var(--space-2) 0; }
  .slist-open > :first-child { grid-column: 1 / -1; }
  .slist-open > span:not(:first-child) { font-size: var(--text-xs); color: var(--text-soft); }
  .slist-open > span:last-child { text-align: right; }
}

/* where the codes run: a quiet note on the sunk surface */
.sset-note, .sset-agency {
  display: flex; align-items: flex-start; gap: var(--space-2); margin: 0;
  font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--text-muted);
}
.sset-note { padding: var(--space-3) var(--space-3-5); border: 1px solid var(--border-faint); border-radius: var(--radius-lg); background: var(--surface-sunk); }
.sset-note svg, .sset-agency svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--text-soft); }

.sset-form { display: flex; flex-direction: column; gap: var(--space-5); }
/* the services one under another, a hairline between them (Framer's Google Analytics setting, not a grid of boxes): each
   one's name and state, a line on what to paste, its field */
.sset-trackers { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.sset-trackers > .sset-tracker + .sset-tracker { padding-top: var(--space-5); border-top: 1px solid var(--border-faint); }
.sset-wide { grid-column: 1 / -1; }
.sset-tracker { min-width: 0; gap: var(--space-2); }
.sset-tracker-label { display: flex; align-items: center; gap: var(--space-2); min-height: 24px; }
.sset-tracker .sset-tracker-label { font-size: var(--text-md); font-weight: var(--fw-semibold); color: var(--text-strong); }
.sset-tracker-desc { margin: calc(-1 * var(--space-1-5)) 0 var(--space-0-5); font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--text-soft); }
.sset-tracker-label img { width: 20px; height: 20px; object-fit: contain; flex: none; }
.sset-control {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; min-width: 0;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  box-shadow: var(--shadow-xs); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.sset-control-ads { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.sset-control .input, .sset-control .input:hover:not(:focus):not(:disabled) { min-width: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.sset-control-ads .input + .input { border-left: 1px solid var(--border-faint); }
.sset-control:has(.input:focus) { border-color: var(--border-strong); box-shadow: var(--ring-primary); }
.sset-control:has([aria-invalid="true"]) { border-color: var(--danger-300); }
.sset-control:has([aria-invalid="true"]:focus) { border-color: var(--danger-600); }
.sset-control .sset-set {
  align-self: stretch; height: auto; min-height: var(--control-md); min-width: 64px; padding: 0 var(--space-4);
  border: 0; border-left: 1px solid var(--border); border-radius: 0 calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0;
  box-shadow: none; background: var(--surface-sunk); font-size: var(--text-sm);
}
.sset-control .sset-set:disabled { opacity: 1; color: var(--text-soft); }
.sset-control .sset-set:focus-visible { outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .sset-control:hover:not(:focus-within) { box-shadow: var(--shadow-sm); }
  .sset-control .sset-set:hover:not(:disabled) { background: var(--surface-hover-strong); }
  .sset-control .sset-set:disabled:hover { background: var(--surface-sunk); }
}
.sset-tracker .field-msg { margin: 0; }
.sset-found { display: inline-flex; align-items: flex-start; gap: var(--space-1); color: var(--success-700); }
.sset-found svg { color: var(--success-600); }
.sset-hint { color: var(--text-soft); }
/* the custom head code: as written, in a code face (no token: this box is its one use) */
.sset-code {
  min-height: 132px; resize: vertical; white-space: pre; overflow-wrap: normal; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--text-xs); line-height: var(--leading-normal);
}
.sset-foot { display: flex; align-items: center; gap: var(--space-3); }
/* the agency's "Count enquiries as conversions": one bordered box, a switch per tracker */
.sset-convs-box { display: flex; flex-direction: column; gap: var(--space-2-5); }
.sset-convs-head { display: flex; flex-direction: column; gap: var(--space-0-5); }
.sset-convs-head b { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.sset-convs-head small { font-size: var(--text-xs); color: var(--text-soft); }
.sset-convs { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.sset-conv { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2-5) var(--space-3); }
.sset-conv + .sset-conv { border-top: 1px solid var(--border-faint); }
.sset-conv:has(.sset-conv-warn) { align-items: flex-start; }
.sset-conv-text { display: flex; flex-direction: column; gap: var(--space-0-5); min-width: 0; }
.sset-conv-text b { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); }
.sset-conv-text small { font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-soft); }
/* the website sends this tracker's lead event itself: the reason, and the agency's "Send Magnet's anyway" */
.sset-conv-text .sset-conv-warn { display: flex; align-items: flex-start; gap: var(--space-1); color: var(--warning-700); }
.sset-conv-warn svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.sset-conv-always { display: inline-flex; align-items: center; gap: var(--space-1-5); margin-top: var(--space-1); font-size: var(--text-xs); color: var(--text); cursor: pointer; }
/* the website loads this tag itself */
.sset-self { display: flex; align-items: flex-start; gap: var(--space-1); margin: var(--space-1) 0 0; font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-soft); }
.sset-self svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.sset-status { font-size: var(--text-sm); color: var(--text-soft); }

/* what happens to an enquiry, under a faint rule */
.sset-events {
  display: flex; flex-direction: column; gap: var(--space-1); padding-top: var(--space-4); border-top: 1px solid var(--border-faint);
  font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--text-muted);
}
.sset-events b { font-weight: var(--fw-semibold); color: var(--text-strong); }
.sset-events p { margin: 0; }
.sset-fail { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
.sset-fail svg { width: 16px; height: 16px; color: var(--text-soft); }

/* ---- Redirects (src/features/sites/siteRedirectsPanel.js) ---- */
.sset-quiet { margin: 0; font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--text-soft); }
.sset-block { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.sset-block[hidden] { display: none; }
.sset-block-head { display: flex; flex-direction: column; gap: var(--space-0-5); }
.sset-block-head b { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.sset-block-head small { font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-soft); }
/* a list of rows is one bordered box with faint dividers */
.sset-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.sset-li { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: var(--space-2) var(--space-3); min-width: 0; }
.sset-li + .sset-li { border-top: 1px solid var(--border-faint); }
.sset-li.is-same { color: var(--text-soft); }
.sset-path {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--text-xs); color: var(--text-strong);
}
.sset-meta { flex: none; font-size: var(--text-xs); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.sset-li-acts { display: flex; align-items: center; gap: var(--space-1); flex: none; }
.sset-sugg-wrap { display: flex; flex-direction: column; gap: var(--space-3); }
.sset-sugg-wrap:empty { display: none; }
.sset-sugg .sset-li { align-items: flex-start; }
.sset-sugg .checkbox { margin-top: var(--space-1-5); flex: none; }
.sset-sugg-from { display: flex; flex-direction: column; gap: var(--space-0-5); flex: 1 1 50%; min-width: 0; padding-top: var(--space-1); }
.sset-sugg-from small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-xs); color: var(--text-soft); }
.sset-sugg-to { flex: 1 1 50%; min-width: 0; }   /* an old address's page: the shared link picker */
/* a close guess (Check): its pill as wide as its word, under the old address */
.sset-sugg-check { align-self: flex-start; }
/* the rules: old address → page, the kind, remove */
.sset-rules { display: flex; flex-direction: column; gap: var(--space-2); }
.sset-rule { display: grid; grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr) 156px var(--control-sm); align-items: center; gap: var(--space-2); }
.sset-rule-head { font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-soft); }
.sset-arrow { display: inline-grid; place-items: center; color: var(--text-soft); }
.sset-arrow svg { width: 14px; height: 14px; }
.sset-rule-msg { grid-column: 1 / -1; margin-top: calc(var(--space-1) * -1); }
.sset-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.sset-inline { display: flex; gap: var(--space-2); }
.sset-inline .input { flex: 1 1 auto; min-width: 0; }

/* "Old site saved 3 Nov: 214 addresses": the old website's list Magnet keeps for the domain switch (services/oldSite),
   under the Redirects heading or the empty state; its website quieter after it */
.sset-oldsite { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-1-5); margin: 0; font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-muted); }
.sset-oldsite svg { flex: none; width: 14px; height: 14px; color: var(--success-600); }
.sset-oldsite small { min-width: 0; overflow-wrap: anywhere; font-size: var(--text-xs); color: var(--text-soft); }
.empty-quiet + .sset-oldsite { justify-content: center; }

/* ---- the old website's pages with nowhere to go (src/features/sites/siteDomainPanel.js askOldSite: before its domain
   connects) and the publish confirm's lines (portalWebsitePage confirmChanges: services/oldSite publishWarnings) ---- */
.dp-oldsite { display: flex; flex-direction: column; gap: var(--space-3); }
.dp-oldsite .confirm-desc { margin: 0; }
.dp-oldsite-paths { display: flex; flex-direction: column; gap: var(--space-1); margin: 0; padding: var(--space-2-5) var(--space-3); list-style: none; border-radius: var(--radius-sm); background: var(--surface-sunk); }
.dp-oldsite-paths code { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--text-xs); color: var(--text-strong); }
.dp-oldsite-more { font-size: var(--text-xs); color: var(--text-soft); }
.pubwarn { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.pubwarn-item { display: flex; align-items: flex-start; gap: var(--space-2-5); padding: var(--space-3); border-radius: var(--radius-sm); background: var(--surface-sunk); font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--text-muted); }
.pubwarn-item.is-warn { background: var(--warning-bg); color: var(--warning-700); }
.pubwarn-item svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.pubwarn-item b { display: block; margin-bottom: var(--space-0-5); font-weight: var(--fw-semibold); color: var(--text-strong); }
.pubwarn-item code { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--text-xs); }
.pubwarn-item > span { min-width: 0; }

@media (max-width: 640px) {
  .sset-rule { grid-template-columns: minmax(0, 1fr) var(--control-sm); }
  .sset-rule > [name="from"] { grid-column: 1 / -1; }
  .sset-rule > .sset-arrow, .sset-rule-head { display: none; }
  .sset-rule > [name="to"] { grid-column: 1 / -1; }
  .sset-li { flex-wrap: wrap; }
  .sset-sugg-to { flex-basis: 100%; }
}

/* Keep setup guidance available without making it the main task. */
.sset-page { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; container-type: inline-size; }
.sset-tabs { align-self: flex-start; }
.sset-pane[hidden] { display: none; }
.sset-tracker-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.sset-code-state { flex: none; color: var(--text-soft); font-size: var(--text-xs); font-weight: var(--fw-regular); }
.sset-location { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; color: var(--text-muted); font-size: var(--text-sm); line-height: var(--leading-snug); }
.sset-location svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.sset-warning { color: var(--warning-700); }
.sset-tracker .field-msg:empty { display: none; }
.sset-tracker .sset-hint { color: var(--warning-700); }
.sset-disclosure, .sset-detected { min-width: 0; border-top: 1px solid var(--border-faint); }
.sset-disclosure > summary, .sset-detected > summary { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) 0; list-style: none; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); cursor: pointer; }
.sset-disclosure > summary::-webkit-details-marker, .sset-detected > summary::-webkit-details-marker { display: none; }
.sset-disclosure > summary > small { margin-left: auto; color: var(--text-soft); font-size: var(--text-xs); font-weight: var(--fw-regular); }
.sset-disclosure > summary > svg, .sset-detected > summary > svg { flex: none; width: 14px; height: 14px; margin-left: auto; color: var(--text-soft); }
.sset-disclosure > summary > small + svg { margin-left: 0; }
.sset-disclosure[open] > summary > svg, .sset-detected[open] > summary > svg { transform: rotate(180deg); }
.sset-disclosure-body { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-2) 0 var(--space-4); font-size: var(--text-sm); color: var(--text-muted); line-height: var(--leading-normal); }
.sset-disclosure-body p { margin: 0; }
.sset-disclosure-body h4 { margin: var(--space-2) 0 0; color: var(--text-strong); font-size: var(--text-sm); font-weight: var(--fw-semibold); }
.sset-detected { border: 0; }
.sset-detected > summary { padding: var(--space-1) 0; font-size: var(--text-xs); color: var(--text-soft); }
.sset-detected p { margin: var(--space-1) 0 0; font-size: var(--text-xs); color: var(--text-muted); line-height: var(--leading-normal); }

.sset-location > span, .sset-self > span { min-width: 0; overflow-wrap: anywhere; }
/* the Google preview's description while the home page is still being read (siteSettingsPanel unreadDescription) */
.pw-ss-gdesc-skel { width: 70%; height: 0.85em; }
