/*
 * Sidhuvud som på nordichair.com (app/sidhuvud.php, partials/header.blade.php)
 * Färger enligt NHC:s varumärkesmanual.
 */

.nhc-sidhuvud {
  --nhc-sh-midnight: #000f3f;
  --nhc-sh-bla: #002496;
  --nhc-sh-sky: #eff6ff;
  --nhc-sh-ljus: #fcfcfb;
  --nhc-sh-kant: rgba(0, 15, 63, 0.12);

  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0);
  z-index: 100;
  border-bottom: 1px solid var(--nhc-sh-kant);
  background: var(--nhc-sh-ljus);
  color: var(--nhc-sh-midnight);
  font-family: Montserrat, Arial, sans-serif;
}

/* Temats gamla sidhuvud var fixerat och innehållet hade marginal för det */
.main {
  margin-top: 0 !important;
}

.nhc-sidhuvud .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.nhc-sidhuvud__rad {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  padding: 10px 16px;
}

.nhc-sidhuvud__logga {
  grid-column: 2;
  display: block;
  line-height: 0;
}

.nhc-sidhuvud__logga img {
  width: auto;
  height: 44px;
}

.nhc-sidhuvud__meny,
.nhc-sidhuvud__meny .sub-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nhc-sidhuvud a {
  color: inherit;
  text-decoration: none;
}

/* Temat sätter eget typsnitt och fetstil på länkar och listor */
.nhc-sidhuvud a,
.nhc-sidhuvud button,
.nhc-sidhuvud li {
  font-family: Montserrat, Arial, sans-serif;
  letter-spacing: 0;
}

.nhc-sidhuvud .sub-menu a {
  font-weight: 500;
}

.nhc-sidhuvud__fall-ut {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: -2px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.nhc-sidhuvud__fall-ut svg {
  transition: transform 0.2s ease;
}

.nhc-sidhuvud .ar-oppen > .nhc-sidhuvud__fall-ut svg {
  transform: rotate(180deg);
}

/* Knappar: punkter i högermenyn som pills, "Boka tid" (CSS-klass nhc-knapp) fylld */

.nhc-sidhuvud__hoger {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nhc-sidhuvud__hoger .nhc-sidhuvud__meny {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nhc-sidhuvud__hoger .nhc-sidhuvud__meny > li > a,
.nhc-sidhuvud__ikon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--nhc-sh-kant);
  border-radius: 100vw;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nhc-sidhuvud__ikon {
  justify-content: center;
  width: 36px;
  padding: 0;
  color: var(--nhc-sh-midnight);
  cursor: pointer;
}

.nhc-sidhuvud__ikon svg {
  width: 18px;
  height: 18px;
}

.nhc-sidhuvud__ikon svg path {
  stroke: currentColor;
}

.nhc-sidhuvud__hoger .nhc-sidhuvud__meny > li > a:hover,
.nhc-sidhuvud__ikon:hover {
  border-color: var(--nhc-sh-bla);
}

.nhc-sidhuvud .nhc-knapp > a {
  border-color: var(--nhc-sh-bla) !important;
  background: var(--nhc-sh-bla) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.nhc-sidhuvud .nhc-knapp > a:hover {
  border-color: var(--nhc-sh-midnight) !important;
  background: var(--nhc-sh-midnight) !important;
}

.nhc-sidhuvud a:focus-visible,
.nhc-sidhuvud button:focus-visible {
  outline: 2px solid var(--nhc-sh-bla);
  outline-offset: 2px;
}

/* Mobil och surfplatta: hamburgare, centrerad logga, bara Boka tid till höger */

.nhc-sidhuvud__meny-knapp {
  grid-column: 1;
  justify-self: start;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--nhc-sh-kant);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.nhc-sidhuvud__streck,
.nhc-sidhuvud__streck::before,
.nhc-sidhuvud__streck::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--nhc-sh-midnight);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.nhc-sidhuvud__streck {
  position: relative;
}

.nhc-sidhuvud__streck::before,
.nhc-sidhuvud__streck::after {
  content: "";
  position: absolute;
  left: 0;
}

.nhc-sidhuvud__streck::before {
  top: -5px;
}

.nhc-sidhuvud__streck::after {
  top: 5px;
}

.nhc-sidhuvud__meny-knapp[aria-expanded="true"] .nhc-sidhuvud__streck {
  background: transparent;
}

.nhc-sidhuvud__meny-knapp[aria-expanded="true"] .nhc-sidhuvud__streck::before {
  transform: translateY(5px) rotate(45deg);
}

.nhc-sidhuvud__meny-knapp[aria-expanded="true"] .nhc-sidhuvud__streck::after {
  transform: translateY(-5px) rotate(-45deg);
}

.nhc-sidhuvud__vanster {
  display: none;
}

.nhc-sidhuvud__hoger .nhc-sidhuvud__ikon,
.nhc-sidhuvud__hoger .nhc-sidhuvud__meny > li:not(.nhc-knapp) {
  display: none;
}

.nhc-sidhuvud__mobil {
  max-height: calc(100vh - 74px - var(--wp-admin--admin-bar--height, 0px));
  overflow-y: auto;
  padding: 8px 16px 24px;
  border-top: 1px solid var(--nhc-sh-kant);
}

.nhc-sidhuvud__mobil[hidden] {
  display: none;
}

.nhc-sidhuvud__mobil .nhc-sidhuvud__meny > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--nhc-sh-kant);
}

.nhc-sidhuvud__mobil .nhc-sidhuvud__meny > li > a {
  flex: 1;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 500;
}

.nhc-sidhuvud__mobil .nhc-sidhuvud__fall-ut {
  width: 44px;
  height: 44px;
}

.nhc-sidhuvud__mobil .sub-menu {
  display: none;
  flex-basis: 100%;
  padding: 0 0 12px 12px;
}

.nhc-sidhuvud__mobil .ar-oppen > .sub-menu {
  display: block;
}

.nhc-sidhuvud__mobil .sub-menu a {
  display: block;
  padding: 8px 0;
  font-size: 15px;
}

.nhc-sidhuvud__mobil .nhc-knapp {
  margin-top: 16px;
  border-bottom: 0 !important;
}

.nhc-sidhuvud__mobil .nhc-knapp > a {
  justify-content: center;
  padding: 12px 20px !important;
  border-radius: 100vw;
  text-align: center;
}

/* Dator: menyerna på raden, undermenyer som paneler */

@media (min-width: 1200px) {
  .nhc-sidhuvud__rad {
    padding: 0 40px;
  }

  .nhc-sidhuvud__meny-knapp,
  .nhc-sidhuvud__mobil {
    display: none !important;
  }

  .nhc-sidhuvud__vanster {
    grid-column: 1;
    display: block;
  }

  .nhc-sidhuvud__hoger .nhc-sidhuvud__ikon,
  .nhc-sidhuvud__hoger .nhc-sidhuvud__meny > li:not(.nhc-knapp) {
    display: inline-flex;
  }

  .nhc-sidhuvud__vanster .nhc-sidhuvud__meny {
    display: flex;
    align-items: center;
    gap: 6px 18px;
  }

  .nhc-sidhuvud__vanster .nhc-sidhuvud__meny > li {
    position: relative;
    display: flex;
    align-items: center;
  }

  .nhc-sidhuvud__vanster .nhc-sidhuvud__meny > li > a {
    padding: 26px 0;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
  }

  .nhc-sidhuvud__vanster .nhc-sidhuvud__meny > li > a:hover {
    color: var(--nhc-sh-bla);
  }

  .nhc-sidhuvud__vanster .sub-menu {
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 240px;
    padding: 8px;
    border: 1px solid var(--nhc-sh-kant);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 15, 63, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  }

  .nhc-sidhuvud__vanster li:hover > .sub-menu,
  .nhc-sidhuvud__vanster li:focus-within > .sub-menu,
  .nhc-sidhuvud__vanster .ar-oppen > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nhc-sidhuvud__vanster .sub-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    white-space: nowrap;
  }

  .nhc-sidhuvud__vanster .sub-menu a:hover {
    background: var(--nhc-sh-sky);
    color: var(--nhc-sh-bla);
  }
}

/* Alla rubriker på sajten i Montserrat (NHC 2026-10-28). Temats main.css sätter Manrope på *,
   därför även på elementen inuti rubrikerna. Ikontypsnitt har klass och vinner ändå. */
h1, h2, h3, h4, h5, h6,
h1 *, h2 *, h3 *, h4 *, h5 *, h6 *,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: Montserrat, Arial, sans-serif;
}

/* Sidfoten: nyhetsbrevsknappen ligger rakt inuti e-postfältet (NHC 2026-10-29). Temat drar in den
   med margin-left -15rem och Gravity Forms ger den en toppmarginal, så den hamnade snett och stack ut. */
@media only screen and (min-width: 851px) {
  .subscribe-section #gform_1 {
    position: relative;
    width: 60%;
  }

  .subscribe-section #gform_1 .gform_body {
    width: 100%;
  }

  .subscribe-section #gform_1 .gform_footer {
    position: absolute;
    top: 4px;
    right: 4px;
    width: auto;
    height: 42px;
    margin: 0;
    padding: 0;
  }

  .subscribe-section #gform_1 .gform_footer input[type=submit] {
    height: 100%;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 42px;
  }
}
