/* Cameras page */

body.page-cameras * {
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.page-cameras {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(180, 30, 30, 0.18), transparent 34%),
    linear-gradient(180deg, #111 0%, #171717 48%, #f4f1ec 48%, #f4f1ec 100%);
  color: #fff;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.page-cameras,
.page-cameras button,
.page-cameras input,
.page-cameras textarea,
.page-cameras select {
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.cameras-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.cameras-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.cameras-kicker {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.cameras-top h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.cameras-status {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #7a4b00;
  background: #fff0cf;
  font-size: 13px;
  font-weight: 800;
}

.cameras-section {
  padding: 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.16);
}

.camera-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.camera-select-card {
  display: block;
  border: 1px solid rgba(29, 29, 29, 0.12);
  border-radius: 18px;
  padding: 0;
  color: #1d1d1d;
  background: #efefef;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.camera-select-card:hover,
.camera-select-card.is-active {
  transform: translateY(-3px);
  border-color: rgba(151, 18, 18, 0.42);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
}

.camera-select-card.is-active {
  grid-column: 1 / -1;
  background: #fff;
}

.camera-select-media {
  display: block;
}

.camera-select-preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e4e4e4;
}

.camera-select-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.1);
}

.camera-select-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.camera-select-play svg {
  width: 78px;
  height: 78px;
}

.camera-select-play circle {
  fill: rgba(255, 255, 255, 0.16);
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 1.2;
  backdrop-filter: blur(4px);
}

.camera-select-play path {
  fill: rgba(255, 255, 255, 0.86);
}

.camera-video-shell {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050505;
}

.camera-card-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #050505;
  object-fit: contain;
  cursor: pointer;
}

.camera-card-video::-webkit-media-controls {
  display: none !important;
}

.camera-card-video::-webkit-media-controls-enclosure {
  display: none !important;
}

.camera-fullscreen-button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.camera-fullscreen-button:hover {
  background: rgba(0, 0, 0, 0.62);
  border-color: rgba(255, 255, 255, 0.58);
}

.camera-fullscreen-button:active {
  transform: translateY(1px);
}

.camera-fullscreen-button svg {
  width: 24px;
  height: 24px;
}

.camera-fullscreen-button path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.camera-select-body {
  display: block;
  padding: 16px 18px 18px;
}

.camera-select-title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.camera-select-card.is-active .camera-select-title {
  font-size: 18px;
}

.camera-select-hint {
  display: block;
  min-height: 18px;
  margin-top: 7px;
  color: rgba(29, 29, 29, 0.58);
  font-size: 13px;
  line-height: 1.35;
}

.camera-select-card:not(.is-active) .camera-select-hint:empty {
  display: none;
}

.camera-select-card.is-loading .camera-select-hint::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border: 2px solid rgba(29, 29, 29, 0.18);
  border-top-color: rgba(29, 29, 29, 0.7);
  border-radius: 50%;
  vertical-align: -1px;
  animation: camera-spin 0.8s linear infinite;
}

.camera-select-card.has-error {
  border-color: rgba(151, 18, 18, 0.42);
}

.camera-select-card.has-error .camera-select-hint {
  color: #8b1515;
  font-weight: 700;
}

.camera-empty {
  margin: 0;
  color: #1d1d1d;
}

@keyframes camera-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  .camera-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .cameras-main {
    width: min(100% - 24px, 1280px);
    padding: 30px 0 48px;
  }

  .cameras-top {
    display: block;
  }

  .cameras-status {
    display: inline-block;
    margin-top: 18px;
  }

  .cameras-section {
    padding: 12px;
    border-radius: 22px;
  }

  .camera-list {
    gap: 16px;
  }

  .camera-select-card.is-active {
    grid-column: auto;
  }
}

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

  .camera-select-play svg {
    width: 64px;
    height: 64px;
  }

  .camera-fullscreen-button {
    right: 10px;
    bottom: 10px;
    width: 42px;
    height: 42px;
  }

  .camera-select-body {
    padding: 14px 16px 16px;
  }
}
