#cookie-consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;

  background: #d7f0e9;
  color: #1f2328;
  padding: 16px 24px;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 14px;
  line-height: 1.5;

  animation: cookie-slide-up 0.3s ease-out;
}

#cookie-consent-banner[hidden] {
  display: none;
}

@keyframes cookie-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-banner__content {
  /* max-width: 1200px; */
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-banner__text {
  flex: 1 1 320px;
  margin: 0;
  color: #1f2328;
}

.cookie-banner__link {
  color: #0d6efd;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.cookie-banner__link:hover {
  text-decoration-thickness: 2px;
}

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

.cookie-banner__ccpa-link {
  color: #0d6efd;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 13px;
  white-space: nowrap;
}

.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-family: inherit;
  font-size: 16px;
  font-weight: normal;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  padding-top: calc(0.5em - 2px);
  padding-bottom: calc(0.5em + 2px);
}

.cookie-btn:focus-visible {
  outline: 2px solid rgb(173, 224, 207);
  outline-offset: 2px;
}

.cookie-btn--accept {
  background: rgb(173, 224, 207);
  color: #000;
  border-color: rgb(173, 224, 207);
}

.cookie-btn--customize {
  background: #f6f8fa;
  color: #000;
  border-color: rgb(173, 224, 207);
}

.cookie-btn:active {
  border-width: 0.5px;
  border-color: #000000;
  box-shadow:
    0px 0px 0px #c5c5c5,
    0px 0px 0px #ffffff,
    inset 0px 0px 2px 2px #0000003d,
    inset 0px 0px 6px 4px #00000028;
}

.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);

  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  animation: cookie-fade-in 0.2s ease-out;
}

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

@keyframes cookie-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-modal__box {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;

  background: #ffffff;
  color: #1f2328;
  border: 1px solid #d0d7de;
  border-radius: 10px;

  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);

  animation: cookie-modal-in 0.2s ease-out;

  scrollbar-width: thin;
  scrollbar-color: #d0d7de transparent;
}

.cookie-modal__box::-webkit-scrollbar {
  width: 8px;
}

.cookie-modal__box::-webkit-scrollbar-thumb {
  background: #d0d7de;
  border-radius: 4px;
}

@keyframes cookie-modal-in {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.cookie-modal__box h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.cookie-modal__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  padding: 12px 0;
  border-bottom: 1px solid #d0d7de;
  cursor: pointer;
  font-size: 14px;
}

.cookie-modal__row:last-of-type {
  border-bottom: none;
}

.cookie-modal__row input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #0d6efd;
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.cookie-modal__row input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.cookie-modal__actions .cookie-btn {
  flex: 1 1 auto;
  min-width: 120px;
}

@media (max-width: 767px) {
  #cookie-consent-banner {
    padding: 14px 16px;
  }

  .cookie-banner__content {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner__text {
    flex: 1;
  }

  .cookie-banner__actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .cookie-banner__ccpa-link {
    text-align: center;
    padding: 4px 0;
  }

  .cookie-modal__box {
    padding: 20px;
  }

  .cookie-modal__actions {
    flex-direction: column;
  }

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

@media (prefers-reduced-motion: reduce) {
  #cookie-consent-banner,
  .cookie-modal,
  .cookie-modal__box {
    animation: none;
  }
}

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