/*
 * Bits samtykke. Temaet kan tilpasse med CSS-variablene under (settes på :root eller .bits-cookie-consent);
 * uten dem brukes temaets --color-primary1 og --font-default når de finnes.
 */
.bits-cookie-consent {
  --bcc-accent: var(--bits-cookie-consent-accent, var(--color-primary1, #171a2c));
  --bcc-accent-text: var(--bits-cookie-consent-accent-text, #fff);
  --bcc-text: var(--bits-cookie-consent-text, #1b1b1b);
  --bcc-background: var(--bits-cookie-consent-background, #fff);
  --bcc-border: var(--bits-cookie-consent-border, rgba(0, 0, 0, 0.12));
  --bcc-on: var(--bits-cookie-consent-switch-on, #2f8f46);
  --bcc-radius: var(--bits-cookie-consent-radius, 8px);

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
  font-family: var(--bits-cookie-consent-font, var(--font-default, inherit));
  color: var(--bcc-text);
}

.bits-cookie-consent[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .bits-cookie-consent {
    align-items: center;
  }
}

.bits-cookie-consent__dialog {
  box-sizing: border-box;
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem;
  border-radius: var(--bcc-radius);
  background: var(--bcc-background);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  outline: none;
}

@media (min-width: 768px) {
  .bits-cookie-consent__dialog {
    padding: 2.5rem;
  }
}

.bits-cookie-consent__title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 600;
  color: inherit;
}

.bits-cookie-consent__text {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.bits-cookie-consent__link {
  color: inherit;
  text-decoration: underline;
}

.bits-cookie-consent__options {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
}

.bits-cookie-consent__options[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .bits-cookie-consent__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bits-cookie-consent__option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--bcc-border);
  border-radius: var(--bcc-radius);
  cursor: pointer;
  position: static;
  height: auto;
  font-size: 0.95rem;
}

.bits-cookie-consent__option-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.bits-cookie-consent__option-name {
  font-weight: 600;
}

.bits-cookie-consent__option-hint {
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.8;
}

/* Bryter i stedet for avkrysningsboks */
.bits-cookie-consent__switch {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  position: relative;
  width: 44px;
  height: 24px;
  margin: 0.1rem 0 0;
  border: 0;
  border-radius: 12px;
  background: #8e8e8e;
  cursor: pointer;
  transition: background 0.2s;
}

.bits-cookie-consent__switch::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s;
}

.bits-cookie-consent__switch:checked {
  background: var(--bcc-on);
}

.bits-cookie-consent__switch:checked::before {
  left: 23px;
}

.bits-cookie-consent__switch:disabled {
  opacity: 0.55;
  cursor: default;
}

.bits-cookie-consent__switch:focus-visible {
  outline: 2px solid var(--bcc-accent);
  outline-offset: 2px;
}

.bits-cookie-consent__buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .bits-cookie-consent__buttons {
    flex-direction: row;
    justify-content: flex-end;
  }
}

.bits-cookie-consent__button {
  box-sizing: border-box;
  min-height: 46px;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--bcc-accent);
  border-radius: var(--bcc-radius);
  background: var(--bcc-accent);
  color: var(--bcc-accent-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-transform: none;
}

.bits-cookie-consent__button[hidden] {
  display: none;
}

.bits-cookie-consent__button--secondary {
  background: transparent;
  color: var(--bcc-accent);
}

.bits-cookie-consent__button:hover {
  opacity: 0.9;
}

.bits-cookie-consent__button:focus-visible {
  outline: 2px solid var(--bcc-accent);
  outline-offset: 2px;
}

html.bits-cookie-consent-is-open {
  overflow: hidden;
}
