.cookies-wrapper {
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  max-height: 100vh;
  padding: 20px 24px;
  overflow-y: auto;
  color: #282828;
  border-top: 1px solid #d8d8d8;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.1);
}

.cookies-wrapper .cookies {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 1200px);
  height: auto;
  align-items: stretch;
  justify-content: center;
  text-align: left;
}

.cookies-wrapper .cookies h2 {
  margin: 0;
  color: #282828;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.cookies-wrapper .cookies p {
  margin: 0;
  color: #4a4a4a;
  font-size: 14px;
  line-height: 1.4;
}

.cookies-wrapper .cookies p a {
  color: var(--site-accent-color, #005a73);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookies__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 8px;
}

.cookies-wrapper .cookies .accept-cookies,
.cookies-wrapper .cookies .reject-cookies,
.cookies-wrapper .cookies .customize-cookies {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 150px;
  min-height: 42px;
  padding: 9px 20px;
  border: 1px solid var(--site-accent-color, #005a73);
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
  line-height: 1.25;
  text-decoration: none;
}

.cookies-wrapper .cookies .accept-cookies {
  border-color: var(--site-accent-color, #005a73);
  background: var(--site-accent-color, #005a73);
  color: #fff;
}

.cookies-wrapper .cookies .reject-cookies {
  border-color: #dedede;
  background: #e8e8e8;
  color: #3f3f3f;
}

.cookies-wrapper .cookies .customize-cookies {
  width: auto;
  min-width: 190px;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--site-accent-color);
  border-radius: 20px;
  cursor: pointer;
  background: #fff;
  color: var(--site-accent-color);
  filter: brightness(0.92);
  text-transform: uppercase;
}

.cookies-wrapper .cookies .accept-cookies:hover,
.cookies-wrapper .cookies .reject-cookies:hover,
.cookies-wrapper .cookies .customize-cookies:hover {
  filter: brightness(0.92);
}

.cookies-wrapper .cookies .accept-cookies:focus-visible,
.cookies-wrapper .cookies .reject-cookies:focus-visible,
.cookies-wrapper .cookies .customize-cookies:focus-visible,
.cookies-wrapper .cookies p a:focus-visible,
.cookie-settings:focus-visible {
  outline: 3px solid var(--site-accent-color, #005a73);
  outline-offset: 3px;
}

.cookie-settings {
  margin-left: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
}

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

.cookies-wrapper .cookies[hidden] {
  display: none;
}

.cookies-wrapper.cookies-wrapper--modal-open {
  top: 0;
  height: 100%;
  max-height: none;
  padding: 0;
  overflow: visible;
  z-index: 10050;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.cookies-preferences-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(18, 70, 87, 0.55);
}

.cookies-preferences-modal__content {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 720px);
  max-height: calc(100vh - 40px);
  padding: 28px;
  overflow-y: auto;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fff;
  color: #282828;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

.cookies-preferences-modal__content h2 {
  margin: 0 40px 20px 0;
  font-size: 22px;
  line-height: 1.3;
}

.cookies-preferences-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: #282828;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.cookies-preferences-modal__category {
  padding: 20px 0;
  border-top: 1px solid #dedede;
}

.cookies-preferences-modal__category-heading {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.cookies-preferences-modal__category h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.cookies-preferences-modal__category p {
  margin: 0;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
}

.cookies-preferences-modal__category strong {
  flex: 0 0 auto;
  color: #237a35;
  font-size: 14px;
}

.cookies-switch {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 28px;
  cursor: pointer;
}

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

.cookies-switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: #bbb;
  transition: background-color 0.2s ease;
}

.cookies-switch__slider::before {
  position: absolute;
  bottom: 3px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  content: '';
  transition: transform 0.2s ease;
}

.cookies-switch input:checked + .cookies-switch__slider {
  background: var(--site-accent-color, #005a73);
}

.cookies-switch input:checked + .cookies-switch__slider::before {
  transform: translateX(20px);
}

.cookies-switch input:focus-visible + .cookies-switch__slider,
.cookies-preferences-modal__close:focus-visible,
.cookies-preferences-modal__actions button:focus-visible {
  outline: 3px solid var(--site-accent-color, #005a73);
  outline-offset: 3px;
}

.cookies-preferences-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.cookies-preferences-modal__actions button {
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--site-accent-color, #005a73);
  border-radius: 20px;
  cursor: pointer;
  font: inherit;
}

.cookies-preferences-modal__actions .accept-cookies {
  background: var(--site-accent-color, #005a73);
  color: #fff;
}

.cookies-preferences-modal__actions .reject-cookies {
  border-color: #dedede;
  background: #e8e8e8;
  color: #3f3f3f;
}

.cookies-preferences-modal__actions .save-cookie-preferences {
  background: #fff;
  color: var(--site-accent-color, #005a73);
}

@media (max-width: 600px) {
  .cookies-wrapper {
    padding: 16px;
  }

  .cookies__actions {
    width: 100%;
    flex-direction: column;
  }

  .cookies-wrapper .cookies .accept-cookies,
  .cookies-wrapper .cookies .reject-cookies,
  .cookies-wrapper .cookies .customize-cookies {
    width: 100%;
  }

  .cookie-settings {
    display: block;
    margin: 8px auto 0;
  }

  .cookies-preferences-modal {
    align-items: flex-start;
    padding: 16px;
  }

  .cookies-preferences-modal__content {
    max-height: calc(100vh - 32px);
    padding: 22px 18px;
  }

  .cookies-preferences-modal__category-heading {
    gap: 16px;
  }

  .cookies-preferences-modal__actions {
    flex-direction: column;
  }

  .cookies-preferences-modal__actions button {
    width: 100%;
  }
}


