/* ==========================================================================
   GAL Weather Forecast — Component styles
   Consistent with the GAL module family design language.
   ========================================================================== */

/* === Layout integration: align weather tile with sibling columns ======= */

/* Remove top padding from the section that wraps the weather forecast,
   so the tile aligns flush with the top of the GAL News column. */
.paragraph--type--paragraph-section:has(.gal-weather-forecast) {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Remove Bootstrap container padding inside the weather forecast section. */
.paragraph--type--paragraph-section:has(.gal-weather-forecast) > .container {
  padding-top: 0;
  padding-bottom: 0;
}

/* Hide the <hr> + spacer paragraph that immediately follows the weather
   forecast section (reduces the gap before "Prochaines activités"). */
.paragraph--type--paragraph-section:has(.gal-weather-forecast) + .paragraph--type--paragraph-content {
  display: none;
}

/* Tighten the gap between a Drupal block/paragraph title and the tile. */
.block-gal-weather-forecast-block > .block-title,
.block-gal-weather-forecast-block > h2,
.paragraph--type--gal-weatherforecast .field--name-field-title,
.paragraph--type--gal-weatherforecast > h2 {
  margin-bottom: 0.35rem;
}

/* === Component styles ================================================== */

.gal-weather-forecast {
  background: #fff;
  border: 1px solid #dde3e9;
  border-radius: 8px;
  padding: 0.5rem 1.25rem 0.4rem;
  font-family: inherit;
  max-width: 480px;
  margin: 0;
}

/* Header */
.gal-weather-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid #edf0f2;
  padding-bottom: 0.35rem;
}

.gal-weather-location {
  font-weight: 600;
  font-size: 1rem;
  color: #2d3748;
}

/* Current conditions */
.gal-weather-current {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #ebf4ff 0%, #f0f9ff 100%);
  border-radius: 6px;
}

.gal-weather-current__icon {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.gal-weather-current__temp {
  font-size: 2rem;
  font-weight: 700;
  color: #1a365d;
  line-height: 1;
  flex-shrink: 0;
}

.gal-weather-current__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: #4a5568;
}

.gal-weather-current__meta span {
  white-space: nowrap;
}

.gal-weather-current__label {
  font-style: italic;
  color: #718096;
}

/* Daily forecast strip */
.gal-weather-daily {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  margin-bottom: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 transparent;
}

.gal-weather-daily__item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  min-width: 52px;
  text-align: center;
  transition: background 0.15s;
}

.gal-weather-daily__item:hover {
  background: #edf2f7;
}

.gal-weather-daily__item--today {
  background: #ebf4ff;
  border-color: #90cdf4;
  font-weight: 600;
}

.gal-weather-daily__day {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #718096;
  letter-spacing: 0.03em;
}

.gal-weather-daily__icon {
  font-size: 1.4rem;
  line-height: 1;
}

.gal-weather-daily__temps {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  line-height: 1.3;
}

.gal-weather-daily__max {
  font-weight: 700;
  color: #c05621;
}

.gal-weather-daily__min {
  color: #4299e1;
}

.gal-weather-daily__precip {
  font-size: 0.65rem;
  color: #4299e1;
  white-space: nowrap;
}

/* Error state */
.gal-weather-error {
  padding: 0.75rem 1rem;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 6px;
  color: #c53030;
  font-size: 0.9rem;
}

/* Footer / attribution */
.gal-weather-footer {
  text-align: right;
  margin-top: 0.15rem;
}

.gal-weather-footer small,
.gal-weather-footer a {
  font-size: 0.7rem;
  color: #a0aec0;
  text-decoration: none;
}

.gal-weather-footer a:hover {
  text-decoration: underline;
  color: #718096;
}

/* Responsive: full-width on small screens */
@media (max-width: 480px) {
  .gal-weather-forecast {
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}