/* =============================================================================
   משתני Mizrahnik - מערכת עיצוב גלובלית למחשבונים
   ============================================================================

   קובץ זה מגדיר משתנים ביניים (--calc-*) שמצביעים על משתני Mizrahnik (--mz-*)
   עם fallback values מובנים. גישה זו מאפשרת:
   - שינוי fallback במקום אחד
   - עקיפת ערכים ספציפיים בקלות
   - תמיכה אוטומטית ב-Dark Mode

   Dark Mode מזוהה על ידי:
   - html[data-theme="dark"]
   - body[data-theme="dark"]
   ============================================================================= */

:root {
  /* Plugin Tokens - Base Colors
     ============================ */
  --calc-bg: var(--mz-bg, #ffffff);
  --calc-surface: var(--mz-surface, #f9f9f9);
  --calc-text: var(--mz-muted, #6b7280);
  --calc-heading: var(--mz-primary, #5FA886);
  --calc-muted: var(--mz-muted, #6b7280);
  --calc-border: var(--mz-border, rgba(17, 24, 39, 0.15));
  --calc-link: var(--mz-primary, #5FA886);
  --calc-link-hover: var(--mz-link-hover, #4e9173);
  --calc-focus: var(--mz-focus, rgba(95, 168, 134, 0.35));

  /* Semantic Colors - Calculator Specific
     ====================================== */
  /* Success/Info States - מצבי הצלחה ומידע
     ========================================= */
  --calc-success-bg: #f5fdf9;
  --calc-success-bg-alt: #f0f8f4;
  --calc-success-text: #2d6a4f;
  --calc-success-text-light: #40916c;
  --calc-success-border: #5FA886;

  /* Warning/Attention States - מצבי אזהרה ותשומת לב
     ================================================= */
  --calc-warning-bg: #FFEDAD;
  --calc-warning-bg-light: #fffef5;
  --calc-warning-text: #ca8a04;
  --calc-warning-text-alt: #a16207;
  --calc-warning-border: #e6d89a;

  /* Error States - מצבי שגיאה
     ========================== */
  --calc-error: #ff0000;
  --calc-error-text: #cc0000;

  /* Alpha Variants - וריאנטים עם שקיפות
     ===================================== */
  --calc-primary-alpha-5: rgba(95, 168, 134, 0.05);
  --calc-primary-alpha-10: rgba(95, 168, 134, 0.1);
  --calc-primary-alpha-15: rgba(95, 168, 134, 0.15);
  --calc-primary-alpha-20: rgba(95, 168, 134, 0.2);
  --calc-primary-alpha-30: rgba(95, 168, 134, 0.3);

  /* Shadow Colors - צבעי צללים
     ============================ */
  --calc-shadow: rgba(0, 0, 0, 0.1);
  --calc-shadow-hover: rgba(95, 168, 134, 0.3);
}

/* =============================================================================
   Dark Mode Overrides - עדכונים ל-Dark Mode
   ============================================================================

   תומך בשני הסלקטורים:
   - html[data-theme="dark"]
   - body[data-theme="dark"]
   ============================================================================= */

html[data-theme="dark"],
body[data-theme="dark"] {
  /* Plugin Tokens - Dark Mode Base Colors
     ====================================== */
  --calc-bg: var(--mz-bg, #1a1a1a);
  --calc-surface: var(--mz-surface, #2d2d2d);
  --calc-text: var(--mz-text, #e5e7eb);
  --calc-heading: var(--mz-text, #e5e7eb);
  --calc-muted: var(--mz-muted, #9ca3af);
  --calc-border: var(--mz-border, #4b5563);
  --calc-link: var(--mz-link, #6abf8f);
  --calc-link-hover: var(--mz-link-hover, #7dd4a3);
  --calc-focus: var(--mz-focus, rgba(106, 191, 143, 0.35));

  /* Semantic Colors - Dark Mode Adjustments
     ========================================= */
  --calc-success-bg: rgba(45, 106, 79, 0.15);
  --calc-success-bg-alt: rgba(45, 106, 79, 0.2);
  --calc-success-text: #6abf8f;
  --calc-success-text-light: #7dd4a3;
  --calc-success-border: #6abf8f;

  /* Warning States - צהוב/זהב רך יותר
     =================================== */
  --calc-warning-bg: rgba(202, 138, 4, 0.2);
  --calc-warning-bg-light: rgba(202, 138, 4, 0.1);
  --calc-warning-text: #f5c344;
  --calc-warning-text-alt: #e8b92e;
  --calc-warning-border: rgba(202, 138, 4, 0.3);

  /* Error States - אדום רך יותר
     ============================= */
  --calc-error: #ff6b6b;
  --calc-error-text: #ff5252;

  /* Alpha Variants - התאמה לרקע כהה
     ================================= */
  --calc-primary-alpha-5: rgba(106, 191, 143, 0.05);
  --calc-primary-alpha-10: rgba(106, 191, 143, 0.1);
  --calc-primary-alpha-15: rgba(106, 191, 143, 0.15);
  --calc-primary-alpha-20: rgba(106, 191, 143, 0.2);
  --calc-primary-alpha-30: rgba(106, 191, 143, 0.3);

  /* Shadows - צללים כהים יותר לעומק
     ================================= */
  --calc-shadow: rgba(0, 0, 0, 0.5);
  --calc-shadow-hover: rgba(106, 191, 143, 0.3);
}

/* =============================================================================
   Print Mode - מצב הדפסה
   ============================================================================

   כפייה של צבעים בהירים במצב הדפסה גם אם Dark Mode מופעל
   ============================================================================= */

@media print {
  html[data-theme="dark"],
  body[data-theme="dark"] {
    --calc-success-bg: #f5fdf9;
    --calc-success-text: #2d6a4f;
    --calc-warning-bg: #FFEDAD;
    --calc-warning-text: #ca8a04;
    --calc-error: #ff0000;
    --calc-shadow: rgba(0, 0, 0, 0.1);
  }
}

/* ========================================
   סטיילים משותפים לכל המחשבונים
   ======================================== */

/* Reset */
* {
  box-sizing: border-box;
}

/* RTL Support */
[dir="rtl"] {
  text-align: right;
}

/* Typography */
body {
  font-family: 'Heebo', 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible */
*:focus-visible {
  outline: 2px solid var(--calc-link);
  outline-offset: 2px;
}

/* ========================================
   קומפוננטות משותפות
   ======================================== */

/* Field */
.calculator-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calculator-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--calc-text);
}

.required-mark {
  color: var(--calc-error, #ff0000);
  margin-right: 4px;
}

.calculator-help-text {
  font-size: 14px;
  color: var(--calc-text);
  margin: 0;
  font-style: italic;
}

/* Select */
.calculator-select {
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid var(--calc-border);
  border-radius: 8px;
  background: var(--calc-surface);
  color: var(--calc-text);
  cursor: pointer;
  transition: border-color 0.2s;
  font-family: inherit;
}

.calculator-select:hover {
  border-color: var(--calc-link);
}

.calculator-select:focus {
  outline: none;
  border-color: var(--calc-link);
  box-shadow: 0 0 0 3px var(--calc-primary-alpha-10);
}

/* Button */
.calculator-button {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Shine effect pseudo-element */
.calculator-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.calculator-button-primary {
  background: linear-gradient(135deg, #5FA886 0%, #488f6e 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(95, 168, 134, 0.5);
}

.calculator-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(95, 168, 134, 0.6);
}

.calculator-button-primary:hover::before {
  left: 100%;
}

.calculator-button-secondary {
  background: var(--calc-surface);
  color: #5FA886 !important;
  border: 2px solid #5FA886;
}

.calculator-button-secondary:hover {
  background: rgba(95, 168, 134, 0.06);
  transform: translateY(-1px);
}

.calculator-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
}

/* =============================================================================
   Weather By Month Calculator
   ============================================================================= */

.weather-by-month {
  direction: rtl;
  font-family: 'Heebo', 'Assistant', -apple-system, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  color: #1f2937;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(17, 24, 39, 0.06), 0 0 0 1px rgba(17, 24, 39, 0.06);
}
html[data-theme="dark"] .weather-by-month,
body[data-theme="dark"] .weather-by-month {
  background: var(--mz-surface, #111827);
  color: var(--mz-text, #e5e7eb);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(229, 231, 235, 0.08);
}

/* Header */
.weather-header {
  text-align: center;
  margin-bottom: 24px;
}

.weather-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--calc-heading, #5FA886);
  margin: 0 0 8px 0;
}

.weather-subtitle {
  font-size: 16px;
  color: var(--calc-muted, #6b7280);
  margin: 0;
}

/* Month Selector — Horizontal timeline strip */
.weather-month-selector {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  margin-bottom: 32px;
  padding: 6px;
  background: #f3f4f6;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
}
html[data-theme="dark"] .weather-month-selector,
body[data-theme="dark"] .weather-month-selector {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(229, 231, 235, 0.12);
}

.weather-by-month button.weather-month-btn,
.weather-month-btn {
  padding: 12px 4px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  color: #374151 !important;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  text-align: center;
  position: relative;
  min-width: 0;
  box-shadow: none !important;
  text-shadow: none !important;
}
html[data-theme="dark"] .weather-month-btn,
body[data-theme="dark"] .weather-month-btn {
  color: #e5e7eb !important;
}

.weather-by-month button.weather-month-btn:hover,
.weather-by-month button.weather-month-btn:focus,
.weather-month-btn:hover,
.weather-month-btn:focus {
  background: rgba(95, 168, 134, 0.14) !important;
  color: #2d6a4f !important;
  outline: none !important;
}
html[data-theme="dark"] .weather-month-btn:hover,
body[data-theme="dark"] .weather-month-btn:hover {
  background: rgba(95, 168, 134, 0.22) !important;
  color: #ffffff !important;
}

.weather-by-month button.weather-month-btn--in-range,
.weather-month-btn--in-range {
  background: rgba(95, 168, 134, 0.22) !important;
  color: #1f5138 !important;
  border-radius: 0;
}
html[data-theme="dark"] .weather-month-btn--in-range,
body[data-theme="dark"] .weather-month-btn--in-range {
  background: rgba(95, 168, 134, 0.32) !important;
  color: #ffffff !important;
}

.weather-by-month button.weather-month-btn--active,
.weather-month-btn--active {
  background: #5FA886 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(95, 168, 134, 0.35) !important;
  transform: translateY(-1px);
  border-radius: 0 !important;
}
.weather-by-month button.weather-month-btn--active:hover,
.weather-month-btn--active:hover {
  background: #4e9173 !important;
  color: #ffffff !important;
}

/* Clear button (dates + countries) — soft outlined pill */
.weather-month-clear-wrap {
  display: flex;
  justify-content: center;
  margin: 20px 0 28px;
}
.weather-by-month--single-country .weather-month-clear-wrap {
  margin: 22px 0 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}
html[data-theme="dark"] .weather-by-month--single-country .weather-month-clear-wrap,
body[data-theme="dark"] .weather-by-month--single-country .weather-month-clear-wrap {
  border-top-color: rgba(229, 231, 235, 0.12);
}
.weather-by-month button.weather-clear-btn,
.weather-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #9b2c2c !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.28) !important;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  box-shadow: none !important;
}
.weather-by-month button.weather-clear-btn:hover,
.weather-clear-btn:hover {
  background: rgba(239, 68, 68, 0.14) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  color: #7f1d1d !important;
  transform: translateY(-1px);
}
.weather-by-month button.weather-clear-btn:focus-visible,
.weather-clear-btn:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.45);
  outline-offset: 2px;
}
.weather-clear-btn svg {
  flex-shrink: 0;
}
html[data-theme="dark"] .weather-clear-btn,
body[data-theme="dark"] .weather-clear-btn {
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.14) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}
html[data-theme="dark"] .weather-clear-btn:hover,
body[data-theme="dark"] .weather-clear-btn:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
  color: #fecaca !important;
}

/* Mobile: wrap to two rows of six */
@media (max-width: 560px) {
  .weather-by-month {
    padding: 16px 12px;
  }
  .weather-month-selector {
    grid-template-columns: repeat(6, 1fr);
  }
  .weather-month-btn {
    padding: 10px 4px;
    font-size: 12px;
  }
  .weather-countries-grid {
    grid-template-columns: 1fr;
  }
  .weather-country-card {
    min-width: 0;
    max-width: 100%;
  }
  .weather-by-month button.weather-country-header,
  .weather-country-header {
    padding: 14px 14px;
  }
  .weather-regions {
    padding: 0 14px 14px;
  }
  .weather-by-month--single-country .weather-regions {
    grid-template-columns: 1fr;
    padding: 12px;
  }
}

/* Month Selector Banner — prominent guidance */
.weather-month-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto 16px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.weather-month-banner-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.weather-month-banner-text {
  color: inherit;
}

.weather-month-banner-text strong {
  font-weight: 700;
}

.weather-month-banner--initial {
  background: linear-gradient(135deg, rgba(95, 168, 134, 0.12) 0%, rgba(95, 168, 134, 0.06) 100%);
  border: 2px dashed rgba(95, 168, 134, 0.5);
  color: #2d6a4f;
}

.weather-month-banner--pick-second {
  background: linear-gradient(135deg, #5FA886 0%, #488f6e 100%);
  border: 2px solid transparent;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(95, 168, 134, 0.35);
  animation: weather-banner-pulse 2s ease-in-out infinite;
}

.weather-month-banner--range-done {
  background: rgba(45, 106, 79, 0.1);
  border: 2px solid rgba(45, 106, 79, 0.3);
  color: #2d6a4f;
}

@keyframes weather-banner-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(95, 168, 134, 0.35); }
  50%      { box-shadow: 0 4px 22px rgba(95, 168, 134, 0.6); }
}

/* When waiting for second click — emphasize unselected buttons */
.weather-month-selector--awaiting .weather-month-btn:not(.weather-month-btn--active) {
  animation: weather-btn-glow 2s ease-in-out infinite;
  border-color: rgba(95, 168, 134, 0.6);
}

@keyframes weather-btn-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(95, 168, 134, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(95, 168, 134, 0.18); }
}

@media (prefers-reduced-motion: reduce) {
  .weather-month-banner--pick-second,
  .weather-month-selector--awaiting .weather-month-btn:not(.weather-month-btn--active) {
    animation: none;
  }
}

/* Rating Sections */
.weather-results {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.weather-rating-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weather-rating-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--calc-border, rgba(17, 24, 39, 0.15));
}

.weather-rating-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.weather-rating-badge--best { background: #2d6a4f; }
.weather-rating-badge--good { background: #3b82f6; }
.weather-rating-badge--ok { background: #ca8a04; }
.weather-rating-badge--avoid { background: #dc2626; }

/* Country Cards Grid */
.weather-countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.weather-by-month--single-country .weather-countries-grid {
  grid-template-columns: 1fr;
}
.weather-by-month--single-country .weather-country-card {
  width: 100%;
  max-width: 100%;
}
.weather-by-month--single-country .weather-regions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  padding: 16px;
}
.weather-by-month--single-country .weather-region {
  margin: 0;
}

/* Country Card */
.weather-country-card {
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.05), 0 4px 16px rgba(17, 24, 39, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.weather-country-card:hover {
  border-color: rgba(95, 168, 134, 0.55);
  box-shadow: 0 4px 14px rgba(95, 168, 134, 0.12), 0 2px 6px rgba(17, 24, 39, 0.05);
  transform: translateY(-1px);
}

html[data-theme="dark"] .weather-country-card,
body[data-theme="dark"] .weather-country-card {
  background: var(--mz-surface-2, #0f172a);
  border-color: rgba(229, 231, 235, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.weather-by-month button.weather-country-header,
.weather-country-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: 100%;
  font-family: inherit;
  color: inherit !important;
  text-align: right;
  transition: background 0.15s ease;
}
.weather-by-month button.weather-country-header:hover,
.weather-by-month button.weather-country-header:focus,
.weather-by-month button.weather-country-header:active,
.weather-country-header:hover,
.weather-country-header:focus,
.weather-country-header:active {
  background: rgba(95, 168, 134, 0.08) !important;
  color: inherit !important;
  outline: none !important;
}
.weather-by-month button.weather-country-header:hover .weather-country-name,
.weather-country-header:hover .weather-country-name {
  color: #2d6a4f !important;
}
html[data-theme="dark"] .weather-country-header:hover .weather-country-name,
body[data-theme="dark"] .weather-country-header:hover .weather-country-name {
  color: #8fd0a9 !important;
}

.weather-country-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
}
.weather-country-info-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.weather-country-note {
  margin: 0;
  font-size: 13px;
  font-style: normal;
  color: #6b7280;
  line-height: 1.4;
  text-align: right;
}
html[data-theme="dark"] .weather-country-note,
body[data-theme="dark"] .weather-country-note {
  color: #9ca3af;
}

.weather-country-name {
  font-size: 18px;
  font-weight: 700;
  color: #2d6a4f;
  margin: 0;
}
html[data-theme="dark"] .weather-country-name,
body[data-theme="dark"] .weather-country-name {
  color: #8fd0a9;
}

.weather-country-meta {
  font-size: 13px;
  color: #6b7280;
}
html[data-theme="dark"] .weather-country-meta,
body[data-theme="dark"] .weather-country-meta {
  color: #9ca3af;
}

.weather-expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
  color: #9ca3af;
}
html[data-theme="dark"] .weather-expand-icon,
body[data-theme="dark"] .weather-expand-icon {
  color: #9ca3af;
}

.weather-expand-icon--open {
  transform: rotate(180deg);
  color: #5FA886;
}

/* Regions Detail */
.weather-regions {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--calc-border, rgba(17, 24, 39, 0.15));
}

.weather-region {
  padding: 12px 0;
  border-bottom: 1px solid var(--calc-border, rgba(17, 24, 39, 0.08));
}

.weather-region:last-child {
  border-bottom: none;
}

.weather-region-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.weather-region-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--calc-text, #6b7280);
}

.weather-region-note {
  font-size: 14px;
  color: var(--calc-muted, #6b7280);
  margin: 0 0 8px 0;
  font-style: normal;
}

.weather-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.weather-city-tag,
.weather-by-month a.weather-city-tag,
.weather-by-month a.weather-city-tag:visited {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  background: rgba(95, 168, 134, 0.12) !important;
  color: #2d6a4f !important;
  border: 1px solid rgba(95, 168, 134, 0.25);
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
html[data-theme="dark"] .weather-city-tag,
html[data-theme="dark"] .weather-by-month a.weather-city-tag,
body[data-theme="dark"] .weather-city-tag,
body[data-theme="dark"] .weather-by-month a.weather-city-tag {
  background: rgba(95, 168, 134, 0.18) !important;
  color: #b9e4cc !important;
  border-color: rgba(95, 168, 134, 0.35);
}

/* Empty State */
.weather-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--calc-muted, #6b7280);
}

.weather-empty p {
  font-size: 16px;
  margin: 0;
}

/* Range Results — Per-Month Sections */
.weather-range-results {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.weather-month-section {
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.05);
}
html[data-theme="dark"] .weather-month-section,
body[data-theme="dark"] .weather-month-section {
  background: var(--mz-surface-2, #0f172a);
  border-color: rgba(229, 231, 235, 0.1);
}

.weather-month-section-header {
  margin: -20px -24px 20px;
  padding: 18px 24px;
  background: linear-gradient(135deg, #5FA886 0%, #4e9173 100%);
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(95, 168, 134, 0.25);
}
.weather-month-section-header::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 28px;
  background: #ffffff;
  border-radius: 2px;
}

.weather-month-section-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff !important;
  margin: 0;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

/* Source Link */
.weather-source-link {
  font-size: 13px;
  color: var(--calc-link, #5FA886);
  text-decoration: none;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  display: block;
}
html[data-theme="dark"] .weather-source-link,
body[data-theme="dark"] .weather-source-link {
  border-top-color: rgba(229, 231, 235, 0.1);
}

.weather-source-link:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 480px) {
  .weather-month-btn {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 60px;
  }

  .weather-header h2 {
    font-size: 22px;
  }

  .weather-country-name {
    font-size: 16px;
  }
}

/* =============================================================================
   Advanced Filters & Intro (Phase 4.1)
   ============================================================================= */

/* Intro */
.weather-intro {
  max-width: 700px;
  margin: 16px auto 24px;
  text-align: right;
  font-size: 15px;
  line-height: 1.6;
  background: #ffffff;
  padding: 18px 24px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.04);
}
html[data-theme="dark"] .weather-intro,
body[data-theme="dark"] .weather-intro {
  background: var(--mz-surface-2, #0f172a);
  border-color: rgba(229, 231, 235, 0.1);
}

.weather-intro p {
  margin: 0 0 12px 0;
  color: var(--calc-text, #6b7280);
}

.weather-intro-context {
  margin: 16px 0 8px 0 !important;
  color: var(--calc-heading, #5FA886) !important;
  font-size: 15px;
}

.weather-intro-ratings {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weather-intro-ratings li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.weather-intro-ratings .weather-rating-badge {
  flex-shrink: 0;
  min-width: 72px;
  text-align: center;
  justify-content: center;
  display: inline-flex;
  padding: 4px 10px;
}

/* Country Filters (chip-based) */
.weather-country-filters {
  margin: 24px 0 28px;
  padding: 16px 18px;
  background: rgba(95, 168, 134, 0.06);
  border: 1px solid rgba(95, 168, 134, 0.18);
  border-radius: 14px;
}
html[data-theme="dark"] .weather-country-filters,
body[data-theme="dark"] .weather-country-filters {
  background: rgba(95, 168, 134, 0.1);
  border-color: rgba(95, 168, 134, 0.25);
}
.weather-country-filters-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #2d6a4f;
}
html[data-theme="dark"] .weather-country-filters-title,
body[data-theme="dark"] .weather-country-filters-title {
  color: #8fd0a9;
}
.weather-country-filters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.weather-by-month button.weather-country-chip,
.weather-country-chip {
  padding: 7px 14px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(95, 168, 134, 0.35) !important;
  background: #ffffff !important;
  color: #2d6a4f !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  box-shadow: none !important;
  text-shadow: none !important;
}
.weather-by-month button.weather-country-chip:hover,
.weather-country-chip:hover {
  background: rgba(95, 168, 134, 0.12) !important;
  color: #2d6a4f !important;
}
.weather-by-month button.weather-country-chip--active,
.weather-country-chip--active {
  background: #5FA886 !important;
  color: #ffffff !important;
  border-color: #5FA886 !important;
}
.weather-by-month button.weather-country-chip--active:hover,
.weather-country-chip--active:hover {
  background: #4e9173 !important;
  color: #ffffff !important;
}
.weather-country-chip--clear {
  border-style: dashed !important;
  color: #6b7280 !important;
}
html[data-theme="dark"] .weather-by-month button.weather-country-chip,
body[data-theme="dark"] .weather-by-month button.weather-country-chip,
html[data-theme="dark"] .weather-country-chip,
body[data-theme="dark"] .weather-country-chip {
  background: transparent !important;
  color: #8fd0a9 !important;
  border-color: rgba(143, 208, 169, 0.4) !important;
}
html[data-theme="dark"] .weather-by-month button.weather-country-chip:hover,
body[data-theme="dark"] .weather-by-month button.weather-country-chip:hover,
html[data-theme="dark"] .weather-country-chip:hover,
body[data-theme="dark"] .weather-country-chip:hover {
  background: rgba(95, 168, 134, 0.18) !important;
  color: #a8dcbe !important;
  border-color: rgba(143, 208, 169, 0.6) !important;
}
html[data-theme="dark"] .weather-by-month button.weather-country-chip--active,
body[data-theme="dark"] .weather-by-month button.weather-country-chip--active,
html[data-theme="dark"] .weather-country-chip--active,
body[data-theme="dark"] .weather-country-chip--active {
  background: #5FA886 !important;
  color: #ffffff !important;
  border-color: #5FA886 !important;
  box-shadow: 0 0 0 2px rgba(95, 168, 134, 0.35) !important;
}
html[data-theme="dark"] .weather-by-month button.weather-country-chip--active:hover,
body[data-theme="dark"] .weather-by-month button.weather-country-chip--active:hover,
html[data-theme="dark"] .weather-country-chip--active:hover,
body[data-theme="dark"] .weather-country-chip--active:hover {
  background: #6fb896 !important;
  color: #ffffff !important;
  border-color: #6fb896 !important;
}

/* Country Breakdown (no-month view) */
.weather-country-breakdowns {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}
.weather-country-breakdown {
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.05);
}
html[data-theme="dark"] .weather-country-breakdown,
body[data-theme="dark"] .weather-country-breakdown {
  background: var(--mz-surface-2, #0f172a);
  border-color: rgba(229, 231, 235, 0.1);
}
.weather-country-breakdown-header {
  padding: 18px 22px;
  background: linear-gradient(135deg, #5FA886 0%, #4e9173 100%);
  display: flex;
  align-items: center;
  gap: 12px;
}
.weather-country-breakdown-header::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 26px;
  background: #ffffff;
  border-radius: 2px;
}
.weather-country-breakdown-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff !important;
  margin: 0;
  letter-spacing: -0.3px;
}
.weather-country-breakdown-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.weather-breakdown-region {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.1);
}
.weather-breakdown-region:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
html[data-theme="dark"] .weather-breakdown-region,
body[data-theme="dark"] .weather-breakdown-region {
  border-bottom-color: rgba(229, 231, 235, 0.1);
}
.weather-breakdown-region-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}
.weather-breakdown-region-name,
.weather-by-month a.weather-breakdown-region-name {
  font-size: 16px;
  font-weight: 700;
  color: #2d6a4f !important;
  text-decoration: none !important;
}
html[data-theme="dark"] .weather-breakdown-region-name,
body[data-theme="dark"] .weather-breakdown-region-name {
  color: #8fd0a9 !important;
}
.weather-breakdown-region-cities {
  font-size: 12px;
  color: #6b7280;
}
html[data-theme="dark"] .weather-breakdown-region-cities,
body[data-theme="dark"] .weather-breakdown-region-cities {
  color: #9ca3af;
}
.weather-breakdown-region-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.weather-breakdown-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.weather-breakdown-row .weather-rating-badge {
  flex-shrink: 0;
  min-width: 80px;
  text-align: center;
  justify-content: center;
  display: inline-flex;
  margin-top: 3px;
}
.weather-breakdown-months {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.weather-breakdown-month-chip {
  padding: 6px 12px;
  background: rgba(95, 168, 134, 0.1);
  color: #2d6a4f;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
html[data-theme="dark"] .weather-breakdown-month-chip,
body[data-theme="dark"] .weather-breakdown-month-chip {
  background: rgba(95, 168, 134, 0.2);
  color: #8fd0a9;
}

/* Geographic Region Filters (legacy) */
.weather-geo-filters {
  margin-bottom: 32px;
  padding: 0 8px;
}

.weather-geo-filters-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--calc-heading, #5FA886);
}

.weather-geo-filters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.weather-geo-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
  transition: all 0.2s ease;
  user-select: none;
}
html[data-theme="dark"] .weather-geo-filter-label,
body[data-theme="dark"] .weather-geo-filter-label {
  background: var(--mz-surface-2, #0f172a);
  border-color: rgba(229, 231, 235, 0.12);
}

.weather-geo-filter-label:hover {
  border-color: var(--calc-link, #5FA886);
}

.weather-geo-filter-label input[type="checkbox"] {
  accent-color: var(--calc-link, #5FA886);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.weather-geo-filter-text {
  font-size: 14px;
  color: var(--calc-text, #6b7280);
  line-height: 1.2;
}

.weather-geo-filter-text strong {
  color: var(--calc-heading, #5FA886);
}

/* Region name link — force mizrahnik green even when wrapped in global <a> color rules */
.weather-by-month a.weather-region-name-link,
.weather-by-month a.weather-region-name-link:visited {
  text-decoration: none !important;
  color: inherit !important;
  position: relative;
}
.weather-by-month a.weather-region-name-link .weather-region-name {
  color: #2d6a4f !important;
  transition: color 0.18s ease;
}
.weather-by-month a.weather-region-name-link:hover .weather-region-name {
  color: #1f5138 !important;
  text-decoration: underline;
}
html[data-theme="dark"] .weather-by-month a.weather-region-name-link .weather-region-name,
body[data-theme="dark"] .weather-by-month a.weather-region-name-link .weather-region-name {
  color: #8fd0a9 !important;
}

/* City link hover — dark green background, white text */
.weather-by-month a.weather-city-link:hover,
.weather-by-month a.weather-city-tag.weather-city-link:hover {
  background: #5FA886 !important;
  border-color: #5FA886 !important;
  color: #ffffff !important;
}

/* Source link — consistent green */
.weather-by-month a.weather-source-link,
.weather-by-month a.weather-source-link:visited {
  color: #2d6a4f !important;
}
html[data-theme="dark"] .weather-by-month a.weather-source-link,
body[data-theme="dark"] .weather-by-month a.weather-source-link {
  color: #8fd0a9 !important;
}

.weather-cities-prefix {
  font-size: 12px;
  font-weight: 600;
  color: var(--calc-text, #6b7280);
  align-self: center;
}

