/* terminal.css - Matches Terminal Example.jpg Layout */

/* Hidden state: invisible, scaled down, pointer events disabled */
.hidden {
  opacity: 0 !important;
  transform: scale(0.92) !important;
  pointer-events: none !important;
}

:root {
  --term-cyan: #00eaff;
  --term-cyan-glow: rgba(0, 234, 255, 0.4);
  --term-blue-bg: #030d18;
  --term-panel-bg: rgba(6, 24, 40, 0.75);
  --term-border: rgba(0, 234, 255, 0.35);
  --term-gold: #ffd700;
  --term-red: #ff3c3c;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #000;
  font-family: "Rajdhani", sans-serif;
  color: #a0d8ef;
  overflow: hidden;
}

/* MAIN HARDWARE FRAME */
#terminal-assembly {
  position: fixed;
  top: 3vh;
  left: 2vw;
  width: 96vw;
  height: 94vh;
  display: flex; /* Active layout when .hidden is removed */
  background: linear-gradient(135deg, #020912 0%, #051829 100%);
  border: 2px solid #1a415a;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.95), inset 0 0 15px rgba(0, 234, 255, 0.15);
  padding: 12px;
  gap: 12px;
  z-index: 9999;

  /* Active state defaults */
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;

  /* Smooth fade & zoom transition */
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* CONTEXT ALERT UTILITY CLASSES */
.context-alert {
  color: var(--term-red);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 60, 60, 0.6);
}

.context-maintenance {
  color: var(--term-cyan);
  font-weight: 700;
}

/* ------------------------------------------------------------
   1. FAR-LEFT PROP NAVIGATION BAR
------------------------------------------------------------ */
#prop-bar {
  width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  background: rgba(1, 10, 18, 0.85);
  border: 1px solid rgba(0, 234, 255, 0.2);
  border-radius: 6px;
  overflow-y: auto;
  scrollbar-width: none;
}

#prop-bar::-webkit-scrollbar {
  display: none;
}

.prop-icon-btn {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.prop-icon-btn:hover {
  transform: translateY(-2px);
}

.prop-icon-box {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 234, 255, 0.05);
  border: 1px solid rgba(0, 234, 255, 0.3);
  border-radius: 6px;
  box-shadow: inset 0 0 8px rgba(0, 234, 255, 0.1);
  transition: all 0.2s ease;
}

.prop-icon-box img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.prop-icon-btn:hover .prop-icon-box {
  border-color: var(--term-cyan, #00eaff);
  box-shadow: 0 0 12px rgba(0, 234, 255, 0.4);
}

.prop-icon-btn.active .prop-icon-box {
  background: rgba(0, 234, 255, 0.15);
  border-color: var(--term-cyan, #00eaff);
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.6);
}

.prop-icon-btn .prop-label {
  display: block !important;
  width: 100% !important;
  margin: 6px 0 0 0 !important;
  padding: 0 !important;
  text-align: center !important;
  writing-mode: horizontal-tb !important;
  white-space: normal !important;
  word-break: normal !important;
  font-family: "Orbitron", sans-serif !important;
  font-size: 0.525rem !important;
  font-weight: 600 !important;
  color: #80c8e5 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  line-height: 1.2 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.prop-icon-btn:hover .prop-label {
  color: #fff !important;
}

.prop-icon-btn.active .prop-label {
  color: var(--term-cyan, #00eaff) !important;
  text-shadow: 0 0 6px rgba(0, 234, 255, 0.6) !important;
}

/* ------------------------------------------------------------
   2. SECONDARY DATA NAVIGATION PANEL
------------------------------------------------------------ */
#nav-panel {
  width: 240px;
  min-width: 240px;
  background: rgba(4, 18, 30, 0.85);
  border: 1px solid var(--term-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 12px;
}

#prop-header-banner {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 234, 255, 0.05);
  border: 1px solid rgba(0, 234, 255, 0.4);
  border-radius: 4px;
  box-shadow: inset 0 0 10px rgba(0, 234, 255, 0.1);
  margin-bottom: 12px;
  box-sizing: border-box;
}

.banner-label {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.65rem;
  color: #58a6ff;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#active-prop-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--term-cyan, #00eaff);
  text-shadow: 0 0 6px rgba(0, 234, 255, 0.5);
  margin-top: 2px;
}

#section-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-group-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.9rem;
  color: #80c8e5;
  margin-top: 8px;
  padding-left: 4px;
}

.section-item {
  padding: 8px 12px;
  background: rgba(0, 234, 255, 0.05);
  border: 1px solid rgba(0, 234, 255, 0.2);
  border-radius: 4px;
  color: #a0d8ef;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.section-item:hover {
  background: rgba(0, 234, 255, 0.15);
  color: #fff;
  border-color: var(--term-cyan);
}

.section-item.active {
  background: linear-gradient(90deg, rgba(0, 234, 255, 0.3) 0%, rgba(0, 234, 255, 0.05) 100%);
  border-color: var(--term-cyan);
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 234, 255, 0.3);
}

.section-item.active::after {
  content: "◀";
  font-size: 0.65rem;
  color: var(--term-cyan);
}

#chapter-wheel {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 4px;
  background: rgba(0, 234, 255, 0.05);
  border: 1px solid rgba(0, 234, 255, 0.2);
  border-radius: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--term-cyan) transparent;
}

#chapter-wheel::-webkit-scrollbar {
  height: 4px;
}

#chapter-wheel::-webkit-scrollbar-thumb {
  background: var(--term-cyan);
  border-radius: 2px;
}

.chapter-item {
  flex: 0 0 auto;
  padding: 4px 12px;
  background: rgba(2, 12, 22, 0.8);
  border: 1px solid rgba(0, 234, 255, 0.25);
  border-radius: 3px;
  color: #80c8e5;
  font-family: "Orbitron", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s ease;
}

.chapter-item:hover {
  border-color: var(--term-gold);
  color: var(--term-gold);
}

.chapter-item.active {
  background: var(--term-cyan);
  color: #000;
  border-color: #fff;
  box-shadow: 0 0 10px var(--term-cyan-glow);
}

/* ------------------------------------------------------------
   3. MAIN VIEWPORT SCREEN & HEADER
------------------------------------------------------------ */
#main-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(2, 10, 18, 0.95);
  border: 1px solid var(--term-border);
  border-radius: 8px;
  padding: 12px;
  gap: 10px;
}

#viewport-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 234, 255, 0.2);
  padding-bottom: 8px;
}

#terminal-context {
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #d0f4ff;
  letter-spacing: 1px;
}

#exit-btn {
  background: rgba(255, 60, 60, 0.2);
  border: 1px solid var(--term-red);
  color: var(--term-red);
  font-family: "Orbitron", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#exit-btn:hover {
  background: var(--term-red);
  color: #fff;
  box-shadow: 0 0 10px var(--term-red);
}

#content-container {
  flex: 1;
  background: #000;
  border: 1px solid rgba(0, 234, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

#main-frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* ------------------------------------------------------------
   TERMINAL CUSTOM SCROLLBARS
------------------------------------------------------------ */
/* Firefox Standard Support */
#terminal-assembly * {
  scrollbar-width: thin;
  scrollbar-color: var(--term-cyan) rgba(2, 12, 22, 0.8);
}

/* Chrome, Edge, Safari (WebKit) */
#terminal-assembly *::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#terminal-assembly *::-webkit-scrollbar-track {
  background: rgba(2, 12, 22, 0.8);
  border: 1px solid rgba(0, 234, 255, 0.15);
  border-radius: 3px;
}

#terminal-assembly *::-webkit-scrollbar-thumb {
  background: rgba(0, 234, 255, 0.35);
  border: 1px solid var(--term-cyan);
  border-radius: 3px;
  box-shadow: inset 0 0 4px rgba(0, 234, 255, 0.5);
}

#terminal-assembly *::-webkit-scrollbar-thumb:hover {
  background: var(--term-cyan);
  box-shadow: 0 0 8px var(--term-cyan);
}

#terminal-assembly *::-webkit-scrollbar-corner {
  background: rgba(2, 12, 22, 0.8);
}