/* The solar business type's palette, light mode only.

   Linked on every page straight after the core's brand.css (see
   Vertical.theme_stylesheet), so the values here replace the core's and
   everything linked after reads them. This file sets colour VARIABLES and
   nothing else - no component rules - so every component keeps its shape
   and its dark-mode behaviour, and a dental install, which never links
   this file, is untouched.

   The idea: dental is a cool blue-teal; solar is the sun - a deep amber
   sweeping into a burnt orange across the top bar, amber buttons and
   links, and warm pale tints where dental has pale blues. It sits with
   the amber already on solar's printed documents. Green is left alone on
   purpose: the app already uses it for Salva and for everything that is
   done, paid or working, and a green palette would have drowned that.

   Contrast, all against white: links #A14A07 6.0:1; buttons, panel
   headings and the top bar's lightest end #B45309 5.0:1 (dental's teal
   there is 5.0:1 too).

   Dark mode is not set here and stays the core's own. The blocks are
   written twice, as brand.css's are: once for the in-app switch set to
   light, once for "automatic" on a computer set to light. A rule for
   "not dark" alone would also catch an automatic page on a dark computer.

   Status colours (appointments, CRM stages, operators, the Impianti
   badges) are not palette: they say what state something is in, and stay
   as they are in every business type.

   Not everything here is amber (2.6.0, the owner's choices): the
   Dashboard's day is a very light grey-blue, its follow-ups a pale cream
   and its pipeline's four figures sit in pale grey-green boxes on a white
   panel; the menu's names are a dark grey, with its "Aggiungi" words in
   green beside the green +; the action pills ("Aggiungi ... +", Nuova
   trattativa, Nuovo appuntamento, Modifica dati) are solid grey with
   white words (2.6.1) and stay grey under the pointer, a shade darker,
   with their words and outline in a light amber that reads on grey, and
   the whole pill amber while pressed; the agenda's arrows and "Oggi" are
   green; "+ Nuova" on a Dashboard panel is a green outlined pill, inside
   the panel's edge; the menu's page being viewed and its show/hide strip
   are light grey, light amber while pressed; the Dashboard's "Appuntamento" buttons and foot links
   are grey;
   and the client page's panels have light grey title bars with a grey
   outline. */

html[data-theme="light"] {
  --primary: #C47A2C;
  --secondary: #B45309;
  --primary-fg: #ffffff;

  --header-bg: #B45309;
  --header-image: linear-gradient(to right, #3D1C06 0%, #7A3A0A 38%, #B45309 72%);
  --breadcrumbs-bg: #6E3406;
  --breadcrumbs-image: linear-gradient(to right, #251104 0%, #4A2207 38%, #6E3406 72%);
  --breadcrumbs-fg: #F6DCB8;

  --link-fg: #A14A07;
  --link-hover-color: #6F330A;
  --link-selected-fg: #92400E;
  --selected-row: #FFF3DC;

  --button-bg: #B45309;
  --button-hover-bg: #92400E;
  --default-button-bg: #92400E;
  --default-button-hover-bg: #B45309;
  --object-tools-bg: #B45309;
  --object-tools-hover-bg: #92400E;

  --md-accent: #B45309;
  --md-accent-strong: #92400E;
  --md-accent-soft: rgba(180, 83, 9, 0.12);
  --md-focus-ring: rgba(180, 83, 9, 0.30);

  --bm-tint-bg: #FBEEDD;
  --bm-tint-border: #F1D2A9;
  --bm-tint-fg: #6F330A;
  --bm-tint-hover: #E2E5E9;
  --bm-toggle-bg: #F1F2F4;
  --bm-today-bg: #F6F7F8;
  --bm-recent-bg: #FFFDF7;
  --bm-today-column: rgba(180, 83, 9, 0.05);
  --bm-pick-bg: #B45309;
  --bm-history-bg: #4A3B30;
  --bm-history-hover-bg: #33281F;
  --bm-chart-incasso: #D97706;
  --bm-sidebar-link-fg: #3F3F46;
  --bm-panel-head-bg: #ECEDEF;
  --bm-panel-head-fg: #1F2328;
  --bm-panel-head-border: #C9CCD1;
  --bm-panel-bg: #F7F7F8;
  --bm-followups-bg: #FFFDEF;
  --bm-pipeline-bg: #FFFFFF;
  --bm-stat-bg: #F2F7F3;
  --bm-addlink-fg: #3A7D22;
  --bm-foot-link-fg: #4B5563;
  --bm-dash-btn-fg: #4B5563;
  --bm-dash-btn-border: #9CA3AF;
  --bm-dash-btn-hover-bg: #E5E7EB;
  --bm-dash-btn-hover-fg: #1F2937;
  --bm-action-bg: #6B7280;
  --bm-action-fg: #FFFFFF;
  --bm-action-border: #6B7280;
  --bm-action-hover-bg: #4B5563;
  --bm-action-hover-fg: #FDBA74;
  --bm-action-hover-border: #FDBA74;
  --bm-action-active-bg: #B45309;
  --bm-action-active-fg: #FFFFFF;
  --bm-nav-bg: #2F855A;
  --bm-nav-fg: #FFFFFF;
  --bm-nav-hover-bg: #276749;
  --bm-nav-active-bg: #22543D;
  --bm-sidebar-current-bg: #EBEDF0;
  --bm-sidebar-press: #F5D6B1;
  --bm-head-add-fg: #2F855A;
  --bm-head-add-bg: #FFFFFF;
  --bm-head-add-border: #2F855A;
  --bm-head-add-hover-bg: #2F855A;
  --bm-head-add-hover-fg: #FFFFFF;
  --bm-head-add-hover-line: none;
  --bm-head-add-pull: 0px;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) {
    --primary: #C47A2C;
    --secondary: #B45309;
    --primary-fg: #ffffff;

    --header-bg: #B45309;
    --header-image: linear-gradient(to right, #3D1C06 0%, #7A3A0A 38%, #B45309 72%);
    --breadcrumbs-bg: #6E3406;
    --breadcrumbs-image: linear-gradient(to right, #251104 0%, #4A2207 38%, #6E3406 72%);
    --breadcrumbs-fg: #F6DCB8;

    --link-fg: #A14A07;
    --link-hover-color: #6F330A;
    --link-selected-fg: #92400E;
    --selected-row: #FFF3DC;

    --button-bg: #B45309;
    --button-hover-bg: #92400E;
    --default-button-bg: #92400E;
    --default-button-hover-bg: #B45309;
    --object-tools-bg: #B45309;
    --object-tools-hover-bg: #92400E;

    --md-accent: #B45309;
    --md-accent-strong: #92400E;
    --md-accent-soft: rgba(180, 83, 9, 0.12);
    --md-focus-ring: rgba(180, 83, 9, 0.30);

    --bm-tint-bg: #FBEEDD;
    --bm-tint-border: #F1D2A9;
    --bm-tint-fg: #6F330A;
    --bm-tint-hover: #E2E5E9;
    --bm-toggle-bg: #F1F2F4;
    --bm-today-bg: #F6F7F8;
    --bm-recent-bg: #FFFDF7;
    --bm-today-column: rgba(180, 83, 9, 0.05);
    --bm-pick-bg: #B45309;
    --bm-history-bg: #4A3B30;
    --bm-history-hover-bg: #33281F;
    --bm-chart-incasso: #D97706;
    --bm-sidebar-link-fg: #3F3F46;
    --bm-panel-head-bg: #ECEDEF;
    --bm-panel-head-fg: #1F2328;
    --bm-panel-head-border: #C9CCD1;
    --bm-panel-bg: #F7F7F8;
    --bm-followups-bg: #FFFDEF;
    --bm-pipeline-bg: #FFFFFF;
    --bm-stat-bg: #F2F7F3;
    --bm-addlink-fg: #3A7D22;
    --bm-foot-link-fg: #4B5563;
    --bm-dash-btn-fg: #4B5563;
    --bm-dash-btn-border: #9CA3AF;
    --bm-dash-btn-hover-bg: #E5E7EB;
    --bm-dash-btn-hover-fg: #1F2937;
    --bm-action-bg: #6B7280;
    --bm-action-fg: #FFFFFF;
    --bm-action-border: #6B7280;
    --bm-action-hover-bg: #4B5563;
    --bm-action-hover-fg: #FDBA74;
    --bm-action-hover-border: #FDBA74;
    --bm-action-active-bg: #B45309;
    --bm-action-active-fg: #FFFFFF;
    --bm-nav-bg: #2F855A;
    --bm-nav-fg: #FFFFFF;
    --bm-nav-hover-bg: #276749;
    --bm-nav-active-bg: #22543D;
    --bm-sidebar-current-bg: #EBEDF0;
    --bm-sidebar-press: #F5D6B1;
    --bm-head-add-fg: #2F855A;
    --bm-head-add-bg: #FFFFFF;
    --bm-head-add-border: #2F855A;
    --bm-head-add-hover-bg: #2F855A;
    --bm-head-add-hover-fg: #FFFFFF;
    --bm-head-add-hover-line: none;
    --bm-head-add-pull: 0px;
  }
}

/* On a phone the top bar is one flat colour, the deep end of the sweep -
   the same reasoning, and the same 767px, as brand.css's phone block.
   After the blocks above so it wins on a phone. */
@media (max-width: 767px) {
  html[data-theme="light"] {
    --header-image: none;
    --breadcrumbs-image: none;
    --header-bg: #3D1C06;
    --breadcrumbs-bg: #251104;
  }
}

@media (max-width: 767px) and (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) {
    --header-image: none;
    --breadcrumbs-image: none;
    --header-bg: #3D1C06;
    --breadcrumbs-bg: #251104;
  }
}
