/* Modern Weather Dashboard Styles */
.weather-dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  min-height: auto;
  border-radius: 1.5rem;
  overflow: visible;
}

/* Header */
.wd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.wd-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.wd-last-update {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

/* Tabs */
.wd-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  overflow: visible;
}

.wd-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.wd-tab-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.wd-tab-btn.active {
  color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.wd-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px 3px 0 0;
}

.wd-tab-icon {
  font-size: 1.25rem;
}

.wd-tab-content {
  display: none;
}

.wd-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Controls */
.wd-controls {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
  align-items: center;
}

.wd-control-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wd-control-group label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.wd-range-btn,
.wd-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wd-range-btn:hover,
.wd-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.wd-range-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  color: white;
}

.wd-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  color: white;
}

.wd-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wd-date-input,
.wd-select {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  background: white;
  color: #374151;
  transition: border-color 0.2s ease;
}

.wd-date-input:focus,
.wd-select:focus {
  outline: none;
  border-color: #667eea;
}

/* Grid Layout */
.wd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

/* Cards */
.wd-card {
  background: white;
  border-radius: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.wd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.wd-card-main {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.wd-chart-card {
  height: 400px;
  max-height: 400px;
}

/* Chart container wrapper */
.wd-chart-container {
  position: relative;
  height: 300px;
  width: 100%;
  flex: 1;
  min-height: 0;
  max-height: 300px;
}

.wd-chart-card .wd-chart-container {
  height: 330px;
  max-height: 330px;
}

/* Ensure canvas respects container */
.wd-card canvas {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Cards with charts should have fixed height - exclude main card, daily, and record cards */
.wd-card:not(.wd-card-main):not(.wd-daily-card):not(.wd-record-card) {
  height: 350px;
  max-height: 350px;
  overflow: hidden;
}

.wd-card-header {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Fullscreen icon in chart headers */
.wd-chart-fullscreen-btn {
  margin-left: auto;           /* push to the right edge of header */
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  color: #9ca3af;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wd-chart-fullscreen-btn:hover {
  color: #4b5563;
  background: rgba(148, 163, 184, 0.18);
}

.wd-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Current Conditions */
.wd-current-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.wd-current-temp-block {
  flex: 2 1 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wd-current-temp-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.wd-current-temp {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* Container for the metric pills */
.wd-current-secondary {
  display: flex;
  flex-wrap: wrap;       /* Allows items to flow to next line on mobile */
  gap: 0.75rem;          /* Space between items */
  align-items: stretch;  /* CRITICAL: Forces all items in a row to be the same height */
  font-size: 0.95rem;
  color: #4b5563;
  font-weight: 500;
}

/* The individual metric pills (Feels like, Pressure, Dew Point, etc) */
.wd-current-secondary span {
  display: inline-flex;    /* Makes the pill a flex container */
  align-items: center;     /* Vertically centers the text */
  justify-content: center; /* Horizontally centers the text */
  padding: 0.5rem 1rem;
  background: rgba(102, 126, 234, 0.08);
  border-radius: 0.5rem;
  
  /* FIX FOR MOBILE STRETCHING: */
  white-space: nowrap;     /* Prevents text from breaking into 2 lines */
  line-height: 1.2;        /* Ensures consistent height calculation */
  height: auto;            /* Allows 'align-items: stretch' to control the height */
}

.wd-wind-block {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.wd-wind-compass {
  position: relative;
  width: 110px;
  height: 110px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 999px;
  border: 3px solid #e5e7eb;
  background: radial-gradient(circle at center, #f9fafb 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wd-wind-compass-label {
  position: absolute;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
}

.wd-wind-n { top: 6px; left: 50%; transform: translateX(-50%); }
.wd-wind-s { bottom: 6px; left: 50%; transform: translateX(-50%); }
.wd-wind-e { right: 6px; top: 50%; transform: translateY(-50%); }
.wd-wind-w { left: 6px; top: 50%; transform: translateY(-50%); }

.wd-wind-arrow {
  --angle: 0deg;
  position: absolute;
  width: 4px;
  height: 80px; /* spans almost the full compass */
  top: 50%;
  left: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 999px;
  transform-origin: 50% 50%; /* rotate around the center */
  transform: translate(-50%, -50%) rotate(var(--angle));
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wd-wind-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
  transform: translate(-50%, -50%);
  z-index: 2;
}

.wd-wind-arrow::after {
  content: "";
  position: absolute;
  top: -4px;                 /* arrow head at one end of the full needle */
  left: 50%;
  transform: translateX(-50%);
  border-style: solid;
  border-width: 0 8px 10px 8px;
  border-color: transparent transparent #764ba2 transparent;
}

.wd-wind-text {
  font-size: 0.95rem;
  color: #4b5563;
}

.wd-wind-main {
  font-weight: 700;
  font-size: 1.1rem;
  color: #111827;
}

.wd-wind-gust {
  font-size: 0.875rem;
  color: #6b7280;
}

.wd-current-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 0.75rem;
}

.wd-current-extra span {
  padding: 0.5rem 1rem;
  background: white;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wd-current-extra .wd-pm-pill,
.wd-current-extra .wd-uv-pill {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.wd-current-time {
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: right;
  margin-top: auto;
}

/* Inner wind info card inside current conditions */
.wd-wind-card {
  background: #ffffff;
  border-radius: 0.9rem;
  padding: 1.0rem 1.0rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 0;
  max-width: 320px;
}

.wd-wind-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

.wd-wind-card .wd-wind-block {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Pills & Badges */
.wd-aq-pill,
.wd-uv-pill,
.wd-pm-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.wd-aq-good { background: #a5f3fc; color: #0f766e; }
.wd-aq-fair { background: #bbf7d0; color: #166534; }
.wd-aq-moderate { background: #facc15; color: #713f12; }
.wd-aq-poor { background: #f97316; color: #7c2d12; }
.wd-aq-verypoor { background: #ef4444; color: #7f1d1d; }
.wd-aq-extremelypoor { background: #7e22ce; color: #f5f3ff; }

.wd-pressure-trend {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 1.2em;
  line-height: 1;
}

.wd-pressure-up { }
.wd-pressure-down { }
.wd-pressure-steady { }

/* Daily Summary */
.wd-daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.wd-daily-card {
  background: white;
  border-radius: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wd-daily-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.wd-daily-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.wd-daily-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.wd-daily-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wd-daily-metric {
  padding: 0.75rem;
  background: rgba(102, 126, 234, 0.03);
  border-radius: 0.75rem;
  border-left: 3px solid #667eea;
}

.wd-metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.wd-metric-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.wd-metric-values span {
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.wd-max {
  background: #fee2e2;
  color: #991b1b;
}

.wd-avg {
  background: #dbeafe;
  color: #1e40af;
}

.wd-min {
  background: #d1fae5;
  color: #065f46;
}

.wd-gust {
  background: #e9d5ff;
  color: #6b21a8;
}

.wd-rain {
  background: #bfdbfe;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 1rem !important;
}

.wd-daily-footer {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: right;
}

/* Records */
.wd-records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.wd-record-card {
  background: white;
  border-radius: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wd-record-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.wd-record-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.wd-record-content {
  flex: 1;
}

.wd-record-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.wd-record-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wd-record-date {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Empty State */
.wd-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
  font-size: 1.1rem;
  background: white;
  border-radius: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* -------- Chart Fullscreen Modal -------- */

.wd-chart-modal-overlay {
  position: fixed;
  inset: 0;
  background: transparent;        /* keep no dim; change if you want */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.wd-chart-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  background: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);

  box-sizing: border-box;
  width: 90vw;            /* mobile-friendly width */
  max-width: 90vw;
  height: 70vh;           /* mobile-friendly height */
  max-height: 70vh;

  padding: 1rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wd-chart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.wd-chart-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.wd-chart-modal-close {
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 0 0.25rem;
}

.wd-chart-modal-close:hover {
  color: #111827;
}

.wd-chart-modal-body {
  flex: 1;
  min-height: 0;                  /* let it use all available vertical space */
  max-height: calc(70vh - 3rem);  /* header + padding */
}

.wd-chart-modal-body canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block;
}

/* --- Force fullscreen chart on desktop --- */
@media (min-width: 1025px) {
  .wd-chart-modal {
    width: 69vw;     /* desktop width */
    max-width: 69vw;
    height: 60vh;    /* desktop height */
    max-height: 60vh;
    padding: 1rem 2rem 1.5rem; /* desktop padding */
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .wd-grid {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  }
  
  .wd-card-main {
    grid-column: span 1;
  }
}

/* Mobile devices in landscape - single column + fullscreen chart */
@media (max-width: 900px) and (max-height: 600px) {
  .wd-grid {
    grid-template-columns: 1fr !important;
  }

  .wd-card-main {
    grid-column: span 1 !important;
  }

  /* Fullscreen chart: use virtually all screen space */
  .wd-chart-modal {
    position: fixed;                /* pin to viewport */
    top: 0;
    left: 0;
    transform: none;                /* no centering offset */

    width: 100vw;
    max-width: 100vw;
    height: 100vh;                  /* full vertical */
    max-height: 100vh;

    box-sizing: border-box;
    padding: 0.5rem 0.75rem 0.75rem;

    background: #ffffff;
    border-radius: 0;               /* optional: remove rounding for max area */
    box-shadow: none;

    display: flex;
    flex-direction: column;
  }

  .wd-chart-modal-body {
    flex: 1;
    min-height: 0;
    max-height: calc(100vh - 2.5rem);  /* header + padding */
  }

  .wd-chart-modal-body canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block;
  }
}

/* Mobile/tablet landscape: fullscreen chart with more vertical space */
@media (max-width: 900px) and (orientation: landscape) {
  .wd-chart-modal-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    display: block;
    z-index: 9999;
  }

  .wd-chart-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);   /* center popup */

    width: 95vw;                        /* ~5% less than full screen */
    max-width: 95vw;
    height: 95vh;                       /* ~5% less than full height */
    max-height: 95vh;

    box-sizing: border-box;
    padding: 0.5rem 0.75rem 0.75rem;

    background: #ffffff;
    border-radius: 1.25rem;             /* visible rounded corners */
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.4);

    display: flex;
    flex-direction: column;
  }

  .wd-chart-modal-body {
    flex: 1;
    min-height: 0;
    max-height: calc(95vh - 2.5rem);    /* header + padding */
  }
}

@media (max-width: 768px) {
  .weather-dashboard {
    padding: 1rem;
    border-radius: 1rem;
  }
  
  .wd-title {
    font-size: 2rem;
  }
  
  .wd-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .wd-tabs {
    overflow-x: auto;
    overflow-y: visible;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    margin-top: -0.75rem;
    /* Ensure buttons at edges aren't clipped */
    scroll-padding-left: 1rem;
    scroll-padding-right: 1rem;
    /* Hide scrollbar but keep functionality */
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  
  .wd-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .wd-tab-btn {
    white-space: nowrap;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    flex-shrink: 0;
    /* Ensure rounded corners and borders aren't clipped */
    position: relative;
    z-index: 1;
    /* Add space to prevent clipping of rounded corners */
    margin: 2px 0;
    box-shadow: none;
  }
  
  .wd-tab-btn:active,
  .wd-tab-btn.active {
    margin: 0;
    /* Ensure active button isn't clipped */
    transform: none;
  }
  
  /* Add spacing at the start and end of tabs for visual breathing room */
  .wd-tabs::before,
  .wd-tabs::after {
    content: '';
    flex-shrink: 0;
    width: 0.5rem;
  }
  
  .wd-grid {
    grid-template-columns: 1fr !important;
  }
  
  .wd-card-main {
    grid-column: span 1 !important;
  }
  
  .wd-current-main {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .wd-wind-block {
    width: 100%;
    justify-content: flex-start;
  }
  
  .wd-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .wd-control-group {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .wd-daily-grid,
  .wd-records-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .wd-current-temp {
    font-size: 3rem;
  }
  
  .wd-tab-icon {
    display: inline;      /* was: none */
    font-size: 1.1rem;    /* slightly smaller on narrow screens */
    margin-right: 0.25rem;    
  }

  /* Optional: On very small screens, slightly reduce padding to fit more */
  .wd-current-secondary span {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }
}