/* Sidhuvudets hub-rad. Ligger utanför home-page.css eftersom headern finns på alla sidor. */
/* Header utility bar */
.site-header--hub {
  --hub-bg: #ffffff;
  --hub-panel: #f9f9f9;
  --hub-text: #1a1a1a;
  --hub-muted: #5f6b7a;
  --hub-accent: #ff6600;
  --hub-accent-text: #bf4a00;
  --hub-border: rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .site-header--hub {
  --hub-bg: var(--region-bg, #1a1a1a);
  --hub-panel: var(--region-bg-elevated, #2d2d2d);
  --hub-text: var(--region-text, #e5e5e5);
  --hub-muted: var(--region-text-muted, #a3a3a3);
  --hub-accent: var(--region-primary, #f97316);
  --hub-accent-text: var(--region-primary, #fb923c);
  --hub-border: var(--region-border, #404040);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .site-header--hub,
  body:not([data-theme="light"]) .site-header--hub {
    --hub-bg: var(--region-bg, #1a1a1a);
    --hub-panel: var(--region-bg-elevated, #2d2d2d);
    --hub-text: var(--region-text, #e5e5e5);
    --hub-muted: var(--region-text-muted, #a3a3a3);
    --hub-accent: var(--region-primary, #f97316);
    --hub-border: var(--region-border, #404040);
  }
}

.site-header--hub .header-utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem clamp(0.75rem, 2vw, 1.25rem);
  font-size: 0.8125rem;
  color: var(--hub-muted, #5f6b7a);
  border-bottom: 1px solid var(--hub-border, rgba(15, 23, 42, 0.08));
  background: var(--hub-bg, #fff);
}

.site-header--hub .header-utility-bar__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.site-header--hub .header-utility-bar__link {
  color: inherit;
  text-decoration: none;
}

.site-header--hub .header-utility-bar__link:hover {
  color: var(--hub-accent, #ff6600);
}

.site-header--hub .header-utility-bar__tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header--hub .header-search--utility {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-header--hub .header-search--utility .header-search__input {
  width: min(12rem, 28vw);
  font-size: 0.8125rem;
  background: var(--hub-panel, #f9f9f9);
  color: var(--hub-text, #1a1a1a);
  border-color: var(--hub-border, rgba(15, 23, 42, 0.08));
}

@media (max-width: 1024px) {
  .site-header--hub .header-utility-bar {
    display: none;
  }
}

.site-header--hub .main-nav-bar {
  background-color: var(--hub-bg, #fff);
  border-color: var(--hub-border, rgba(15, 23, 42, 0.08));
  color: var(--hub-text, #1a1a1a);
}

@media (max-width: 1024px) {
  .site-header--hub .main-nav-bar {
    background-color: color-mix(in srgb, var(--hub-bg, #111) 42%, transparent 58%);
    border-color: color-mix(in srgb, var(--hub-border, rgba(15, 23, 42, 0.08)) 40%, transparent 60%);
    box-shadow: none;
  }
}

.site-header--hub .main-nav-bar .nav-list a {
  color: var(--hub-text, #1a1a1a);
}

.site-header--hub .main-nav-bar .nav-list a:hover {
  background-color: color-mix(in srgb, var(--hub-accent, #ff6600) 10%, var(--hub-panel, #f9f9f9) 90%);
}

.site-header--hub .main-nav-bar .header-search__input {
  background: var(--hub-panel, #f9f9f9);
  color: var(--hub-text, #1a1a1a);
  border-color: var(--hub-border, rgba(15, 23, 42, 0.08));
}

.site-header--hub .main-nav-bar .theme-toggle {
  color: var(--hub-text, #1a1a1a);
  border-color: var(--hub-border, rgba(15, 23, 42, 0.08));
}

@media (min-width: 1025px) {
  .site-header--hub .main-nav-bar .theme-toggle--desktop {
    background: color-mix(in srgb, var(--hub-panel, #f9f9f9) 82%, var(--hub-accent, #ff6600) 6%);
    color: color-mix(in srgb, var(--hub-text, #1a1a1a) 78%, transparent);
    border-color: var(--hub-border, rgba(15, 23, 42, 0.1));
    box-shadow: none;
  }

  .site-header--hub .main-nav-bar .theme-toggle--desktop:hover,
  .site-header--hub .main-nav-bar .theme-toggle--desktop:focus-visible {
    color: var(--hub-text, #1a1a1a);
    border-color: color-mix(in srgb, var(--hub-accent, #ff6600) 40%, var(--hub-border, rgba(15, 23, 42, 0.1)));
    background: color-mix(in srgb, var(--hub-accent, #ff6600) 12%, var(--hub-panel, #f9f9f9) 88%);
  }
}

.header-weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--hub-panel, #f9f9f9);
  color: var(--hub-text, #1a1a1a);
  text-decoration: none;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.site-header--hub .nav-list--desktop {
  display: none;
}

@media (min-width: 1025px) {
  .site-header--hub .nav-list--desktop {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.15rem 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0.5rem clamp(0.75rem, 2vw, 1.25rem);
    background: var(--hub-bg, #fff);
    border-bottom: 1px solid var(--hub-border, rgba(15, 23, 42, 0.08));
    color: var(--hub-text, #1a1a1a);
  }

  .site-header--hub .nav-container .nav-list {
    display: none;
  }

  .site-header--hub .nav-list--desktop a {
    color: var(--hub-text, #1a1a1a);
  }

  .site-header--hub .nav-list--desktop .nav-list__link--active,
  .site-header--hub .nav-list--desktop .nav-list__item--active a {
    color: var(--hub-accent-text, var(--hub-accent, #ff6600));
    box-shadow: inset 0 -2px 0 var(--hub-accent, #ff6600);
  }
}
