/* DMK küpsiseriba ja seadete aken, UKSSERVi värvides. */
.cookie-bar {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: calc(20px + var(--mobile-call-space, 0px));
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .28);
  flex-wrap: wrap;
  max-height: calc(100dvh - 40px - var(--mobile-call-space, 0px));
  overflow-y: auto;
}

.cookie-msg {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 380px;
}

.cookie-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: #fff;
}

.cookie-text {
  margin: 0;
  color: #fff;
  font-size: .92rem;
  line-height: 1.55;
}

.cookie-text a {
  color: #fff;
  text-underline-offset: 3px;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-bar .btn {
  min-height: 42px;
  padding: .65rem 1rem;
}

.cookie-bar .cookie-btn--outline {
  border-color: rgba(255, 255, 255, .55);
  background: transparent;
  color: #fff;
}

.cookie-bar .cookie-btn--outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .08);
}

.cookie-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.footer-cookie-settings {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-cookie-settings:hover,
.footer-cookie-settings:focus-visible {
  color: #fff;
}

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

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .66);
  backdrop-filter: blur(3px);
}

.cookie-modal__panel {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(760px, calc(100dvh - 48px));
  overflow: auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .26);
  min-width: 0;
  overscroll-behavior: contain;
}

.cookie-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-modal__close:hover,
.cookie-modal__close:focus-visible {
  border-color: var(--orange);
  color: var(--orange);
}

.cookie-modal__head {
  padding-right: 46px;
}

.cookie-modal__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--orange);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.cookie-modal__head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.15;
}

.cookie-modal__head p,
.cookie-category p,
.cookie-modal__privacy {
  color: var(--muted);
  line-height: 1.6;
}

.cookie-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.cookie-category h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.cookie-category p {
  margin: 0;
  font-size: .92rem;
}

.cookie-category__state {
  white-space: nowrap;
  font-size: .84rem;
  font-weight: 800;
}

.cookie-category__state--locked {
  color: var(--orange);
}

.cookie-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.cookie-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-switch__track {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #b8b8b8;
  transition: background .2s ease;
}

.cookie-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .2);
  transition: transform .2s ease;
}

.cookie-switch input:checked + .cookie-switch__track {
  background: var(--orange);
}

.cookie-switch input:checked + .cookie-switch__track .cookie-switch__thumb {
  transform: translateX(24px);
}

.cookie-switch input:focus-visible + .cookie-switch__track {
  outline: 3px solid rgba(242, 78, 0, .3);
  outline-offset: 3px;
}

.cookie-modal__privacy {
  margin: 18px 0 0;
  font-size: .88rem;
}

.cookie-modal__privacy a {
  color: var(--orange);
  font-weight: 700;
}

.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.cookie-modal-open {
  overflow: hidden;
}

.cookie-category__copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cookie-btn--outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.cookie-btn--outline:hover {
  background: #f4f4f4;
  border-color: var(--ink);
}

.cookie-status {
  flex-basis: 100%;
  margin: 0;
  font-size: .8rem;
  line-height: 1.5;
}

.cookie-status:empty {
  display: none;
}

.foot__legal {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: center;
  min-width: 0;
}

@media (max-width: 760px) {
  .cookie-bar {
    left: 14px;
    right: 14px;
    bottom: calc(14px + var(--mobile-call-space, 0px));
    width: calc(100% - 28px);
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    max-height: calc(100dvh - 28px - var(--mobile-call-space, 0px));
  }

  .cookie-msg {
    align-items: flex-start;
    flex-basis: auto;
  }

  .cookie-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .cookie-actions .btn {
    width: 100%;
  }

  .cookie-modal {
    align-items: end;
    padding: 12px;
  }

  .cookie-modal__panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 24px 18px 18px;
    border-radius: 22px;
  }

  .cookie-modal__head {
    padding-right: 38px;
  }

  .cookie-category {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px 0;
  }

  .cookie-category__state--locked {
    max-width: 88px;
    white-space: normal;
    text-align: right;
  }

  .cookie-modal__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-modal__actions .btn {
    width: 100%;
  }

  .cookie-actions .btn:last-child {
    grid-column: 1 / -1;
  }

}
