/* ============================================================
   LIGHT MODE (DEFAULT + MANUAL OVERRIDE)
   ============================================================ */

:root {
  --bg: #f3f4f7;
  --text: #333;
  --text-light: #444;
  --text-dim: #666;
  --section-bg: #fff;
  --chip-bg: #fff;
  --border: rgba(0, 0, 0, 0.1);
  --box-shadow: rgba(0, 0, 0, 0.2);
  --header-bg: #334;
  --header-text: #fff;
  --btn-bg: #445;
  --btn-bg-hover: #556;
  --btn-text: #fff;
  --file-hover: #f0f0f0;
  --file-label-bg: #f5f5f5;
  --file-label-border: #ccc;
  --separator-color: #888;
  --error-border-color: #e57373;
  --error-color: #c53030;
  --error-bg-color: rgba(229, 83, 83, 0.1);
  --accent: #0066ff;
  --move-active-bg: rgba(59, 130, 246, 0.15);
  --move-active-outline: rgba(59, 130, 246, 0.5);
  --action-btn-hover: rgba(0, 0, 0, 0.06);
  --badge-error-bg: #ffd9d9;
  --badge-error-color: #a00000;
  --badge-warning-bg: #fff2c6;
  --badge-warning-color: #876600;
  --badge-ok-bg: #d8ffd8;
  --badge-ok-color: #006611;
  --toast-bg: #333;
  --toast-color: #fff;
  --breadcrumb-sep: #aaa;
}

/* ============================================================
   BASE STYLING (NOW USING THEME VARIABLES)
   ============================================================ */

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition:
    background 0.25s,
    color 0.25s;
}

body.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

html {
  scroll-padding-top: 80px;
}

header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 0.75rem 1.5rem;
  font-size: 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  z-index: 1000;
}

div.header {
  float: left;
  display: flex;
  justify-content: space-between;
}

/* Dark Mode Toggle Button and header buttons*/
.themeButton {
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background: var(--btn-bg);
  color: var(--header-text);
  border: 1px solid var(--border);
  user-select: none;
  transition: background 0.2s;
}
.themeButton:hover {
  background: var(--btn-bg-hover);
}

.container {
  margin: auto;
  padding: 2rem;
}

.section {
  background: var(--section-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 3px 8px var(--border);
  transition:
    background 0.25s,
    box-shadow 0.25s;
}

h2 {
  margin-top: 0;
}

.row {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.col {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
}

input,
select {
  padding: 0.5rem;
  font-size: 1rem;
  background: var(--chip-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
}

label {
  font-weight: bold;
  margin-bottom: 0.3rem;
  background: var(--chip-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn {
  padding: 0.6rem 1.1rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 0.5rem;
  transition: background 200ms ease, transform 100ms ease, box-shadow 200ms ease;
}
.btn:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.btn:active {
  transform: translateY(0);
}

.toggle-btn.active {
  background: var(--btn-bg);
  box-shadow: inset 0 0 0 2px var(--border);
}

/* --- Concepts Panel --- */
.concepts {
  position: absolute;
  top: 60px;
  left: 16px;
  right: 16px;
  max-width: 600px;
  padding: 1rem;
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--box-shadow);
  z-index: 900;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.hidden {
  display: none;
}
