/* --------------------------------------------------
   LOCAL FONTS
-------------------------------------------------- */
@font-face {
  font-family: Inter;
  src: url("/assets/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* --------------------------------------------------
   GLOBAL THEME VARIABLES
-------------------------------------------------- */
:root[data-theme="light"] {
  --back: #f7f7f7;
  --panel: #ffffff;
  --button: #f0f0f0;
  --text: #222222;
  --line: #9c9c9c;
  --highlight1: #4aa3ff;
  --highlight2: #ffd84a;
  --logo-bg: #e0e0e0;
  --logo-fg: #222;
  --logo-shadow: 0 2px 4px rgb(0 0 0 0.15);
}

:root[data-theme="dark"] {
  --back: #111111;
  --panel: #1b1b1b;
  --button: #4a4a4a;
  --text: #eeeeee;
  --line: #848484;
  --highlight1: #4aa3ff;
  --highlight2: #ffd84a;
  --logo-bg: #333;
  --logo-fg: #eee;
  --logo-shadow: 0 2px 4px rgb(0 0 0 0.4);
}

/* --------------------------------------------------
   GLOBAL BODY
-------------------------------------------------- */
html {
  margin: 0;
  padding: 0;
  height:100%;
  width:100%;
}

body { 
  background: var(--back);
  margin: 0;
  padding: 0; 
  height: 100%;
  width: 100%;
}

html, body, button, input, select, textarea {
    font-family: Inter, sans-serif;
    font-size: var(--std-font-size);
    color: var(--text);
}

button {
  background: var(--button);
}
/* --------------------------------------------------
   CAMERA GEOMETRY — JS-SIZED, CSS-LAID-OUT
   Matches layout.ts:
     CAM-PORTRAIT
     CAM-LANDSCAPE-A
     CAM-LANDSCAPE-B
-------------------------------------------------- */

#b-camera {
  position: absolute;
  inset: 0;
  margin: auto;
  container-type: size;
  overflow: hidden;
  background: var(--back);
}

/* --------------------------------------------------
   CAMERA INTERNAL AREAS
-------------------------------------------------- */

#b-camera-style {
  display: grid;
  height: 100%;
  width: 100%;
  grid-template-areas:
    "header"
    "client"
    "footer";
}

#b-top-bar {
  grid-area: header;
  overflow: hidden;
  container-type: size;
  width: 100%;
}

#b-client-area {
  grid-area: client;
}

#b-bottom-bar {
  grid-area: footer;
  overflow: hidden;
}

/* --------------------------------------------------
   PORTRAIT MODE
   JS sets width/height; CSS sets layout only
-------------------------------------------------- */

.CAM-PORTRAIT#b-camera-style {
  grid-template-rows: 20% auto 5%
}

/* --------------------------------------------------
   LANDSCAPE-A MODE
   JS sets width/height; CSS sets layout only
-------------------------------------------------- */

.CAM-LANDSCAPE-A#b-camera-style {
  grid-template-rows: 15% 80% 5%;
}

/* --------------------------------------------------
   LANDSCAPE-B MODE
   JS sets width/height; CSS sets layout only
-------------------------------------------------- */

.CAM-LANDSCAPE-B#b-camera-style {
  grid-template-rows: 15% 80% 5%;
}

/* --------------------------------------------------
   HEADER LAYOUT
-------------------------------------------------- */
/* stylelint-disable declaration-block-no-redundant-longhand-properties, declaration-block-no-shorthand-property-overrides */

#b-top-bar {
  display: grid;
  grid-template-columns: 10% 80% 10%;
  grid-template-areas: "hleft hlogo hright";
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.PORTRAIT #b-top-bar {
  grid-template-columns: 20% 60% 20%;
}

.logo {
  grid-area: hlogo;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.logo-box {
  height: 100%;
  width: 100%;             /* <-- key change */
  max-width: 100%;         /* safety */
  container-type: size;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.logo-group {
  display: flex;
}

.logo-tile {
  margin: 1.5cqh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  background: var(--button);
  color: var(--text);
  box-shadow: var(--logo-shadow);
}

.LANDSCAPE .logo-tile {
  width: 60cqh;
  height: 60cqh;
  font-size: 55cqh;
  border-radius: 5cqh;
  border: 6cqh solid var(--line);
}

.PORTRAIT .logo-tile {
  width: 10vw;
  height: 10vw;
  font-size: 35cqh;
  border-radius: 4cqh;
  border: 5cqh solid var(--line);
}

.logo-tile.avail {
  border-color: var(--highlight1);
}

/* --------------------------------------------------
   THEME TOGGLER (right aligned)
-------------------------------------------------- */
.header-left {
  grid-area: hleft;
}

.header-right {
  grid-area: hright;
  display: grid;
  place-items: center;
}

.theme-toggle {
  display: block;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: max-content;
  background: none;
  border: none;
}

/* grouped theme options */
.theme-option {
  display: flex;
  align-items: center;
  gap: 0.5vh;
}

.theme-icon {
  width: 2.5vh;
  height: 2.5vh;
}

.theme-text {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

/* colors */
.theme-light-option .theme-icon,
.theme-light-option .theme-text {
  color: rgb(106 108 9);
}

.theme-dark-option .theme-icon,
.theme-dark-option .theme-text {
  color: rgb(110 105 138);
}

/* theme switching */
[data-theme="light"] .theme-dark-option {
  display: none;
}

[data-theme="dark"] .theme-light-option {
  display: none;
}

/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */

.app-footer {
  text-align: center;
}

