/* Let content fill the viewport instead of capping at the shared 1400px
   .main-content width (oracle.css). The radio screens use auto-fill channel
   grids and the live feed that should grow with the browser, so the 1400px
   cap left wide screens with dead space on the right. */
.app-shell .main-content {
  max-width: none;
}

.radio-server-status {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.radio-server-status[data-status="healthy"] {
  color: var(--success);
}

.radio-server-status[data-status="degraded"] {
  color: var(--warning);
}

.radio-server-status[data-status="unreachable"] {
  color: var(--danger);
}

@media (max-width: 700px) {
  .radio-server-status {
    font-size: 0.62rem;
  }
}

.table-wrapper {
  overflow: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}

.table-wrapper .table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.table-wrapper .table th {
  text-align: left;
  padding: 10px var(--space-md);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-base);
  white-space: nowrap;
}

.table-wrapper .table td {
  padding: 10px var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.table-wrapper .table tr:hover td {
  background: var(--bg-hover);
}

.table-wrapper .table tr:last-child td {
  border-bottom: none;
}

.radio-history-card-header {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.radio-history-card-header .card-title {
  flex: 0 0 auto;
  margin-bottom: 8px;
}

.radio-history-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.radio-history-field {
  display: grid;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.radio-history-channel-select {
  min-width: 160px;
  padding-block: 7px;
}

.radio-history-summary-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
}

.radio-history-summary-prefix {
  color: var(--text-secondary);
  font-size: 0.76rem;
  white-space: nowrap;
}

.radio-history-duration {
  width: 76px;
  padding-block: 7px;
}

.radio-history-unit {
  width: 104px;
  padding-block: 7px;
}

.radio-history-summary {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  color: var(--text-primary);
}

.radio-history-summary--loading {
  border-color: var(--border-default);
  background: var(--bg-base);
}

.radio-history-summary--error {
  border-color: var(--danger);
  background: var(--red-dim);
}

.radio-history-summary--loading span,
.radio-history-summary--error span {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.radio-history-summary__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.radio-history-summary__heading span {
  color: var(--text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.radio-history-summary__body {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 800px) {
  .radio-history-card-header,
  .radio-history-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .radio-history-controls,
  .radio-history-field,
  .radio-history-channel-select {
    width: 100%;
  }

  .radio-history-summary-controls {
    flex-wrap: wrap;
  }

  .radio-history-summary-prefix {
    flex-basis: 100%;
  }
}
