/* Map-specific styles */

.viewer-container {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  height: 100vh;
  overflow: hidden;
}

.map-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0a0e27;
  border-radius: 4px;
}

/* Leaflet customization */
.leaflet-control {
  background: var(--bg-darker) !important;
  border: 1px solid var(--border-dim) !important;
  border-radius: 4px !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  color: var(--accent-cyan) !important;
  border-bottom: 1px solid var(--border-dim) !important;
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
  background: var(--border-dim) !important;
}

/* Viewer layout */
.viewer-container {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "map sidebar";
  height: 100vh;
  gap: 0;
}

#map {
  grid-area: map;
  width: 100%;
  height: 100%;
}

.sidebar {
  grid-area: sidebar;
  width: 350px;
  background: var(--bg-darker);
  border-left: 1px solid var(--border-dim);
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-header {
  padding: 0 0 1rem 0;
  border-bottom: 1px solid var(--border-dim);
}

.sidebar-header h1 {
  font-size: 18px;
  color: var(--accent-cyan);
  margin-bottom: 0.25rem;
}

.test-browser {
  flex: 1;
  overflow-y: auto;
  min-height: 300px;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.filters label {
  font-size: 13px;
  margin-bottom: 0.25rem;
}

.test-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.test-item {
  padding: 0.75rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
}

.test-item:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 217, 255, 0.05);
}

.test-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 0.25rem;
}

.test-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.test-select {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg-darker);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-size: 12px;
  cursor: pointer;
  border-radius: 3px;
}

.test-select:hover {
  background: var(--accent-cyan);
  color: var(--bg-dark);
}

.metric-picker {
  padding: 1rem;
}

.metric-picker h3 {
  margin-bottom: 0.75rem;
  font-size: 14px;
  color: var(--accent-cyan);
}

.metric-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.metric-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  font-size: 13px;
  margin-bottom: 0;
}

.metric-options input[type="radio"] {
  width: auto;
  margin: 0;
}

.test-detail-panel {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 300px;
  max-height: 400px;
  background: var(--bg-darker);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 1rem;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#test-info {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 1rem;
}

#test-info h3 {
  font-size: 14px;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

#test-info dl {
  font-size: 12px;
  font-family: var(--font-mono);
}

#test-info dt {
  color: #666;
  font-weight: 600;
  margin-top: 0.5rem;
}

#test-info dd {
  color: var(--fg-light);
  margin-left: 0;
  margin-bottom: 0.5rem;
}

.playback-controls {
  background: var(--bg-dark);
  padding: 0.75rem;
  border-top: 1px solid var(--border-dim);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.slider-container input {
  flex: 1;
}

#playback-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-cyan);
  width: 40px;
  text-align: right;
}

#playback-play {
  width: 100%;
  padding: 0.5rem;
  font-size: 12px;
}

/* Upload container */
.upload-container {
  max-width: 900px;
  margin: 0 auto;
}

.wizard {
  padding: 2rem;
}

.steps {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 1rem;
}

.step-indicator {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.step {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  background: var(--bg-darker);
  color: #666;
  cursor: pointer;
  transition: 0.2s;
}

.step.active {
  background: var(--accent-cyan);
  color: var(--bg-dark);
  font-weight: 600;
}

.step-content {
  display: none;
}

.step-content.active {
  display: block;
}

.step-content h2 {
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  font-size: 20px;
}

.step-content p {
  color: #999;
  margin-bottom: 1.5rem;
  font-size: 13px;
}

.file-input-group {
  margin-bottom: 1.5rem;
}

.file-input-group input[type="file"] {
  width: 100%;
  margin-top: 0.5rem;
}

.file-preview {
  font-size: 12px;
  color: #666;
  margin-top: 0.25rem;
  font-family: var(--font-mono);
}

.control-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  margin-top: 1rem;
}

.control-panel label {
  display: flex;
  flex-direction: column;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.button-group button {
  flex: 1;
  padding: 0.75rem;
}

.hint {
  font-size: 12px;
  color: #666;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Profile container */
.profile-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.content > section {
  grid-column: 1 / -1;
}

.new-profile-form {
  background: var(--bg-dark);
  padding: 1rem;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  margin-top: 1rem;
}

.new-profile-form input,
.new-profile-form textarea {
  width: 100%;
  margin-bottom: 0.75rem;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  margin-bottom: 0.5rem;
  font-size: 13px;
}

.profile-name {
  font-weight: 600;
  flex: 1;
}

.profile-specs {
  color: #666;
  font-size: 12px;
  font-family: var(--font-mono);
  flex: 1;
  margin: 0 1rem;
}

.profile-item button {
  padding: 0.25rem 0.75rem;
  font-size: 12px;
}

.test-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.5rem 1rem;
  background: var(--bg-darker);
  border: 1px solid var(--border-dim);
  color: #999;
  cursor: pointer;
  border-radius: 4px;
}

.tab.active {
  background: var(--accent-cyan);
  color: var(--bg-dark);
  border-color: var(--accent-cyan);
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    width: 100%;
    max-height: 300px;
  }

  .viewer-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "map"
      "sidebar";
  }

  .test-detail-panel {
    position: static;
    width: 100%;
    max-height: none;
  }

  .content {
    grid-template-columns: 1fr;
  }

  .control-panel {
    grid-template-columns: 1fr;
  }
}
