/* WHATSAPP-UI-01 (owner, 2026-11-21) — «إعدادات إرسال واتساب».
   The screen used the shared grid rules only (app.css §6): one line per cell, long text cut with «…», a 30px row and centred cells. Its
   cells held several lines, fields and badges, so a long reason ran over the next column and the Meta template names were cut.
   Now: a short summary table (one line per kind) + a details panel for the chosen kind, with wrapping cards and lists.
   Every rule here is scoped to [data-wa-settings]; nothing in app.css changes and no other screen is affected. Display only. */

[data-wa-settings] .wa-small{font-size:12px;line-height:1.45}
[data-wa-settings] .wa-from-date{max-width:160px}

/* ---- the monitoring strip: wrapping cards ---- */
[data-wa-settings] .wa-monitor{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}
[data-wa-settings] .wa-mon-card{flex:1 1 260px;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;
  padding:8px 12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);line-height:1.5}
[data-wa-settings] .wa-mon-card > span{overflow-wrap:anywhere}
[data-wa-settings] .wa-counters{font-size:12px}

/* ---- the summary table and the details panel: side by side on wide screens, the panel under the table otherwise ---- */
/* side by side only when the SCREEN itself (not the window — the side menu takes part of it) has room for the whole summary table
   (620px) and the panel (380px): measured with a container query, so the table never scrolls sideways and hides its first column
   on a laptop with the menu open (1366 screenshot, 11-22) */
[data-wa-settings]{container-type:inline-size;container-name:wa-settings}
[data-wa-settings] .wa-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:start;margin-bottom:12px}
[data-wa-settings] .wa-layout > *{min-width:0}
@container wa-settings (min-width:1012px){
  [data-wa-settings] .wa-layout{grid-template-columns:minmax(620px,1fr) 380px}
  [data-wa-settings] .wa-detail{position:sticky;top:8px}
}

/* summary rows: one comfortable line; every cell is a short name or a badge, so nothing is cut */
[data-wa-settings] table.grid.wa-kinds td{height:44px}
[data-wa-settings] table.grid.wa-kinds tbody tr{cursor:pointer}
[data-wa-settings] table.grid.wa-kinds tbody tr.sel td:first-child{box-shadow:inset -3px 0 0 var(--accent)}
[data-wa-settings] .wa-kinds-wrap > table.grid{min-width:560px}
/* compact: short mode names, tighter cells, and the document name may take two lines — the table fits its 620px column
   (E2E 1366/1024, 11-22: the one-line names and full mode names made it ~830px, so it scrolled and cut the names) */
[data-wa-settings] table.grid.wa-kinds th,[data-wa-settings] table.grid.wa-kinds td{padding-inline:7px}
[data-wa-settings] table.grid.wa-kinds tbody td.start{white-space:normal;overflow:visible;text-overflow:clip;max-width:none;
  min-width:7rem;line-height:1.35;padding-block:4px}
[data-wa-settings] table.grid.wa-kinds th{white-space:normal;line-height:1.3}

/* ---- the details panel ---- */
[data-wa-settings] .wa-detail{padding:var(--s3)}
[data-wa-settings] .wa-detail-title{margin:0 0 8px;font-size:16px}
[data-wa-settings] .wa-sec{padding:10px 0;border-top:1px solid var(--border)}
[data-wa-settings] .wa-sec-h{font-weight:700;font-size:var(--fs-sm);color:var(--ink-2);margin-bottom:6px}
[data-wa-settings] .wa-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
[data-wa-settings] .wa-row > .wa-select{width:auto;min-width:220px;max-width:100%;flex:0 1 auto}
[data-wa-settings] .wa-blockers{margin-top:6px;font-size:12px;line-height:1.5}
[data-wa-settings] .wa-blockers ul{margin:4px 0 0;padding-inline-start:18px}
[data-wa-settings] .wa-blockers li{white-space:normal;overflow-wrap:anywhere}

/* a Meta template: its English name left-to-right (isolated inside the Arabic page), whole — broken at «_» if it must, never cut */
[data-wa-settings] .wa-tpls{display:flex;flex-direction:column;gap:6px}
[data-wa-settings] .wa-tpl{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:6px 10px;
  border:1px solid var(--border);border-radius:var(--r-sm);background:var(--surface-2)}
[data-wa-settings] .wa-tpl-name{display:inline-block;max-width:100%;direction:ltr;unicode-bidi:isolate;text-align:left;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12.5px;overflow-wrap:anywhere;white-space:normal}
[data-wa-settings] .wa-tpl-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px}
[data-wa-settings] .wa-chips{display:flex;flex-wrap:wrap;gap:4px 6px}
[data-wa-settings] .wa-chips .badge,[data-wa-settings] .wa-tpl-meta .badge{white-space:normal}

/* ---- the two follow-up tables: long texts (document, recipient, reason) wrap instead of being cut ---- */
[data-wa-settings] .wa-follow{margin-top:12px}
[data-wa-settings] .wa-follow > .grid-scroll{margin-top:6px}
[data-wa-settings] table.grid.wa-wrap-table tbody td.start{white-space:normal;overflow:visible;text-overflow:clip;max-width:none;
  min-width:9rem;overflow-wrap:anywhere;line-height:1.45;padding-block:6px;height:auto}
/* the template name in a follow-up row may break at «_» on a narrow screen (E2E Phone_375, 11-22: it was cut at 217px) — whole, never cut */
[data-wa-settings] table.grid.wa-wrap-table tbody td.wa-tpl-cell{white-space:normal;overflow:visible;text-overflow:clip;max-width:none;
  min-width:9rem;padding-block:6px;height:auto}

/* ---- phones: the panel and its fields take the whole width; the summary table scrolls inside its own wrapper, never the page ---- */
@media (max-width:560px){
  [data-wa-settings] .wa-row > .wa-select{min-width:0;width:100%}
  [data-wa-settings] .wa-mon-card{flex-basis:100%}
  [data-wa-settings] .wa-kinds-wrap > table.grid{min-width:520px}
}
