

/* Helpers for air-quality colours (use the centralized --aq-color-* variables) */
.aq-color-red { color: var(--aq-color-red); }
.aq-color-yellow { color: var(--aq-color-yellow); }
.aq-color-green { color: var(--aq-color-green); }

.aq-bg-red { background-color: var(--aq-color-red); }
.aq-bg-yellow { background-color: var(--aq-color-yellow); }
.aq-bg-green { background-color: var(--aq-color-green); }



/* Empty chart placeholder */
.osona-air-empty {
  margin-top: 8px;
  padding: 18px;
  background: #f8f9fa;
  border: 1px dashed rgba(0, 0, 0, 0.06);
  color: #666;
  text-align: center;
  border-radius: 6px;
  font-size: 0.95rem;
}

/* Minimal modal styles */
.webcam-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.webcam-modal[hidden] {
  display: none;
}

.webcam-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.webcam-modal__dialog {
  position: relative;
  max-width: 900px;
  width: calc(100% - 32px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.webcam-modal__close {
  color: white;
  position: absolute;
  right: 10px;
  top: 8px;
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.btn-webcam {
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Animated modal states ------------------------------------------------- */
.webcam-modal__overlay {
  opacity: 0;
  transition: opacity 280ms cubic-bezier(.2, .9, .3, 1), backdrop-filter 360ms ease;
  backdrop-filter: blur(0px);
}

.webcam-modal__dialog {
  /* start slightly down & scaled for a pleasant pop-in */
  transform: translateY(10px) scale(0.985);
  opacity: 0;
  transition: transform 360ms cubic-bezier(.2, .9, .3, 1), opacity 280ms ease, box-shadow 280ms ease;
}

/* When open, reveal overlay and lift dialog */
.webcam-modal--open .webcam-modal__overlay {
  opacity: 1;
  backdrop-filter: blur(3px);
}

.webcam-modal--open .webcam-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* Subtle image interaction */
.webcam-modal__content img {
  transition: transform 450ms cubic-bezier(.2, .9, .3, 1), filter 360ms ease;
  will-change: transform;
  max-height: calc(80vh - 80px);
  border-radius: 6px;
  display: block;
  width: 100%;
}

.webcam-modal__dialog:hover .webcam-modal__content img {
  transform: scale(1.02);
  filter: saturate(1.03) contrast(1.02);
}

/* Close button style contrast */
.webcam-modal__close {
  color: #222;
  background: rgba(255, 255, 255, 0.6);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Small punch for the open button on click */
.btn-webcam:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {

  .webcam-modal__overlay,
  .webcam-modal__dialog,
  .webcam-modal__content img {
    transition: none !important;
  }
}

/* Articles section background as requested (RGB 227,235,238) */
.articles-section {
  background-color: rgb(227, 235, 238);
}

.article-card__media {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  overflow: hidden;
}

