.footer-legal-wrap {
  padding-bottom: 28px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-legal a,
.footer-legal button {
  padding: 3px 0;
  border: 0;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.footer-legal a:hover,
.footer-legal button:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cookie-banner {
  position: fixed;
  z-index: 60;
  bottom: 24px;
  left: 24px;
  width: min(520px, calc(100vw - 48px));
  padding: 17px;
  border: 1px solid rgba(23, 23, 22, 0.18);
  border-left: 4px solid #a90914;
  border-radius: 2px;
  color: #171716;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 56px rgba(23, 23, 22, 0.22);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__copy strong {
  display: block;
  margin-bottom: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.25;
}

.cookie-banner__copy p {
  margin: 0;
  color: #4a4945;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-banner__copy a {
  color: #8d0710;
  font-weight: 700;
  text-underline-offset: 3px;
}

.cookie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
}

.cookie-button {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 9px 14px;
  border: 1px solid #a90914;
  border-radius: 1px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.cookie-button--primary {
  color: #ffffff;
  background: #a90914;
}

.cookie-button--secondary {
  color: #8d0710;
  background: #ffffff;
}

.cookie-button--plain {
  padding-inline: 8px;
  border-color: transparent;
  color: #41403c;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-button:hover {
  filter: brightness(0.94);
}

.cookie-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100svh - 48px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 3px;
  color: #171716;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.cookie-dialog::backdrop {
  background: rgba(23, 23, 22, 0.68);
  backdrop-filter: blur(3px);
}

.cookie-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 19px;
  border-bottom: 1px solid rgba(23, 23, 22, 0.14);
}

.cookie-dialog__header h2 {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  line-height: 1.1;
}

.cookie-dialog__header p {
  margin: 0;
  color: #66635d;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-dialog__close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(23, 23, 22, 0.18);
  border-radius: 50%;
  background: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.cookie-dialog__body {
  padding: 8px 24px 2px;
  overflow-y: auto;
}

.cookie-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(23, 23, 22, 0.12);
}

.cookie-category:last-child {
  border-bottom: 0;
}

.cookie-category h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.3;
}

.cookie-category p {
  margin: 0;
  color: #66635d;
  font-size: 14px;
  line-height: 1.55;
}

.cookie-category__state {
  align-self: start;
  padding-top: 2px;
}

.cookie-category__state input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #a90914;
}

.cookie-required {
  color: #4f5d42;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.cookie-dialog__note {
  margin: 6px 24px 0;
  padding: 12px 14px;
  color: #5c4b3d;
  background: #f5eee6;
  font-size: 13px;
  line-height: 1.5;
}

.cookie-dialog__note a {
  color: #8d0710;
  font-weight: 700;
}

.cookie-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 24px 24px;
}

.cookie-dialog__actions .cookie-button {
  min-width: 150px;
}

@media (max-width: 720px) {
  .footer-legal-wrap {
    padding-bottom: 22px;
  }

  .footer-legal {
    gap: 9px 16px;
  }

  .footer-legal a,
  .footer-legal button {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
  }

  .cookie-banner {
    right: 8px;
    bottom: 76px;
    left: 8px;
    width: auto;
    padding: 12px;
  }

  .cookie-banner__copy strong {
    font-size: 15px;
  }

  .cookie-banner__copy p {
    font-size: 13px;
    line-height: 1.42;
  }

  .cookie-actions {
    margin-top: 9px;
  }

  .cookie-button {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .cookie-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100svh - 92px);
    margin: auto 8px 76px;
  }

  .cookie-dialog__header {
    padding: 18px 16px 15px;
  }

  .cookie-dialog__header h2 {
    font-size: 23px;
  }

  .cookie-dialog__body {
    padding-inline: 16px;
  }

  .cookie-category {
    padding: 15px 0;
  }

  .cookie-dialog__note {
    margin-inline: 16px;
  }

  .cookie-dialog__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 16px;
  }

  .cookie-dialog__actions .cookie-button {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-dialog {
    scroll-behavior: auto;
  }
}
