/* =====================================================
   JHACAL CORE DESIGN SYSTEM v1.0 - PATH-LITE VARIANT
   "Just Having A Crack At Life"

   Shared design tokens loaded from jhacal-design-tokens.css
   PATH-LITE SPECIFIC: Additional variables below
   ===================================================== */

/* ===== COLORBLIND-SAFE PATTERNS ===== */
/* Use icons + text, not just color, for critical info */
.status-success::before { content: "✓ "; }
.status-warning::before { content: "⚠ "; }
.status-error::before { content: "✗ "; }
.status-info::before { content: "ℹ "; }

/* ===== BASE STYLES ===== */
html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font-family);
  background: var(--bg-1);
  color: var(--text-1);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  :root {
    --content-width: 960px;
  }
}

@media (max-width: 768px) {
  :root {
    --content-width: 100%;
    --tile-font-size: 0.95rem;
    --tile-font-size-sm: 0.85rem;
  }
}

/* =====================================================
   PATH-LITE SHARED COMPONENTS
   Reusable modal, settings, and form styles
   ===================================================== */

/* ===== PATH-LITE SPECIFIC VARIABLES ===== */
/* Note: --gold, --gold-light, and --gold-glow are app-specific variants */
/* Consider using --jhacal-gold-dark, --jhacal-gold-light from shared tokens */

/* ===== MODAL SYSTEM ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal-content {
  background: rgba(31, 35, 40, 0.98);
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255, 152, 0, 0.3);
}
.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255, 152, 0, 0.4);
  background: transparent;
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover {
  background: rgba(255, 152, 0, 0.2);
  border-color: var(--gold);
}
.modal-close:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.tab {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 152, 0, 0.4);
  background: var(--bg-3);
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}
.tab:hover {
  background: rgba(255, 152, 0, 0.1);
  color: var(--gold);
}
.tab.active {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}
.tab:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

/* ===== PANELS ===== */
.panel { display: none; color: var(--text-1); }
.panel.active { display: block; }

/* ===== SETTINGS ROWS ===== */
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.setting-row:last-child { border-bottom: none; }
.setting-info { flex: 1; min-width: 180px; }
.setting-label { font-weight: 600; font-size: 0.9rem; color: var(--text-1); }
.setting-desc { font-size: 0.75rem; color: var(--text-2); margin-top: 2px; }

/* ===== SETTING CONTROLS ===== */
.setting-control {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.setting-control select,
.setting-control input[type="text"],
.setting-control input[type="password"] {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 0.85rem;
  min-width: 160px;
}
.setting-control input[type="range"] { width: 120px; }
.setting-control button {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 152, 0, 0.4);
  background: rgba(255, 152, 0, 0.1);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.setting-control button:hover {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}
.setting-control button:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ===== FORM INPUTS ===== */
.generator-input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.generator-input:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

/* ===== TREE LIST ===== */
.tree-list {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 10px;
}
.tree-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.tree-item:last-child { border-bottom: none; }
.tree-item span { font-weight: 600; }
.tree-actions { display: flex; gap: 4px; }
.tree-actions button { padding: 4px 8px; font-size: 0.75rem; }

/* ===== ABOUT CONTENT ===== */
.about-content { line-height: 1.6; color: var(--text-2); font-size: 0.9rem; }
.about-content p { margin: 0 0 10px 0; }
.about-content strong { color: var(--gold); }

/* ===== DANGER BUTTON ===== */
.btn-danger {
  background: #dc3545 !important;
  border-color: #dc3545 !important;
  color: white !important;
}
.btn-danger:hover { background: #c82333 !important; }
