.cookie-consent {
  --cookie-primary: #28a745;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

.cookie-floating-button {
  position: fixed;
  z-index: 10000;
  bottom: 22px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--cookie-primary);
  box-shadow: 0 10px 28px rgba(0, 35, 20, 0.32);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cookie-floating-button--bottom-left {
  left: 22px;
}

.cookie-floating-button--bottom-right {
  right: 22px;
}

.cookie-floating-button:hover,
.cookie-floating-button:focus-visible {
  box-shadow: 0 14px 34px rgba(0, 35, 20, 0.4);
  transform: translateY(-2px);
}

.cookie-floating-button svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cookie-notice {
  position: fixed;
  z-index: 10500;
  right: 24px;
  bottom: 24px;
  width: min(580px, calc(100vw - 48px));
  padding: 26px;
  border: 1px solid #dce5ed;
  border-radius: 16px;
  background: #fff;
  color: #252525;
  box-shadow: 0 18px 55px rgba(0, 22, 55, 0.28);
}

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

.cookie-notice h2 {
  margin: 0 0 14px;
  color: #222;
  font-size: 1.65rem;
  line-height: 1.2;
}

.cookie-notice p {
  margin: 0;
  color: #3e3e3e;
  font-size: 1rem;
  line-height: 1.65;
}

.cookie-notice p a,
.cookie-notice p button {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0866d8;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.cookie-notice p a:hover,
.cookie-notice p button:hover {
  text-decoration: underline;
}

.cookie-notice__actions {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 12px;
  margin-top: 22px;
}

.cookie-notice__actions .cookie-button {
  width: 100%;
}

.cookie-backdrop {
  position: fixed;
  z-index: 11000;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(0, 18, 46, 0.7);
  backdrop-filter: blur(3px);
}

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

.cookie-modal {
  display: grid;
  width: min(820px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  color: #183654;
  box-shadow: 0 28px 90px rgba(0, 14, 40, 0.42);
}

.cookie-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 28px 20px;
  border-bottom: 1px solid #e4ebf2;
}

.cookie-modal__header h2 {
  margin: 0;
  color: #12345c;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.25;
}

.cookie-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #edf3f8;
  color: #173858;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.cookie-modal__body {
  overflow-y: auto;
  padding: 24px 28px;
  overscroll-behavior: contain;
}

.cookie-intro {
  color: #4b647d;
  font-size: 0.98rem;
  line-height: 1.65;
}

.cookie-category {
  margin-top: 22px;
  padding: 21px;
  border: 1px solid #dce5ed;
  border-radius: 14px;
  background: #fbfdff;
}

.cookie-category__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.cookie-category h3 {
  margin: 0;
  color: #173858;
  font-size: 1.1rem;
}

.cookie-category__heading > strong {
  color: var(--cookie-primary);
  font-size: 0.88rem;
  white-space: nowrap;
}

.cookie-category p {
  margin: 12px 0 0;
  color: #526b82;
  line-height: 1.6;
}

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

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

.cookie-switch span {
  position: relative;
  display: block;
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: #aebdca;
  transition: background 0.2s ease;
}

.cookie-switch span:after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 25, 55, 0.28);
  content: "";
  transition: transform 0.2s ease;
}

.cookie-switch input:checked + span {
  background: #1677d2;
}

.cookie-switch input:checked + span:after {
  transform: translateX(22px);
}

.cookie-switch input:focus-visible + span {
  outline: 3px solid #b6df3d;
  outline-offset: 3px;
}

.cookie-switch em {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.cookie-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 28px;
  border-top: 1px solid #e4ebf2;
  background: #fff;
}

.cookie-button {
  min-height: 44px;
  padding: 11px 20px;
  border: 2px solid var(--cookie-primary);
  border-radius: 9px;
  cursor: pointer;
  font-weight: 800;
}

.cookie-button--outline {
  background: #fff;
  color: var(--cookie-primary);
}

.cookie-button--primary {
  background: var(--cookie-primary);
  color: #fff;
}

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

@media (max-width: 600px) {
  .cookie-notice {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    padding: 22px 18px;
    border-radius: 14px;
  }

  .cookie-notice h2 {
    font-size: 1.4rem;
  }

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

  .cookie-backdrop {
    padding: 12px;
    place-items: end center;
  }

  .cookie-modal {
    max-height: calc(100dvh - 24px);
    border-radius: 18px 18px 12px 12px;
  }

  .cookie-modal__header,
  .cookie-modal__body,
  .cookie-modal__footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .cookie-category__heading {
    align-items: flex-start;
  }

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

  .cookie-button {
    width: 100%;
  }

  .cookie-floating-button {
    bottom: 14px;
    width: 52px;
    height: 52px;
  }

  .cookie-floating-button--bottom-left {
    left: 14px;
  }

  .cookie-floating-button--bottom-right {
    right: 14px;
  }
}
