/* «וואטסאפ רשמי» (#official, official-view.js). Visual first, few words (Achiya 20.10.2026): a picture and three steps
   before linking; the line as four gauges; the two channels as two cards; templates as the bubbles customers see;
   campaigns as rings. The family's language only (family.css tokens; ink on cream, one yellow key, leaf corners). */

#room-official .off { display: grid; gap: clamp(28px, 5vw, 44px); max-width: 920px; }
#room-official .off-sec { display: grid; gap: 14px; }
#room-official .off-sec__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#room-official .off-sec__title { font: clamp(22px, 3vw, 26px)/1.2 var(--f-display); }
#room-official .btn .icon { width: 18px; height: 18px; }

/* ---------- before linking: one picture, three steps, one key ---------- */
#room-official .off-hero { display: grid; grid-template-columns: 1fr minmax(180px, 280px); align-items: center; gap: clamp(16px, 4vw, 40px);
  padding: clamp(22px, 4vw, 40px); overflow: hidden; }
#room-official .off-hero__art { order: 2; width: 100%; height: auto; }
#room-official .off-hero__body { display: grid; gap: 22px; }
#room-official .off-hero__title { font: clamp(26px, 4vw, 34px)/1.15 var(--f-display); }
#room-official .off-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
#room-official .off-steps li { position: relative; display: grid; justify-items: center; gap: 8px; padding: 14px 8px 12px; text-align: center;
  background: var(--ivory); border-radius: var(--leaf-xs); font: 15px/1.3 var(--f-ui); counter-increment: s; }
#room-official .off-steps li::before { position: absolute; top: 8px; inset-inline-start: 10px; content: counter(s); color: var(--ink-soft); font: 13px/1 var(--f-ui); }
#room-official .off-steps__ic { display: grid; width: 46px; height: 46px; place-items: center; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; }
#room-official .off-steps__ic .icon { width: 22px; height: 22px; }
#room-official .off-coex .toggle__ui { white-space: normal; }
#room-official .off-note { margin: 0; padding: 10px 14px; background: var(--ivory); border-radius: var(--leaf-xs); }
#room-official .off-hero .actions { margin: 0; }
/* the YCloud way: the steps, the key, the number when the account holds several; Meta's window below it when offered */
#room-official .off-yc { display: grid; gap: 18px; }
/* YCloud's own window, when offered: first, and the own account's key behind «יש לי חשבון YCloud משלי» */
#room-official .off-pop { display: grid; gap: 14px; justify-items: start; }
#room-official .off-yc .off-steps a { color: inherit; }
#room-official .off-nw { white-space: nowrap; }
#room-official .off-yc__key input { width: 100%; font: 16px/1.2 var(--f-mono, ui-monospace, monospace); letter-spacing: .04em; }
#room-official .off-yc__numbers .off-pick__opt span { flex-wrap: wrap; text-align: center; }
#room-official .off-yc__numbers small { flex-basis: 100%; color: var(--ink-soft); font-size: 14px; }
#room-official .off-yc__ask { font: 600 16px/1.3 var(--f-ui); }
#room-official .off-meta { display: grid; gap: 14px; padding-top: 18px; border-top: 1px dashed var(--ink-soft); }

/* ---------- linked: who it is, and four gauges ---------- */
#room-official .off-line { display: grid; gap: 16px; }
#room-official .off-id { display: flex; align-items: center; gap: 14px; }
#room-official .off-id > div:nth-child(2) { flex: 1; min-width: 0; }
#room-official .off-id__dot { width: 14px; height: 14px; flex: none; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 232, 26, 0.35); }
#room-official .off-id__dot[data-tone="bad"] { background: var(--err); border-color: var(--err); box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.15); }
#room-official .off-id__phone { font: clamp(30px, 5vw, 42px)/1.05 var(--f-display); font-feature-settings: "tnum", "lnum"; white-space: nowrap; }
#room-official .off-id__name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 0; color: var(--ink-2); font: 17px/1.3 var(--f-ui); }
#room-official .off-badge { display: inline-grid; width: 22px; height: 22px; place-items: center; background: var(--ink); color: var(--yellow); border-radius: 50%; }
#room-official .off-badge .icon { width: 14px; height: 14px; }
#room-official .off-id__tag { padding: 2px 10px; color: var(--ink-2); background: var(--ivory); border-radius: 999px; font: 13px/1.5 var(--f-ui); }
#room-official .off-id__keys { display: flex; gap: 6px; }

#room-official .off-gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
#room-official .off-gauge { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 16px 10px 18px; text-align: center;
  background: var(--sheet); border: 2px solid var(--ink); border-radius: var(--leaf-sm); box-shadow: var(--card-shadow); }
#room-official .off-gauge__label { color: var(--ink-soft); font: 14px/1.2 var(--f-ui); }
#room-official .off-gauge__value { font: 18px/1.2 var(--f-ui); }
#room-official .off-gauge[data-tone="bad"] { border-color: var(--err); }
#room-official .off-gauge[data-tone="bad"] .off-gauge__value { color: var(--err); }
#room-official .off-gauge[data-tone="wait"] .off-gauge__value { color: var(--warn-text); }
#room-official .off-gauge__light { width: 56px; height: 56px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%;
  box-shadow: inset 0 -6px 0 rgba(27, 26, 23, 0.12); }
#room-official .off-gauge[data-tone="wait"] .off-gauge__light { background: #f3b33d; }
#room-official .off-gauge[data-tone="bad"] .off-gauge__light { background: var(--err); border-color: var(--err); }
#room-official .off-gauge[data-tone="plain"] .off-gauge__light { background: var(--ivory); border-style: dashed; }
#room-official .off-gauge__ic { display: grid; width: 56px; height: 56px; place-items: center; background: var(--ivory); border-radius: 50%; }
#room-official .off-gauge[data-tone="ok"] .off-gauge__ic { background: var(--yellow); border: 2px solid var(--ink); }
#room-official .off-gauge[data-tone="bad"] .off-gauge__ic { color: var(--err); border: 2px solid var(--err); background: none; }
#room-official .off-gauge__ic .icon { width: 26px; height: 26px; }

#room-official .off-ring { position: relative; display: inline-grid; width: 64px; height: 64px; flex: none; place-items: center; }
#room-official .off-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#room-official .off-ring__track { fill: none; stroke: var(--ivory); stroke-width: 7; }
#room-official .off-ring__fill { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray 0.5s ease; }
#room-official .off-ring__in { position: relative; font: 15px/1 var(--f-ui); font-feature-settings: "tnum", "lnum"; }

#room-official .off-alert { margin: 0; padding: 12px 16px; color: var(--err); border: 1.5px solid var(--err); border-radius: var(--leaf-xs); list-style: none; }
#room-official .off-problems { display: grid; gap: 4px; }
#room-official .off-unlink { justify-self: start; color: var(--ink-soft); }

/* ---------- regular or official: two cards ---------- */
#room-official .off-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#room-official .off-vs__card { display: grid; align-content: start; gap: 14px; padding: 18px 20px; background: var(--sheet);
  border: 2px solid var(--line-strong); border-radius: var(--leaf-sm); }
#room-official .off-vs__card.is-current { border-color: var(--ink); box-shadow: var(--card-shadow); }
#room-official .off-vs__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#room-official .off-vs__head h4 { font: 19px/1.25 var(--f-ui); }
#room-official .off-vs__mine { padding: 2px 10px; background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 999px; font: 13px/1.5 var(--f-ui); }
#room-official .off-vs__card ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
#room-official .off-vs__card li { display: flex; align-items: center; gap: 10px; font-size: 16px; }
#room-official .off-vs__ic { display: grid; width: 34px; height: 34px; flex: none; place-items: center; background: var(--ivory); border-radius: 50%; }
#room-official .off-vs__card.is-current .off-vs__ic { background: var(--yellow); }
#room-official .off-vs__ic .icon { width: 17px; height: 17px; }
#room-official .off-all summary { width: max-content; color: var(--ink-2); font: 15px/1.4 var(--f-ui); cursor: pointer; }
#room-official .off-all[open] summary { margin-bottom: 12px; }
#room-official .off-table { width: 100%; border-collapse: collapse; background: var(--sheet); font-size: 15px; line-height: 1.45; }
#room-official .off-table th, #room-official .off-table td { padding: 9px 12px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--hair); }
#room-official .off-table thead th { font: 15px/1.3 var(--f-ui); }
#room-official .off-table tbody th { font: 15px/1.45 var(--f-body); }
#room-official .off-yes { font: 17px/1 var(--f-ui); }
#room-official .off-no { color: var(--ink-soft); }
#room-official .off-some { color: var(--ink-2); font-size: 14px; }

/* ---------- templates: the bubbles customers see ---------- */
#room-official .off-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
#room-official .off-tile { display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; background: var(--sheet);
  border: 2px solid var(--ink); border-radius: var(--leaf-sm); }
#room-official .off-tile[data-tone="bad"] { border-color: var(--err); }
#room-official .off-tile__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 8px 14px; font: 16px/1.3 var(--f-ui); }
#room-official .off-tile__wall { padding: 12px 14px 14px; background: var(--wa-wall, #efeae2); }
#room-official .off-tile__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; }
#room-official .off-tile__cat { color: var(--ink-soft); font-size: 13.5px; }
#room-official .off-tile__why { margin: 0; padding: 0 14px 12px; color: var(--err); font-size: 14px; line-height: 1.45; }
#room-official .icon-btn--sm { width: 36px; height: 36px; min-height: 36px; }

#room-official .off-bubble { display: grid; gap: 4px; max-width: 330px; padding: 8px 10px; color: #111b21; background: #fff;
  border-radius: 2px 12px 12px 12px; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); font-size: 15px; }
#room-official .off-bubble__head { font: 15.5px/1.35 var(--f-ui); }
#room-official .off-bubble__body { margin: 0; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
#room-official .off-bubble__foot { color: var(--wa-meta); font-size: 12.5px; }
#room-official .off-bubble__keys { display: grid; margin: 6px -10px -8px; padding: 0; list-style: none; }
#room-official .off-bubble__keys li { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; color: #027eb5;
  font: 14.5px/1.2 var(--f-ui); border-top: 1px solid rgba(11, 20, 26, 0.1); }
#room-official .off-bubble__keys .icon { width: 15px; height: 15px; }
#room-official .off-var { display: inline-grid; min-width: 22px; height: 22px; padding: 0 5px; place-items: center; margin-inline: 2px; vertical-align: 1px;
  color: var(--ink); background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 6px; font: 12.5px/1 var(--f-ui); }
#room-official .off-bubble--mini { justify-self: start; max-width: 360px; margin: 10px; outline: 10px solid #efeae2; }
#room-official .off-bubble--mini:empty { display: none; }

#room-official .off-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px; background: var(--ivory); border-radius: var(--leaf-xs); }
#room-official .off-bar > .icon { width: 20px; height: 20px; }
#room-official .off-bar__label { font: 16px/1.3 var(--f-ui); }
#room-official .off-bar select { flex: 1; min-width: 160px; max-width: 320px; }

#room-official .off-empty { display: grid; justify-items: center; gap: 8px; margin: 0; padding: 22px; color: var(--ink-soft); text-align: center;
  border: 2px dashed var(--line-strong); border-radius: var(--leaf-sm); font: 16px/1.3 var(--f-ui); }
#room-official .off-empty img { width: auto; height: 64px; }

/* the editor: the form, and the phone it lands on */
#room-official .off-editor { display: grid; grid-template-columns: 1fr minmax(240px, 320px); align-items: start; gap: clamp(16px, 3vw, 30px); padding: clamp(16px, 3vw, 26px); }
#room-official .off-editor__form { display: grid; gap: 16px; min-width: 0; }
#room-official .off-form__title { font: 22px/1.2 var(--f-display); }
#room-official .off-editor input:not([type="radio"]):not([type="checkbox"]), #room-official .off-editor textarea, #room-official .off-wizard select,
#room-official .off-wizard input:not([type="radio"]):not([type="checkbox"]), #room-official .off-wizard textarea { width: 100%; }
#room-official .off-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#room-official .chip--sm { min-height: 36px; padding: 4px 12px; font-size: 14px; }
#room-official .chip .icon { width: 15px; height: 15px; }
#room-official .off-examples { display: grid; gap: 10px; }
#room-official .off-buttons { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
#room-official .off-btnlist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
#room-official .off-btnrow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
#room-official .off-btnrow input + input { grid-column: 2; }
#room-official .off-btnrow__kind { color: var(--ink-soft); font: 13.5px/1.2 var(--f-ui); }
#room-official .off-phone { position: sticky; top: calc(var(--head-h) + 16px); overflow: hidden; border: 2px solid var(--ink); border-radius: 22px; box-shadow: var(--card-shadow); }
#room-official .off-phone__bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: #fff; background: #075e54; font: 15px/1.2 var(--f-ui); }
#room-official .off-phone__av { width: 30px; height: 30px; background: var(--yellow) url("/bot/assets/img/logo-mark.svg") center / 70% no-repeat; border-radius: 50%; }
#room-official .off-phone__wall { min-height: 260px; padding: 18px 12px; background: #efeae2; }

/* pick one of two (category, audience): big tiles with an icon */
#room-official .off-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
#room-official .off-pick > legend { margin-bottom: 8px; }
#room-official .off-pick__opt { position: relative; cursor: pointer; }
#room-official .off-pick__opt input { position: absolute; opacity: 0; }
#room-official .off-pick__opt span { display: flex; min-height: 54px; align-items: center; justify-content: center; gap: 8px; padding: 10px;
  background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--leaf-xs); font: 16px/1.2 var(--f-ui); }
#room-official .off-pick__opt .icon { width: 20px; height: 20px; }
#room-official .off-pick__opt input:checked + span { background: var(--yellow); box-shadow: var(--shadow-key-sm); }
#room-official .off-pick__opt input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
#room-official .off-chip { position: relative; cursor: pointer; }
#room-official .off-chip input { position: absolute; opacity: 0; }
#room-official .off-chip span { display: inline-flex; min-height: 40px; align-items: center; padding: 4px 16px; background: var(--field-white);
  border: 1.5px solid var(--ink); border-radius: 999px; font: 15px/1.2 var(--f-ui); }
#room-official .off-chip input:checked + span { background: var(--yellow); box-shadow: var(--shadow-key-sm); }
#room-official .off-chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
#room-official .off-days { margin: 0; padding: 0; border: 0; }

/* ---------- campaigns: a ring each ---------- */
#room-official .off-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
#room-official .off-cmp { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 16px 18px;
  background: var(--sheet); border: 2px solid var(--ink); border-radius: var(--leaf-sm); }
#room-official .off-cmp[data-tone="wait"] .off-ring__fill { stroke: #c98a12; }
#room-official .off-cmp .off-ring { width: 72px; height: 72px; }
#room-official .off-cmp__body { display: grid; gap: 6px; min-width: 0; }
#room-official .off-cmp__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
#room-official .off-cmp__head b { font: 18px/1.3 var(--f-ui); }
#room-official .off-cmp__why { margin: 0; color: var(--warn-text); font-size: 14.5px; }
#room-official .off-cmp__stats { display: flex; flex-wrap: wrap; gap: 6px 16px; }
#room-official .off-stat { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 15px; font-feature-settings: "tnum", "lnum"; }
#room-official .off-stat .icon { width: 16px; height: 16px; color: var(--ink-soft); }
#room-official .off-stat--bad, #room-official .off-stat--bad .icon { color: var(--err); }
#room-official .off-cmp__meta { margin: 0; color: var(--ink-soft); font-size: 13.5px; }
#room-official .off-cmp__keys { display: grid; gap: 8px; }

/* the new campaign: three numbered steps */
#room-official .off-wizard { display: grid; gap: 20px; padding: clamp(16px, 3vw, 26px); }
#room-official .off-step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
#room-official .off-step__n { display: grid; width: 36px; height: 36px; place-items: center; background: var(--ink); color: var(--yellow);
  border-radius: 50%; font: 17px/1 var(--f-ui); }
#room-official .off-step__body { display: grid; gap: 12px; min-width: 0; }
#room-official .off-params { display: grid; gap: 10px; }
#room-official .off-param { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; padding: 0; border: 0; }
#room-official .off-param > legend { float: inline-start; }
#room-official .off-param input[data-p] { flex-basis: 100%; }
#room-official .off-who { display: grid; gap: 12px; }
#room-official .off-sum { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; }
#room-official .off-sum:empty { display: none; }
#room-official .off-sum__big { display: grid; gap: 2px; }
#room-official .off-sum__big b { font: 38px/1 var(--f-display); font-feature-settings: "tnum", "lnum"; }
#room-official .off-sum__big span { color: var(--ink-soft); font: 14px/1.2 var(--f-ui); }
#room-official .off-sum__note { flex-basis: 100%; margin: 0; color: var(--ink-soft); font-size: 14px; }

#room-official .off-legal { color: var(--ink-soft); font-size: 13px; line-height: 1.5; }

@media (max-width: 720px) {
  #room-official .off-hero { grid-template-columns: 1fr; }
  #room-official .off-hero__art { order: -1; max-width: 220px; justify-self: center; }
  #room-official .off-gauges { grid-template-columns: 1fr 1fr; }
  #room-official .off-editor { grid-template-columns: 1fr; }
  #room-official .off-phone { position: static; }
}
@media (max-width: 560px) {
  #room-official .off-vs { grid-template-columns: 1fr; }
  #room-official .off-id { flex-wrap: wrap; }
  #room-official .off-id__keys { flex-basis: 100%; }
  #room-official .off-steps li { font-size: 14px; }
  #room-official .off-cmp { grid-template-columns: auto 1fr; }
  #room-official .off-cmp__keys { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; }
  #room-official .off-btnrow { grid-template-columns: 1fr auto; }
  #room-official .off-btnrow__kind { grid-column: 1 / -1; }
  #room-official .off-btnrow input + input { grid-column: 1; }
}
