/* yd-ui.css - 10/29/26 THE YelloDash component set (Brandon: "Make everything look like it was all built at the same time and get rid of the
   old-look buttons"). One button, one filter chip, one status tag, one table, one header, one title size, one page cap - taken from the Google
   Ads v2 page (gads2.php) in the YelloScan light colours (yd-theme-ys.css tokens). Linked from every page head as /css/yd-ui.css?yd-theme-ys=1&v=<filemtime>: the
   "yd-theme-ys" in the URL makes the colour re-mapper in yd-theme-ys.js skip this sheet (do NOT use data-ydt - that attribute stops the theme
   from injecting its own CSS). Everything is scoped to html.ydt-ys, so the "Old look" opt-out (cookie yd_theme=old) is untouched.
   Legacy class names from older pages (.btn, .btn-primary, .mbtn, .filter-btn, .btn.go/.ok, .status-pill, ...) are mapped onto the standard
   look here, so a page migrates by being listed below, not by being rewritten. Dark mode = html.ydt-ys.ydt-dark (bottom of file).
   NEW PAGES: use .gbtn / .gbtn.gold / .gbtn.text / .gbtn.danger / .gbtn.sm, .chips > .chip(.on), span.pill.p1|p2|p3|pw|pok|pgold,
   .card, .wrap (1320) / .wrap.narrow (960), .tw > table.gt.fit (th[data-k] sortable, .l left, .wrapok, .nw, .hide-l + .morecols). */

/* ---------- buttons: ghost (default), gold (primary), text, danger, small ---------- */
html.ydt-ys :is(.gbtn,.btn,.btn-ghost,.btn-blue,.btn-generate,.btn-copy-html,.btn-new-tab,.btn-send-email,.btn-view-report,.btn-card-edit,.btn-modal-cancel,.newbtn,button.no,a.no,button.opn){
  display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #CBD5E1!important;background:#fff!important;color:#0F172A!important;
  border-radius:8px!important;padding:6px 12px;font-family:Inter,system-ui,sans-serif!important;font-size:12.5px!important;font-weight:600!important;line-height:1.3;
  letter-spacing:normal!important;text-transform:none!important;cursor:pointer;white-space:nowrap;text-decoration:none!important;box-shadow:none}
html.ydt-ys :is(.gbtn,.btn,.btn-ghost,.btn-blue,.btn-generate,.btn-copy-html,.btn-new-tab,.btn-send-email,.btn-view-report,.btn-card-edit,.btn-modal-cancel,.newbtn,button.no,a.no,button.opn):hover{border-color:#B45309!important;background:#FFFBEB!important}
html.ydt-ys :is(.gbtn.gold,button.big,.btn.gold,.btn.go,.btn.yes,body.ydp-gold-btn .btn:not(.g):not(.x),.btn-primary,.btn-gold,.btn-green,.btn-save-client,.btn-modal-save,.btn-generate.primary){background:#F5C400!important;border-color:#F5C400!important;color:#0B1120!important;font-weight:700!important}
html.ydt-ys :is(.gbtn.gold,button.big,.btn.gold,.btn.go,.btn.yes,body.ydp-gold-btn .btn:not(.g):not(.x),.btn-primary,.btn-gold,.btn-green,.btn-save-client,.btn-modal-save):hover{background:#FFD43B!important;border-color:#FFD43B!important}
html.ydt-ys :is(.gbtn.text){border-color:transparent!important;background:transparent!important;color:#1D4ED8!important;padding-left:6px;padding-right:6px}
html.ydt-ys :is(.gbtn.text):hover{background:#EFF6FF!important}
html.ydt-ys :is(.gbtn.danger,.btn.warn,.btn.red,.btn-red,.btn-modal-delete,#rm-site){background:#fff!important;border-color:#FCA5A5!important;color:#B91C1C!important}
html.ydt-ys :is(.gbtn.danger,.btn.warn,.btn.red,.btn-red,.btn-modal-delete,#rm-site):hover{background:#FEF2F2!important;border-color:#DC2626!important}
html.ydt-ys :is(.gbtn.sm,.gbtn.small,.btn.sm,.btn-sm,.btn.g){padding:4px 9px;font-size:12px!important}
html.ydt-ys :is(.gbtn,.btn)[disabled],html.ydt-ys .btn.dis{opacity:.5;cursor:default}
html.ydt-ys .gbtn.big{padding:9px 18px;font-size:14px!important;border-radius:10px!important}

/* ---------- filter chips: one pill, gold-tint when on (Google Ads "Show" row) ---------- */
html.ydt-ys :is(.chip,.filter-btn,.mbtn,.rng,.tabs .tab,.range>a){display:inline-flex;align-items:center;gap:4px;flex:none;border:1px solid #CBD5E1!important;background:#fff!important;
  color:#334155!important;border-radius:999px!important;padding:5px 12px;font-family:Inter,system-ui,sans-serif!important;font-size:12.5px!important;font-weight:500!important;
  letter-spacing:normal!important;text-transform:none!important;cursor:pointer;white-space:nowrap;text-decoration:none!important;line-height:1.3}
html.ydt-ys :is(.chip,.filter-btn,.mbtn,.rng,.tabs .tab,.range>a):hover{border-color:#B45309!important}
html.ydt-ys :is(.chip.on,.filter-btn.active,.mbtn.on,.rng.on,.tabs .tab.on,.range>a.on){background:#FEF3C7!important;border-color:#F5C400!important;color:#92400E!important;font-weight:600!important}
html.ydt-ys .chip i{font-style:normal;opacity:.7;margin-left:2px}

/* ---------- status tags: one rounded tag, colour = meaning ---------- */
html.ydt-ys :is(span.pill,.sbadge,.status-pill,.spend-badge,.st-test,.st-signed,.mode-badge){display:inline-block;border-radius:999px!important;padding:1px 8px;font-size:11.5px!important;
  font-weight:600!important;letter-spacing:normal!important;text-transform:none!important;white-space:nowrap;line-height:1.5;font-family:Inter,system-ui,sans-serif!important}
html.ydt-ys span[style*="uppercase"][style*="border-radius"]{text-transform:none!important;letter-spacing:normal!important;font-size:11.5px!important;border-radius:999px!important}
html.ydt-ys :is(.pill.p1){background:#FEE2E2!important;color:#B91C1C!important}
html.ydt-ys :is(.pill.p2){background:#FFEDD5!important;color:#C2410C!important}
html.ydt-ys :is(.pill.p3){background:#F1F5F9!important;color:#475569!important}
html.ydt-ys :is(.pill.pw){background:#DBEAFE!important;color:#1D4ED8!important}
html.ydt-ys :is(.pill.pok){background:#DCFCE7!important;color:#15803D!important}
html.ydt-ys :is(.pill.pgold,.pill-queued){background:#FEF3C7!important;color:#92400E!important}

/* ---------- one header: Menu, wordmark + crumb on the LEFT, links on the right (same on .yd-top pages and the nav.js bar) ---------- */
html.ydt-ys .yd-top{justify-content:flex-start!important}
html.ydt-ys .yd-top .yd-logo{margin-right:auto}
html.ydt-ys .topbar:has(>.ydn-btn){justify-content:flex-start}html.ydt-ys .topbar:has(>.ydn-btn) .yd-logo{margin-right:auto}html.ydt-ys .topbar:has(>.ydn-btn) a{text-decoration:none!important}
html.ydt-ys :is(.ydn-r,.yd-top .r) a{text-decoration:none!important}
html.ydt-ys :is(.ydn-r,.yd-top .r) a:hover{text-decoration:underline!important}

/* ---------- one title size (the Google Ads page title) ---------- */
html.ydt-ys body h1{font-size:clamp(28px,3.4vw,40px)!important;line-height:1.12!important}
html.ydt-ys .side h1,html.ydt-ys .modal h1{font-size:22px!important}

/* ---------- page caps: 1320 for data pages (each page sets its own max-width in its source; never wider than before) ---------- */

/* ---------- tables: sentence-case headers everywhere; .gt.fit = fits 1320 with no sideways scroll ---------- */
html.ydt-ys table th{text-transform:none!important;letter-spacing:normal!important}
html.ydt-ys .gt.fit th,html.ydt-ys .gt.fit td{padding:8px 7px}
html.ydt-ys .gt.fit th:first-child,html.ydt-ys .gt.fit td:first-child{padding-left:12px}
html.ydt-ys .gt.fit th:last-child,html.ydt-ys .gt.fit td:last-child{padding-right:12px}
html.ydt-ys .gt.fit th{white-space:normal;vertical-align:bottom;line-height:1.25}
html.ydt-ys .gt.fit td.wrapok .pill,html.ydt-ys .gt.fit .nw{white-space:nowrap}
html.ydt-ys .gt.fit .site{white-space:normal}
html.ydt-ys .gt.fit abbr[title]{text-decoration:none;cursor:help}
html.ydt-ys .wrapany{overflow-wrap:anywhere;word-break:break-word;white-space:normal!important}

/* ---------- Ask AI button: compact on laptop widths so it never sits on a table's last column ---------- */
@media (max-width:1536px){
  html.ydt-ys #yda-btn{right:4px!important;bottom:8px!important;padding:5px!important;gap:0!important;font-size:0!important;border-radius:10px!important;opacity:.92}
  html.ydt-ys #yda-btn .y{width:26px;height:26px;font-size:13px!important}
  html.ydt-ys #yda-btn:hover{opacity:1}
}

/* ---------- dark mode (Light/Dark switch) ---------- */
html.ydt-ys.ydt-dark :is(.gbtn,.btn,.btn-ghost,.btn-blue,.btn-generate,.btn-copy-html,.btn-new-tab,.btn-send-email,.btn-view-report,.btn-card-edit,.btn-modal-cancel,.newbtn,button.no,a.no,button.opn){background:#111A2E!important;border-color:#334155!important;color:#E2E8F0!important}
html.ydt-ys.ydt-dark :is(.gbtn,.btn,.btn-ghost,.btn-blue,.newbtn):hover{background:#1E293B!important;border-color:#F5C400!important}
html.ydt-ys.ydt-dark :is(.gbtn.gold,button.big,.btn.gold,.btn.go,.btn.yes,body.ydp-gold-btn .btn:not(.g):not(.x),.btn-primary,.btn-gold,.btn-green,.btn-save-client,.btn-modal-save){background:#F5C400!important;border-color:#F5C400!important;color:#0B1120!important}
html.ydt-ys.ydt-dark .gbtn.text{background:transparent!important;border-color:transparent!important;color:#93C5FD!important}
html.ydt-ys.ydt-dark :is(.gbtn.danger,.btn.warn,.btn.red,.btn-red,.btn-modal-delete,#rm-site){background:transparent!important;border-color:#7F1D1D!important;color:#FCA5A5!important}
html.ydt-ys.ydt-dark :is(.chip,.filter-btn,.mbtn,.rng,.tabs .tab,.range>a){background:transparent!important;border-color:#334155!important;color:#CBD5E1!important}
html.ydt-ys.ydt-dark :is(.chip.on,.filter-btn.active,.mbtn.on,.rng.on,.tabs .tab.on,.range>a.on){background:rgba(245,196,0,.16)!important;border-color:#F5C400!important;color:#FCD34D!important}
html.ydt-ys.ydt-dark .pill.p1{background:#3B1114!important;color:#FCA5A5!important}
html.ydt-ys.ydt-dark .pill.p2{background:#3A1F0B!important;color:#FDBA74!important}
html.ydt-ys.ydt-dark .pill.p3{background:#1E293B!important;color:#CBD5E1!important}
html.ydt-ys.ydt-dark .pill.pw{background:#172554!important;color:#93C5FD!important}
html.ydt-ys.ydt-dark .pill.pok{background:#052E16!important;color:#86EFAC!important}
html.ydt-ys.ydt-dark :is(.pill.pgold,.pill-queued){background:#2A2108!important;color:#FCD34D!important}

/* ---------- home page shell (index.php): the content column may shrink to the screen; wide tables scroll inside their panel, never the page ---------- */
html.ydt-ys .app{grid-template-columns:minmax(0,1fr)}
html.ydt-ys .main>:not(.sidebar){min-width:0}
html.ydt-ys .main>.sidebar{flex-shrink:0}

/* 10/29/26 phone drop-downs built by js/yd_mhdr.js never show on wider screens (the chips do) */
html.ydt-ys select.yd-chipsel{display:none}

/* ---------- phones: a wide table scrolls inside itself, never the whole page ---------- */
@media (max-width:700px){
  html.ydt-ys span.pill{white-space:normal}
  /* 10/29 table.yd-stack (opt-in): on phones each row is a card - first cell is the title, the rest read "label  value" (data-label set
     from the header by the page's script). Desktop untouched. First page: Ad Spend. */
  html.ydt-ys table.yd-stack{display:block!important;overflow:visible!important;border:0;background:none;border-radius:0}
  html.ydt-ys table.yd-stack thead{display:none}
  html.ydt-ys table.yd-stack tbody,html.ydt-ys table.yd-stack tr{display:block}
  html.ydt-ys table.yd-stack tr{background:#fff;border:1px solid var(--line,#E2E8F0);border-radius:10px;margin:0 0 10px;padding:6px 12px 8px}
  html.ydt-ys table.yd-stack td{display:flex;justify-content:space-between;align-items:baseline;gap:12px;text-align:right;padding:5px 0;border:0;border-top:1px solid var(--line,#E2E8F0);white-space:normal;max-width:none!important;min-width:0!important}
  html.ydt-ys table.yd-stack td:first-child{display:block;text-align:left;border-top:0;font-size:16px;font-weight:700;padding:4px 0 6px}
  html.ydt-ys table.yd-stack td:not(:first-child)::before{content:attr(data-label);color:#64748B;font-weight:600;font-size:12.5px;text-align:left;flex:0 0 auto}
  html.ydt-ys table.yd-stack td>div{white-space:normal!important}
  html.ydt-ys table.yd-stack td:not(:first-child)>*{text-align:right}
  html.ydt-ys table:not(.gt):not(.data-table):not(.kv):not(.lsa-kv){display:block;overflow-x:auto;max-width:100%}
  html.ydt-ys :is(.btn,button.no,a.no){min-width:0!important}
  html.ydt-ys .card:has(> .btn, > div > .btn){flex-wrap:wrap}
  /* 10/29 phone pass 2 (Brandon: "No sliding sideways on mobile"). js/yd_mhdr.js adds .yd-stack to every 3+ column table with words,
     .yd-long / .yd-empty / .yd-hid / .yd-hrow / .yd-one on cells and rows, .yd-chipsel selects for chip filter rows, .yd-wrapstrip on
     flex rows that scroll. All of it only matches here (phones). */
  html.ydt-ys table.yd-stack{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:auto!important;margin-left:0!important;margin-right:0!important}
  html.ydt-ys table.yd-stack tfoot{display:block}
  html.ydt-ys table.yd-stack tr.yd-hrow{display:none!important}
  html.ydt-ys table.yd-stack tr{width:auto!important;height:auto!important}
  html.ydt-ys table.yd-stack :is(td,tbody th){width:auto!important;height:auto!important;overflow-wrap:anywhere;word-break:normal;position:static}
  /* page table rules (.gt.fit paddings, row borders) must not leak into the cards; value pieces sit together on the right */
  html.ydt-ys table.yd-stack tr{border:1px solid var(--line,#E2E8F0)!important;border-radius:10px!important;margin:0 0 10px!important;padding:6px 12px 8px!important;background:#fff!important}
  html.ydt-ys table.yd-stack td{padding:5px 0!important;border:0!important;border-top:1px solid var(--line,#E2E8F0)!important;justify-content:flex-end;flex-wrap:wrap;column-gap:8px;row-gap:2px}
  html.ydt-ys table.yd-stack td:not(:first-child)::before{margin-right:auto;padding-right:8px}
  html.ydt-ys table.yd-stack td:first-child{padding:4px 0 6px!important;border-top:0!important}
  html.ydt-ys table.yd-stack tr.yd-one td,html.ydt-ys table.yd-stack td.yd-long{padding:6px 0!important}
  html.ydt-ys table.yd-stack tbody th{display:block;text-align:left;border:0;padding:4px 0 6px}
  html.ydt-ys table.yd-stack td.yd-long{display:block;text-align:left}
  html.ydt-ys table.yd-stack td.yd-long::before{display:block;margin:0 0 2px}
  html.ydt-ys table.yd-stack td.yd-long>*{text-align:left}
  html.ydt-ys table.yd-stack :is(td.yd-empty,.yd-hid){display:none!important}
  html.ydt-ys table.yd-stack td[data-label=""]::before{content:none}
  html.ydt-ys table.yd-stack td[data-label=""]{justify-content:flex-end}
  html.ydt-ys table.yd-stack tr.yd-one td{display:block;text-align:left;font-size:inherit;font-weight:inherit;border:0}
  html.ydt-ys table.yd-stack td :is(pre,code){white-space:pre-wrap!important}
  html.ydt-ys table.yd-stack td :is(img,video,canvas,svg){max-width:100%}
  html.ydt-ys table.yd-stack td :is(div,span,a){max-width:100%;min-width:0!important}
  html.ydt-ys table.yd-stack td :is(input:not([type=checkbox]):not([type=radio]),select,textarea){max-width:100%}
  html.ydt-ys table.yd-stack td :is(.nw,[style*="nowrap"]){white-space:normal!important}
  html.ydt-ys table.yd-stack td>:is(button,.btn,.gbtn,a.btn){white-space:nowrap}
  html.ydt-ys table.yd-stack td:has(> :is(button,.btn,.gbtn) + :is(button,.btn,.gbtn)){flex-wrap:wrap;justify-content:flex-end}
  html.ydt-ys.ydt-dark table.yd-stack tr{background:#111A2E!important;border-color:#334155!important}
  html.ydt-ys.ydt-dark table.yd-stack td{border-top-color:#1E293B!important}
  html.ydt-ys table.yd-stack tr.yd-one td:first-child{border-top:0!important}
  html.ydt-ys table.yd-stack td.yd-long{display:block}
  /* chip filter rows -> one drop-down (chips stay on desktop) */
  html.ydt-ys .yd-chiprow{display:flex!important;flex-wrap:wrap!important;align-items:center;gap:8px;overflow:visible!important}
  html.ydt-ys .yd-chiprow>.yd-selitem{display:none!important}
  html.ydt-ys .yd-chiprow{border-bottom:0!important;padding-top:8px;padding-bottom:8px}
  html.ydt-ys .yd-tilegrid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(140px,1fr))!important;gap:8px!important;overflow:visible!important}
  html.ydt-ys .yd-tilegrid>*{min-width:0!important;width:auto!important;margin:0!important}
  html.ydt-ys .yd-chiprow>:is(.lbl,label){flex:0 0 auto;min-width:76px;margin:0!important}
  html.ydt-ys select.yd-chipsel{display:block;flex:1 1 160px;min-width:0;max-width:100%;font:inherit;font-size:16px!important;padding:8px 10px;border:1px solid #CBD5E1;border-radius:8px;background:#fff;color:#0F172A}
  html.ydt-ys.ydt-dark select.yd-chipsel{background:#111A2E;color:#E2E8F0;border-color:#334155}
  /* rows that used to slide sideways (tab bars, KPI bands, chip strips without a single choice) wrap instead */
  html.ydt-ys .yd-wrapstrip{flex-wrap:wrap!important;overflow-x:visible!important;row-gap:6px!important}
  html.ydt-ys .yd-wrapstrip>*{flex-shrink:1!important;min-width:0;max-width:100%}
  /* general: long words / URLs / emails wrap, media and form fields never wider than the screen */
  html.ydt-ys :is(p,li,dd,td,th,h1,h2,h3,h4,.sub,.muted,.note,.card,.panel){overflow-wrap:anywhere}
  html.ydt-ys :is(.lbl,label){overflow-wrap:normal}
  html.ydt-ys table.yd-wraptable{display:table!important;width:100%!important;max-width:100%!important;min-width:0!important;table-layout:auto}
  html.ydt-ys table.yd-wraptable :is(td,th){white-space:normal!important;overflow-wrap:anywhere;min-width:0!important;max-width:none!important}
  html.ydt-ys table.yd-wraptable :is(td,th) *{white-space:normal!important;max-width:100%}
  html.ydt-ys pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}
  html.ydt-ys :is(img,video,iframe,canvas){max-width:100%}
  html.ydt-ys :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){max-width:100%}
  /* account pages (Google Ads, Search Console site): the theme makes .side a relative "island" while the page gives it top:52px for sticky,
     so on phones it slid 52px down over the account name */
  html.ydt-ys .side.ydt-island{top:0!important}
  /* one-offs found by the 390 audit: Zoho schedule row (inline nowrap), report preview button bar */
  html.ydt-ys #schedopts{white-space:normal!important;display:inline-flex!important;flex-wrap:wrap;gap:6px;align-items:center}
  html.ydt-ys :is(.preview-topbar,.preview-actions){flex-wrap:wrap!important;gap:6px}
  html.ydt-ys .yd-nowrapfix{white-space:normal!important}
  /* legends ("Effort: S ... M ... L ...") - each badge stays with its words, one pair per line if needed */
  html.ydt-ys .yd-legend{display:flex;flex-wrap:wrap;align-items:center;column-gap:14px;row-gap:4px}
  html.ydt-ys .yd-lgp{white-space:nowrap}
  /* the floating Ask AI "Y" button must never sit on the last row: 80px of room under every page */
  html.ydt-ys body::after{content:"";display:block;height:80px}

}
