/* ao.theme-legacy-brand.css
   The "Standard" theme: the legacy theme with the new AgencyOffice brand (Chris, 4 Nov 2026).
   Users see it labelled Standard; the stored value and data-theme stay "legacy".
   Colours are deliberately muted (slate navy, burnt orange) so it sits close to the old
   dark teal look rather than the brighter Light theme.
   Same layout, density and dark header/bar structure as legacy - only the brand changes:
   new logo, brand navy instead of black/teal, brand orange for actions, brand blue links.
   Prepares legacy users (85% of staff) for the new look before the layout changes.

   Served INSTEAD of ao.theme-legacy.css when the client has Portal_Settings
   LegacyThemeRebrand = 1 (see AgencyOffice.Master.vb ThemeStylesheet). It imports the
   legacy theme first, so everything not restyled here stays exactly as legacy.
   html still carries data-theme="legacy". Colours live in the tokens below only. */

@import url("ao.theme-legacy.css");

:root[data-theme="legacy"],
html[data-theme="legacy"] {
  /* Brand */
  --lb-navy-deep: #1b2633;
  --lb-navy: #2b3f58;
  --lb-blue: #3a5876;
  --lb-sky: #6d93b3;
  --lb-orange: #c4733a;
  --lb-orange-hover: #ad6330;
  --lb-magenta: #b8447c;
  --lb-bar: #36475b;
  --lb-link: #2f5b85;
  --lb-link-hover: #23476a;

  /* Legacy palette re-pointed at the brand (token-aware rules follow automatically) */
  --legacy-teal: var(--lb-blue);
  --legacy-teal-hover: var(--lb-navy);
  --legacy-deep: var(--lb-navy-deep);
  --legacy-blue: var(--lb-link);

  --color-link: var(--lb-link);
  --color-link-hover: var(--lb-link-hover);
  --focus-ring: rgba(58, 88, 118, 0.35);

  --color-primary: var(--lb-orange);
  --color-primary-hover: var(--lb-orange-hover);
  --color-accent: var(--lb-navy);

  --shell-bg: var(--lb-navy-deep);
}

/* ---------- Header: navy instead of black/teal ---------- */
html[data-theme="legacy"] #header,
html[data-theme="legacy"] #QSSuggestionsDiv,
html[data-theme="legacy"] #loginarea {
  background: linear-gradient(45deg, var(--lb-navy-deep) 30%, var(--lb-navy) 100%) !important;
}

html[data-theme="legacy"] #nav-container,
html[data-theme="legacy"] #navigation,
html[data-theme="legacy"] #helpstrip {
  background: var(--lb-blue) !important;
  background-color: var(--lb-blue) !important;
}

html[data-theme="legacy"] .blue_link {
  border-left-color: var(--lb-orange) !important;
}

/* ---------- New logo instead of the old teal image ---------- */
html[data-theme="legacy"] .legacy-logo-link {
  display: none !important;
}

html[data-theme="legacy"] .ao-logo-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #fff !important;
  text-decoration: none !important;
}

html[data-theme="legacy"] .ao-logo-mark {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 0;
}

html[data-theme="legacy"] .ao-logo-text {
  display: inline-flex !important;
  align-items: baseline !important;
  font-weight: 700;
  font-size: 22px;
  line-height: 1 !important;
  white-space: nowrap;
}

html[data-theme="legacy"] #header .ao-logo-agency,
html[data-theme="legacy"] #loginarea .ao-logo-agency { color: #fff; }
html[data-theme="legacy"] #header .ao-logo-office,
html[data-theme="legacy"] #loginarea .ao-logo-office { color: #a9c3d9; }
html[data-theme="legacy"] #header .ao-logo-crm,
html[data-theme="legacy"] #loginarea .ao-logo-crm {
  font-weight: 500;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Search ---------- */
html[data-theme="legacy"] .header-search button:nth-of-type(1),
html[data-theme="legacy"] .header-search button:nth-of-type(2),
html[data-theme="legacy"] .header-search .searchbtn,
html[data-theme="legacy"] #BtnSearchQS,
html[data-theme="legacy"] #BtnShowSearchOptions {
  background-color: var(--lb-orange) !important;
  border-color: var(--lb-orange) !important;
}

html[data-theme="legacy"] .header-search button:hover,
html[data-theme="legacy"] #BtnSearchQS:hover {
  background-color: var(--lb-orange-hover) !important;
}

/* ---------- Buttons: brand orange ---------- */
html[data-theme="legacy"] .Button,
html[data-theme="legacy"] .button,
html[data-theme="legacy"] input.Button,
html[data-theme="legacy"] button.Button,
html[data-theme="legacy"] .CriticalButton,
html[data-theme="legacy"] .ActionButton,
html[data-theme="legacy"] .hd-menu-btn-primary,
html[data-theme="legacy"] #ideaSubmitBtn,
html[data-theme="legacy"] #wrap_clickme,
html[data-theme="legacy"] .ai-btn-accept,
html[data-theme="legacy"] .ai-button,
html[data-theme="legacy"] .location_search_close {
  background-color: var(--lb-orange) !important;
  border-color: var(--lb-orange) !important;
  color: #fff !important;
}

html[data-theme="legacy"] .Button:hover,
html[data-theme="legacy"] .button:hover,
html[data-theme="legacy"] .CriticalButton:hover,
html[data-theme="legacy"] .ActionButton:hover,
html[data-theme="legacy"] .ai-btn-accept:hover,
html[data-theme="legacy"] .ai-button:hover {
  background-color: var(--lb-orange-hover) !important;
  border-color: var(--lb-orange-hover) !important;
}

/* ---------- Section bars: brand navy-slate instead of charcoal ---------- */
html[data-theme="legacy"] .BlueDisplayHeader,
html[data-theme="legacy"] .task_block h1,
html[data-theme="legacy"] tr.BlueDisplayHeader,
html[data-theme="legacy"] td.BlueDisplayHeader,
html[data-theme="legacy"] #right_content h1,
html[data-theme="legacy"] .rpheading,
html[data-theme="legacy"] .hide_feed,
html[data-theme="legacy"] .header-search .selector,
html[data-theme="legacy"] .ai-btn-generate {
  background: var(--lb-bar) !important;
  background-color: var(--lb-bar) !important;
}

/* ---------- Headings, links and labels ---------- */
html[data-theme="legacy"] h1,
html[data-theme="legacy"] .popsubmenu h1,
html[data-theme="legacy"] .search_field h1,
html[data-theme="legacy"] .ai-modal-header h2 {
  color: var(--lb-navy) !important;
}

html[data-theme="legacy"] .BlueDisplayHeader h1,
html[data-theme="legacy"] h1.BlueDisplayHeader,
html[data-theme="legacy"] .task_block h1,
html[data-theme="legacy"] #right_content h1,
html[data-theme="legacy"] h1.rpheading {
  color: #fff !important;
}

html[data-theme="legacy"] a,
html[data-theme="legacy"] .link,
html[data-theme="legacy"] .link:hover,
html[data-theme="legacy"] #right_content a,
html[data-theme="legacy"] .related_info tr td:nth-of-type(1),
html[data-theme="legacy"] .SearchResultsHeader,
html[data-theme="legacy"] .DatagridBlueHeaderSmall,
html[data-theme="legacy"] .tablesorter th.header,
html[data-theme="legacy"] #PropertyDocuments th,
html[data-theme="legacy"] .pagination,
html[data-theme="legacy"] .PagingButton,
html[data-theme="legacy"] .PagingSelectedButton {
  color: var(--lb-link);
}

html[data-theme="legacy"] a:hover {
  color: var(--lb-link-hover);
}

html[data-theme="legacy"] #header a,
html[data-theme="legacy"] #navigation a,
html[data-theme="legacy"] a.Button,
html[data-theme="legacy"] .BlueDisplayHeader a {
  color: #fff;
}

html[data-theme="legacy"] #loginarea a {
  color: #a9c3d9;
}

/* ---------- Focus and small accents ---------- */
html[data-theme="legacy"] input:focus,
html[data-theme="legacy"] select:focus,
html[data-theme="legacy"] textarea:focus,
html[data-theme="legacy"] .sch-input:focus,
html[data-theme="legacy"] .ai-input-group textarea:focus {
  border-color: var(--lb-blue) !important;
  box-shadow: 0 0 0 3px var(--focus-ring) !important;
}

html[data-theme="legacy"] .CriteriaBar {
  border-color: var(--lb-blue);
}

html[data-theme="legacy"] .ao-spinner {
  border-top-color: var(--lb-orange);
}
