/* cnybees.buzz under a house theme (the Theme button at the lower right, in the footer).
   Everything is scoped to html[data-house-theme]: with no theme chosen the page keeps its own amber look.
   Theme variables are described on the wiki page "Themes for house-wide apps".
   The page is laid out like a Windows desktop: the page itself is the desktop (application workspace), the camera
   list and the viewer are windows on it, and the viewer's heading is the active window's title bar.

   Page part                           Theme colour
   ----------------------------------  ----------------------------------------------------------------
   page background, text on it         desktop --t-card-bg, --t-desk-text
   the page's own variables            --panel --w-face, --panel2 --w-light, --border --w-shadow,
                                       --accent --w-accent, --accent2 --t-tabline, --text --w-text,
                                       --muted --w-dim, --font --ft, --bg (text on lit buttons) --t-on-text
   site title                          title bar --t-title / --t-title-text, title font --ft
   camera list and viewer              windows: --w-face with the window frame --t-win-shadow
   viewer heading                      active title bar --t-title / --t-title-text
   buttons (music, tiles, lights,      buttons --t-btn-bg / --t-btn-text with --t-btn-shadow;
   Send, weather hours)                lit or chosen: --t-on-bg / --t-on-text
   camera picker, note box             fields --w-field / --w-ftext
   video                               the screen --hm-bg (black in most themes)
   space themes                        a moving background behind the page (house-themes.js), shown on
                                       the desktop around the windows
*/
html[data-house-theme] {
  background: var(--t-card-bg);
  --bg: var(--t-on-text);
  --panel: var(--w-face);
  --panel2: var(--w-light);
  --border: var(--w-shadow);
  --accent: var(--w-accent);
  --accent2: var(--t-tabline);
  --text: var(--w-text);
  --muted: var(--w-dim);
  --font: var(--ft);
}
/* the desktop (a space theme's moving background takes its place: house-themes.css makes the body transparent) */
html[data-house-theme] body { background: var(--t-card-bg); color: var(--t-desk-text); }
html[data-house-theme] #site-title { font-family: var(--ft); background: var(--t-title); color: var(--t-title-text); text-shadow: var(--t-title-glow);
  padding: 0.15em 0.6em; border: var(--t-title-border); border-radius: var(--t-win-radius) var(--t-win-radius) 0 0; }
html[data-house-theme] header .logo { background: var(--t-dot); box-shadow: 0 0 8px var(--t-dot); border-radius: 0; }

/* windows on the desktop */
html[data-house-theme] :is(.sidebar, .viewer) { background: var(--w-face); color: var(--w-text); box-shadow: var(--t-win-shadow); border-color: transparent; border-radius: var(--t-win-radius); }
html[data-house-theme] .viewer-head { background: var(--t-title); color: var(--t-title-text); text-shadow: var(--t-title-glow); }
html[data-house-theme] .viewer-head .dot { background: var(--t-dot); }
html[data-house-theme] .viewer-head .status, html[data-house-theme] .viewer-head .status.ok { color: var(--t-title-text); }
html[data-house-theme] .chan { border-radius: var(--t-btn-radius); box-shadow: var(--t-btn-shadow); border-color: transparent; color: var(--w-text); }
html[data-house-theme] .chan.active { box-shadow: var(--t-on-shadow), 0 0 0 2px var(--t-tabline); }
html[data-house-theme] :is(.frame, video, .chan .thumb-wrap) { background: var(--hm-bg); }

/* buttons */
html[data-house-theme] :is(header .music, header .viewers, header .yt, header .np, .wx-cell, .note-box button, .tile-btn, .light-btn) {
  background: var(--t-btn-bg); color: var(--t-btn-text); border: var(--t-btn-border); border-radius: var(--t-btn-radius); box-shadow: var(--t-btn-shadow); }
html[data-house-theme] :is(header .music.on, .wx-cell.now, .tile-btn.on, .light-btn.on, .light-btn.locked) {
  background: var(--t-on-bg); color: var(--t-on-text); box-shadow: var(--t-on-shadow); }
html[data-house-theme] header .yt.on { color: var(--t-err); box-shadow: var(--t-btn-shadow), inset 0 0 0 1px var(--t-err); }
html[data-house-theme] :is(.tile-btn, .light-btn):hover { color: var(--t-btn-text); filter: brightness(1.1); }

/* fields */
html[data-house-theme] :is(.picker select, .mobile-picker select, .note-box textarea) {
  background: var(--w-field); color: var(--w-ftext); border: var(--t-field-border); box-shadow: var(--t-field-shadow); border-radius: var(--t-btn-radius); }

/* the footer is on the desktop; it keeps the Theme button at its right end */
html[data-house-theme] .site-footer { border-top-color: var(--t-desk-text); color: var(--t-desk-text); }
html[data-house-theme] .site-footer a { color: var(--t-desk-text); }
html[data-house-theme] .note-msg { color: var(--t-desk-text); }
.site-footer .footer-text { margin-left: auto; }
.site-footer .htp-open { align-self: flex-end; }

/* Windows XP themes (cnybees.buzz only): the site title as the green Start button. Green gradient, rounded right
   end, lit top edge, white slanted text with a drop shadow; no Windows logo (a trademark). */
html[data-house-theme^="xp"] #site-title {
  background: linear-gradient(180deg, #5fc75f 0%, #3fae3f 8%, #2f9a2f 45%, #2b8c2b 80%, #237a23 100%);
  color: #fff; font-style: italic; font-synthesis: style; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.65);
  border: 0; border-radius: 0 16px 16px 0; padding: 0.25em 1.3em 0.25em 0.8em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset -2px -2px 3px rgba(0, 0, 0, 0.25), 2px 1px 4px rgba(0, 0, 0, 0.45);
}
html[data-house-theme^="xp"] #site-title:hover { filter: brightness(1.08); }
