.iframe-container {
    position: relative;
    z-index: 10;
    top: 0;
    width: 100%;
    background: #b33939;
    padding: 1em;
}

#pref-parent {
    display: flex;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.9);
    inset: 0;
    position: fixed;
    z-index: 1050;
}

body.cookie-pref-open {
    overflow: hidden;
}

#pref-container {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: min(100%, 31.25rem);
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: white;
    padding: 0 0.5rem;
}

#pref-section {
    padding: 1.25rem 1rem 0.5rem;
    text-align: start;
}

.pref-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.pref-heading h2,
.title-toggle h3 {
    margin-top: 0;
}

#close-pref-btn {
    background: transparent;
    border: 0;
    border-radius: 0.25rem;
    color: inherit;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    min-height: 2.75rem;
    min-width: 2.75rem;
    padding: 0;
}

#pref-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    background: white;
    position: sticky;
    bottom: 0;
    padding: 1rem;
    border: 1px solid lightgray;
}

#accept-all-pref-btn,
#reject-all-pref-btn,
#save-current-pref-btn {
    min-height: 2.75rem;
    padding: 0.75rem 1rem;
    border-radius: .35em;
    cursor: pointer;
}

#accept-all-pref-btn,
#reject-all-pref-btn {
    border: 0;
    color: white;
}

#accept-all-pref-btn {
    background: var(--primary-button, #004d44);
}

#reject-all-pref-btn {
    background: var(--danger-button, #b33939);
}

#save-current-pref-btn {
    background: white;
    border: 1px solid currentColor;
}

.cookie-sections {
    padding: 0.5rem 1rem;
    text-align: start;
}


#cookie-container {
    box-sizing: border-box;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) minmax(11rem, auto);
    background-color: white;
    position: fixed;
    max-width: 50em;
    margin: 0 auto 1.5rem;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    text-align: start;
    left: 1em;
    right: 1em;
    bottom: 0;
    padding: 1.5rem;
    width: unset;
    box-shadow: 0 0.625em 1.875em rgb(2 2 3 / 28%);
    z-index: 1040;
    border-radius: .35em;
    font: inherit;
    font-size: 1em;
}

#cookie-consent-title {
    margin-top: 0;
}

#cookie-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#accept-btn,
#reject-btn,
#preference-btn {
    min-height: 2.75rem;
    padding: 0.75rem 1rem;
    display: inline-block;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    border-radius: 4px;
}

#accept-btn,
#reject-btn {
    border: 0;
    color: white;
}

#accept-btn {
    background: var(--primary-button, #004d44);
}

#reject-btn{
    background: var(--danger-button, #b33939);
}

#preference-btn {
    background: white;
    border: 1px solid currentColor;
}

.title-toggle {
    display: flex;
    justify-content: space-between;
}


.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

/* CKAN appends ":" to every label; the toggle label is not a text label */
.switch:after {
  content: none;
}

.switch input {
  opacity: 0;
  width: 1px;
  height: 1px;
  position: absolute;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

.switch input:checked#necessary-toggle + .slider {
    background-color: var(--primary-button, #004d44);
    opacity: 0.5;
    cursor: not-allowed;
}

.switch input:disabled + .slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.switch input:checked + .slider {
  background-color: var(--primary-button, #004d44);
}

.switch input:focus-visible + .slider {
  outline: 3px solid var(--primary-button, #004d44);
  outline-offset: 3px;
}

.switch input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.blur-background {
    display: flex;
    flex-direction: column;
    background-image: url("/img/blur.jpg");
    justify-content: center;
    padding: 1em;
    color: white;
    width: 100%;
    min-height: 300px;
    height: 100%;
    text-align: center;
}

.consent-btn {
    margin-top: 1.5em;
    background-color: var(--primary-button, #004d44);
    color: white;
    padding: 0.3em 1em;
    border: none;
    border-radius: 0.3em;
}

.main-color {
    color: var(--primary-button, #004d44);
}


.cookie-page #hero-section {
    color: white;
    padding: 7% 5%;
    background: var(--primary-button-hover, rgba(0, 77, 68, 0.85));
}


.top-container {
    padding-top: 3em;
    padding-right: 5em;
    padding-left: 5em;
}

.general-container {
    padding: .7em 5em;
}

#cookie-container button:focus-visible,
#pref-container button:focus-visible,
#cookie-container a:focus-visible,
#pref-container a:focus-visible,
.consent-btn:focus-visible {
    outline: 3px solid var(--primary-button, #004d44);
    outline-offset: 3px;
}

@media (max-width: 575.98px) {
    #cookie-container {
        grid-template-columns: 1fr;
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        margin-bottom: 0;
        padding: 1rem;
    }

    #cookie-buttons,
    #pref-buttons {
        width: 100%;
    }

    #cookie-buttons button,
    #pref-buttons button {
        width: 100%;
    }

    #pref-parent {
        align-items: flex-end;
    }

    #pref-container {
        width: 100%;
        max-height: min(100dvh, 46rem);
        border-radius: 0.5rem 0.5rem 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .slider,
    .slider:before {
        transition: none;
    }
}
