/* The settings form of a bot website (web/site-settings.js): the creators' «Настройки сайта» and the owner's «Сайт бота». */
.site-settings { display: grid; gap: var(--space-grid, 14px); max-width: 880px; min-width: 0; }
.site-settings, .site-stats, .sites-owners, .sites-free, .osite { --muted: #a3a3ad; }
.site-settings input::placeholder, .site-settings textarea::placeholder, .osite input::placeholder { color: #a3a3ad; opacity: 1; }
.site-settings input, .site-settings textarea, .site-settings select, .osite input, .osite select { border-color: #71717c; }
/* A field a refusal is about stays outlined in red over the lighter border above. */
.site-settings [aria-invalid="true"], .osite [aria-invalid="true"] { border-color: var(--danger); }
.site-section h2 { margin: 0 0 4px; font-size: 17px; }
.site-section > summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-size: 17px; font-weight: 650; list-style: none; cursor: pointer; }
.site-section > summary::-webkit-details-marker { display: none; }
.site-section > summary::after { content: "+"; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--muted); }
.site-section[open] > summary::after { content: "−"; }
.site-fields { display: grid; gap: 6px; }
.site-fields label { margin-top: 10px; }
.site-fields h3 { margin: 22px 0 0; font-size: 15px; }
.site-fields textarea { resize: vertical; }
.site-faq { display: grid; gap: 10px; margin-top: 6px; }
.site-faq-row { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel-2); }
.site-save { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-pop); }
.site-save .form-error { flex: 1; margin: 0; }
#ss-accent { width: 72px; height: 44px; padding: 4px; }
/* «Логотип»: the picture (or the name's first letter, as the site shows it without one), the file to pick and «Убрать». */
.site-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.site-logo-view { display: grid; place-items: center; flex: none; min-width: 56px; height: 56px; padding: 4px; border: 1px solid var(--line-2); border-radius: var(--radius-md); background: var(--panel-2); }
.site-logo-view img { display: block; max-width: 160px; height: 46px; object-fit: contain; }
.site-logo-view b { font-size: 22px; }
.site-logo-view.is-bad { border-color: var(--danger); }
.site-logo input[type="file"] { flex: 1 1 200px; min-width: 0; }
@media (max-width: 619px) { .site-save { bottom: calc(var(--mobile-nav-height, 0px) + 8px); } }

/* «Сайт бота» on the owner's bot page (web/owner-site.js). */
.osite h2 .pill { margin-left: 6px; font-size: 12px; vertical-align: middle; }
.osite-create { display: grid; gap: 6px; max-width: 560px; }
.osite-create .form-actions { justify-content: flex-start; }
.osite-address { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.osite-address select { min-width: 150px; }
.osite-site { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.osite-host { display: inline-flex; align-items: center; min-height: 44px; min-width: 0; max-width: 100%; font-size: 17px; font-weight: 650; overflow-wrap: anywhere; text-decoration: none; }
.osite .sites-funnel { margin: 6px 0 14px; max-width: 480px; }
.osite-domain { display: grid; gap: 8px; margin: 4px 0 14px; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--radius-md); background: var(--panel-2); }
.osite-domain h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.osite-domain ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.osite-record { display: grid; grid-template-columns: auto minmax(0, max-content) auto; justify-content: start; align-items: center; gap: 4px 10px; margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel); font-size: 13px; }
.osite-record code { font-family: var(--font-mono); overflow-wrap: anywhere; }
/* «Копировать» of a record's name and value: a compact third column, still a comfortable tap. */
.osite-copy { min-width: 0; min-height: 40px; padding: 0 12px; font-size: 13px; }
@media (max-width: 619px) { .osite-address { grid-template-columns: 1fr; } }
.osite .sites-funnel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.osite .sites-funnel dt { color: var(--muted); font-size: 12px; }
.osite .sites-funnel dd { margin: 2px 0 0; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.osite .pill.success { color: var(--ok); }

/* A site's figures (web/site-settings.js stats): four numbers, the funnel as bars of the visitors, today. */
.site-stats { display: grid; gap: 12px; margin: 6px 0 12px; min-width: 0; }
.site-stats-title { margin: 0; color: var(--muted); font-size: 12px; }
.site-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sites-card .site-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-kpi { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel-2); min-width: 0; }
.site-kpi span { color: var(--muted); font-size: 12px; }
.site-kpi strong { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.site-change { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }
.site-change.up { color: var(--ok); } .site-change.down { color: var(--danger); }
.site-funnel-bars { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-funnel-bars li { display: grid; grid-template-columns: minmax(110px, 0.9fr) minmax(0, 2fr) auto 40px; align-items: center; gap: 10px; font-size: 13px; }
.site-funnel-bars span { color: var(--muted); }
.site-funnel-bars b { font-variant-numeric: tabular-nums; text-align: right; }
.site-funnel-bars small { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.site-funnel-bars progress { width: 100%; height: 6px; border: 0; border-radius: 6px; overflow: hidden; background: var(--panel-3); appearance: none; -webkit-appearance: none; }
.site-funnel-bars progress::-webkit-progress-bar { background: var(--panel-3); border-radius: 6px; }
.site-funnel-bars progress::-webkit-progress-value { background: var(--text); border-radius: 6px; }
.site-funnel-bars progress::-moz-progress-bar { background: var(--text); border-radius: 6px; }
.site-today { margin: 0; color: var(--muted); font-size: 13px; }
/* Source names are untrusted, potentially unbroken strings. Cards reflow even in a narrow desktop column. */
.site-sources { min-width: 0; container-type: inline-size; }
.site-sources table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.site-sources-title { margin: 0; padding: 6px 0 10px; font-size: 14px; font-weight: 650; }
.site-sources th, .site-sources td { padding: 8px 5px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; white-space: normal; }
.site-sources th:first-child { width: 28%; text-align: left; }
.site-sources thead th { color: var(--muted); font-weight: 500; }
.site-sources tbody th { background: transparent; font-weight: 600; }
.site-sources td[colspan] { text-align: left; color: var(--muted); }
.site-source-label { display: none; }
.site-sources[aria-busy="true"] table { opacity: .55; }
/* Tabs (sources, campaigns, landing pages, countries, keywords) and periods: equal buttons, as many to a row as fit. */
.site-sources-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; }
.site-sources-switch .segmented { flex: 1 1 260px; display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.site-sources-switch .segmented button { min-height: 40px; padding: 4px 8px; white-space: normal; line-height: 1.2; overflow-wrap: anywhere; }
@container (max-width: 560px) {
  .site-sources thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  /* A narrow card: each source a block, its six figures three to a row (label over value) — half the height of a list. */
  .site-sources tbody { display: block; }
  .site-sources tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-sources th:first-child { display: block; grid-column: 1 / -1; width: auto; padding: 0; border: 0; font-size: 13px; }
  .site-sources td { display: grid; gap: 1px; padding: 0; border: 0; text-align: left; font-size: 13px; font-weight: 600; }
  .site-sources td[colspan] { grid-column: 1 / -1; font-weight: 400; }
  .site-source-label { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
}
.sites-summary { margin-bottom: var(--space-grid, 14px); }
.sites-summary h2 { margin: 0; font-size: 17px; }
@media (max-width: 619px) {
  .site-funnel-bars li { grid-template-columns: minmax(96px, 1fr) minmax(0, 1.2fr) auto 36px; }
  .site-kpis, .sites-card .site-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-kpi { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .site-kpi strong { grid-column: 1 / -1; grid-row: 2; }
  .site-kpi .site-change { grid-column: 2; grid-row: 1; }
}

/* «Тексты с ИИ» in the creators' site settings. */
.site-ai { display: grid; gap: 10px; }
.site-ai h2 { margin: 0 0 4px; font-size: 17px; }
.site-ai-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.site-ai-status:empty { display: none; }
@media (max-width: 619px) { .site-ai-row { grid-template-columns: 1fr; } }
@media (max-width: 389px) {
  .site-funnel-bars li { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 8px; }
  .site-funnel-bars progress { grid-column: 1 / -1; grid-row: 2; }
  .site-funnel-bars small { min-width: 36px; }
}

/* «Примеры на сайте» of the owner's cabinet (web/owner-showcase.js): the site's cards, each with its example and «Заменить». */
.oshow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.oshow-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.oshow-card h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.oshow-card p { margin: 0; }
.oshow-media { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-sm); background: var(--panel); }
.oshow-empty { min-height: 120px; }
.oshow-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.oshow-pair figure { margin: 0; }
.oshow-pair figcaption { margin-top: 4px; font-size: 12px; color: var(--muted); }
.oshow-summary p { margin: 0 0 6px; }
/* «Что должно происходить» of a card that takes words; the second photo of a scene of two said in «Заменить пример». */
.oshow-words { display: grid; gap: 4px; margin: 0; font-size: 13px; font-weight: 650; }
.oshow-words textarea { width: 100%; min-height: 56px; resize: vertical; font-weight: 400; }
/* «Кто на фото» (the creators' «Сгенерировать» look; admin-showcase.css is loaded for the creators only). */
.oshow-card .show-gen-who { margin: 0; padding: 0; border: 0; }
.oshow-card .show-gen-who legend { margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.oshow-card .show-gen-choice { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.oshow-card .file-button { align-self: flex-start; }
/* «Скрыть с сайта»: a hidden card is dimmed, its state and «Вернуть на сайт» stay readable. */
.oshow-card.is-hidden .oshow-media { opacity: .45; }
/* A picture or a clip of a card opens large on a press (owner-showcase.js view). */
.oshow-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-sm); }
.oshow-zoom:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
dialog:has(.oshow-view) { width: min(1100px, calc(100vw - 24px)); }
.oshow-view { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.oshow-view figure { margin: 0; min-width: 0; }
.oshow-view figcaption { margin-top: 4px; font-size: 13px; color: var(--muted); }
.oshow-view a { display: block; cursor: zoom-in; }
.oshow-full { display: block; width: 100%; max-height: 74vh; object-fit: contain; border-radius: var(--radius-sm); background: var(--panel); }
.oshow-full.oshow-empty { aspect-ratio: 4 / 5; }
@media (max-width: 640px) { .oshow-view { grid-template-columns: 1fr; } .oshow-full { max-height: 62vh; } }
.oshow-hide { gap: 8px; align-items: center; }
.oshow-hide .pill.warn { background: rgb(228 174 79 / .12); color: var(--warn); }
@media (max-width: 520px) { .oshow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
/* «Женские / Мужские» at the top of «Примеры на сайте» (web/owner-showcase.js): the side the whole page shows — kept in
   sight while the page scrolls where the menu is a column beside it (the phone's menu bar is sticky itself). */
.oshow-sides { margin-top: 20px; }
.oshow-sides .segmented { flex-wrap: wrap; }
.oshow-sides .field-hint { max-width: 820px; margin: 8px 0 0; }
@media (min-width: 960px) {
  .oshow-sides { position: sticky; top: 0; z-index: 6; padding: 10px 0; background: var(--bg); box-shadow: 0 1px 0 var(--line); }
}
/* «👗 Гардероб» of «Примеры на сайте»: the costumes on the model of the side shown; one with no example yet shows the flat
   garment from the wardrobe, dimmed. */
.oshow-wardrobe { margin-top: 28px; }
.oshow-wardrobe h2, .oshow-home h2, .oshow-cards-title { margin: 0 0 6px; font-size: 18px; }
.oshow-wardrobe > .field-hint, .oshow-home > .field-hint { max-width: 820px; margin: 0 0 10px; }
/* «🏠 Главная страница» above the scenes («Сцены сайта» named below it). */
.oshow-home { margin-top: 20px; }
.oshow-cards-title { margin-top: 28px; }
.oshow-flat { object-fit: contain; opacity: .7; }
/* The scenes' bar (web/owner-showcase-extras.js): «Все · Фото · Видео», a section, the order, a search — one row on a
   wide screen, stacked on a phone; the wardrobe has its own (a section, a search). */
.oshow-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 8px 0 0; }
.oshow-tools .segmented { flex-wrap: wrap; }
.oshow-tool { display: grid; gap: 4px; min-width: 180px; font-size: 13px; font-weight: 650; }
.oshow-tool select, .oshow-tool input { width: 100%; font-weight: 400; }
.oshow-search { flex: 1 1 220px; }
.oshow-more { grid-column: 1 / -1; gap: 10px; align-items: center; margin-top: 12px; }
.oshow-more p { margin: 0; }
@media (max-width: 520px) { .oshow-tool { flex: 1 1 100%; min-width: 0; } }
/* «Баланс на примеры» in the summary; its history in a dialog. */
.oshow-money { display: grid; gap: 6px; margin-bottom: 10px; }
.oshow-money p { margin: 0; }
.oshow-moves { display: grid; gap: 0; margin: 12px 0 0; padding: 0; list-style: none; }
.oshow-moves li { display: grid; grid-template-columns: minmax(96px, auto) 1fr auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.oshow-moves li strong.success { color: var(--ok); }
/* «💡 Подсказки к фото»: a slot with no picture shows the icon the site draws. */
.oshow-tip-icon { display: grid; place-items: center; font-size: 46px; color: var(--danger); }
.oshow-tip-icon.fits { color: var(--ok); }
/* «Сменить одежду» off on the sites: said above the wardrobe (its examples may come first). */
.oshow-wardrobe .notice { max-width: 820px; margin: 0 0 10px; padding: 10px 14px; border: 1px solid rgb(228 174 79 / .45); border-radius: var(--radius-md); background: rgb(228 174 79 / .08); font-size: 14px; }
/* «SEO и аналитика» (web/site-seo.js): what is set in the summary, «задан» at each field, the way to its service, the check. */
.site-seo > summary { gap: 10px; }
.site-seo > summary > span:first-child { flex: 0 1 auto; }
.site-seo-sum { flex: 1 1 auto; color: var(--muted); font-size: 13px; font-weight: 500; text-align: right; }
.site-seo-field { display: grid; gap: 6px; }
.site-seo-field label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.site-seo-field label .pill { min-height: 22px; padding: 0 8px; font-size: 12px; }
.site-seo-field .pill.success { background: rgb(90 196 143 / .14); color: var(--ok); }
.site-seo-link { justify-self: start; font-size: 13.5px; }
.site-seo-out { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: 14px; }
.site-seo-check { display: grid; gap: 8px; justify-items: start; margin-top: 4px; }
.site-seo-check .field-hint { margin: 0; }
.site-seo-result { justify-self: stretch; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-md); background: var(--panel-2); }
.site-seo-page { margin: 0 0 10px; font-weight: 600; overflow-wrap: anywhere; }
.site-seo-page.is-bad { color: var(--danger); }
.site-seo-marks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.site-seo-marks li { display: grid; grid-template-columns: 22px minmax(120px, auto) minmax(0, 1fr); gap: 4px 10px; align-items: baseline; overflow-wrap: anywhere; }
.site-seo-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.site-seo-marks .is-ok .site-seo-icon { background: rgb(90 196 143 / .14); color: var(--ok); }
.site-seo-marks .is-warn .site-seo-icon { background: rgb(228 174 79 / .14); color: var(--warn); }
.site-seo-marks .is-bad .site-seo-icon { background: rgb(242 122 111 / .14); color: var(--danger); }
.site-seo-marks .is-off .site-seo-icon { background: var(--panel-3); color: var(--muted); }
.site-seo-marks .is-off > span:last-child { color: var(--muted); }
.site-seo-map { margin: 14px 0 0; overflow-wrap: anywhere; font-size: 14px; }
.site-seo-map code { font-family: var(--font-mono); font-size: 13px; }
@media (max-width: 619px) {
  .site-seo > summary { flex-wrap: wrap; }
  .site-seo-sum { order: 3; flex-basis: 100%; text-align: left; }
  .site-seo-marks li { grid-template-columns: 22px minmax(0, 1fr); }
  .site-seo-marks li > span:last-child { grid-column: 2; }
}
