.camera-page { max-width: 1280px; }
.camera-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: clamp(18px, 3vw, 40px);
}

.camera-layout.has-camera-list { grid-template-columns: minmax(0, 2.15fr) minmax(15rem, 1fr); }

.camera-monitor,
.camera-sidebar {
  min-width: 0;
  border: 1px solid var(--estate-line);
  border-radius: 12px;
  overflow: hidden;
}

.camera-monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px clamp(14px, 2vw, 25px);
}

.camera-monitor-header h2,
.camera-sidebar > h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.25rem);
  overflow-wrap: anywhere;
}

.camera-state {
  color: #555;
  background: #f0f0f0;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: .875rem;
}

.camera-state[data-state="playing"] { background: #252525; color: #fff; }

.camera-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 185px;
  background: #252525;
  color: #fff;
}

.camera-placeholder,
.camera-screen video,
.camera-screen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.camera-placeholder {
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(ellipse at 50% 40%, #383838, #222);
  text-align: center;
}

.camera-placeholder p { max-width: 33ch; margin: 0; line-height: 1.55; }
.camera-screen video { object-fit: contain; background: #161616; }
.camera-sidebar { padding: clamp(16px, 2.5vw, 30px); }
.camera-list { list-style: none; padding: 0; margin: 16px 0 0; }
.camera-list li {
  border-top: 1px solid var(--estate-line);
  padding-block: 7px;
}

.camera-select {
  width: 100%;
  min-height: 42px;
  padding: 6px 10px;
  text-align: start;
  background: #f5f5f5;
  border: 1px solid transparent;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.camera-select[aria-pressed="true"] { background: #272727; color: #fff; }
.camera-select:hover { border-color: #777; }

@media (max-width: 790px) {
  .camera-layout.has-camera-list { grid-template-columns: 1fr; }
}
