/* receiver/style-receiver.css */

body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: monospace;
  padding: 20px;
  margin: 0;
}

.shell { max-width: 600px; margin: 0 auto; }

/* Header Layout */
header {
  border-bottom: 1px solid #444;
  margin-bottom: 20px;
  padding-bottom: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "left title right";
  align-items: center;
  gap: 12px;
}

header h1 {
  grid-area: title;
  justify-self: center;
  margin: 0;
  font-size: 1.2rem;
  color: #42c8f5;
}

.section { margin-bottom: 20px; }
.label { font-size: 0.8rem; color: #aaa; margin-bottom: 5px; text-transform: uppercase; }
.row { display: flex; gap: 10px; margin-bottom: 10px; }

#homeBtn {
  grid-area: left;
  justify-self: start;
  text-decoration: none;
  font-size: 0.85rem;
  text-align: center;
}

#spatialToggleBtn {
  grid-area: right;
  justify-self: end;
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 480px) {
  header {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "title title"
      "left right";
  }
}

/* Form and Input Controls */
input {
  background: #222;
  border: 1px solid #555;
  color: #fff;
  padding: 6px 10px;
  font-family: monospace;
}

.btn {
  background: #333;
  border: 1px solid #555;
  color: #fff;
  padding: 6px 12px;
  cursor: pointer;
  font-family: monospace;
}
.btn:hover { background: #444; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { border-color: #42c8f5; color: #42c8f5; }
.btn.primary:hover { background: #42c8f5; color: #000; }
.btn.success { border-color: #c8f542; color: #c8f542; }
.btn.success:hover { background: #c8f542; color: #000; }
.btn.danger { border-color: #ff4545; color: #ff4545; }

/* State Indicators */
.state-bar {
  background: #1e1e1e;
  padding: 10px;
  border: 1px solid #333;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; background: #555; flex-shrink: 0; }
.dot.active  { background: #0f0; animation: pulse 1.8s infinite; }
.dot.error   { background: #f00; }
.dot.waiting { background: #fa0; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

#stateText { color: #aaa; font-size: 0.9rem; }

/* Telemetry Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat-box {
  background: #1a1a1a;
  border: 1px solid #333;
  padding: 8px 10px;
}

.stat-label {
  font-size: 0.6rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 0.9rem;
  color: #42c8f5;
  font-weight: bold;
}
.stat-value.warn  { color: #fa0; }
.stat-value.alert { color: #f00; }

/* Console Log Output */
.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}
.log-header .label { margin-bottom: 0; }
.clear-log-btn { padding: 3px 8px; font-size: 0.7rem; }

#log {
  background: #000;
  border: 1px solid #333;
  height: 150px;
  overflow-y: auto;
  padding: 10px;
  font-size: 0.8rem;
  line-height: 1.4;
}
.ts  { color: #666; }
.ok  { color: #c8f542; }
.err { color: #f00; }
.inf { color: #0af; }

/* Spatial Controls */
input[type="range"] {
  padding: 0;
  border: none;
  box-sizing: border-box;
  background: transparent;
}

/* Spatial Controls */ 
.btn.spatial-toggle.active { border-color: #f5a623; color: #f5a623; }
 
.spatial-panel {
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  padding: 14px 16px;
  border-radius: 2px;
}
 
.spatial-row {
  display: grid;
  grid-template-columns: 80px 1fr 64px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.spatial-row:last-child { margin-bottom: 0; }
 
.spatial-label {
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
 
.spatial-row input[type="range"] {
  accent-color: #f5a623;
  cursor: pointer;
  width: 100%;
}
 
.spatial-value {
  font-size: 0.8rem;
  color: #f5a623;
  text-align: right;
  font-weight: bold;
  min-width: 56px;
}
