/* ============================================================
   WETTER — meteoblue weather widget section
   ============================================================ */

.widgets-section {
  background: var(--color-bg);
  padding: 4rem 1.5rem;
}

/* Layout:
   Widget 1 = flexibel
   Widget 2 = flexibel
   Widget 3 = fixed width for 5day forecast
*/
.widgets-grid {
  display: grid;
  grid-template-columns:
    minmax(420px, 1fr)
    minmax(420px, 1fr)
    minmax(650px, 750px);
  gap: 1.5rem;
  max-width: 1900px;
  margin: 0 auto;
  align-items: stretch;
}

.widgets-grid.hidden {
  display: none;
}

/* Individual widget card */
.widget-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.widget-card--forecast {
  min-width: 650px;
}

.widget-card-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 2px solid var(--color-mpei);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-card-header .icon {
  font-size: 1.2rem;
}

.widget-card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
}

.widget-card-header p {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 0.1rem;
  margin-bottom: 0;
}

.widget-card-body {
  flex: 1;
  line-height: 0; /* removes iframe-Gap */
  overflow: hidden;
}

.widget-card-body iframe {
  width: 100%;
  border: none;
  display: block;
}

/* meteoblue attribution link */
.widget-credit {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  color: var(--color-muted);
  text-align: right;
  background: #fafafa;
}

.widget-credit a {
  color: var(--color-tu);
  text-decoration: underline;
}

/* Cookie rejection notice */
.widgets-rejected-notice {
  background: #fff;
  padding: 3rem 2rem;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  max-width: 600px;
  margin: 0 auto;
}

.widgets-rejected-notice p {
  font-size: 1rem;
  color: var(--color-muted);
  margin: 0.5rem 0;
  line-height: 1.6;
}

.widgets-rejected-notice a {
  color: var(--color-mpei);
  text-decoration: underline;
  cursor: pointer;
}

/* ============================================================
   Responsive Breakpoints
   ============================================================ */

/* Tablet */
@media (max-width: 1600px) {
  .widgets-grid {
    grid-template-columns:
      minmax(400px, 1fr)
      minmax(400px, 1fr);
  }

  .widget-card--forecast {
    grid-column: 1 / -1;
    min-width: 0;
  }
}

/* Mobile */
@media (max-width: 900px) {
  .widgets-grid {
    grid-template-columns: 1fr;
  }

  .widget-card--forecast {
    grid-column: auto;
  }
}