.tas-cookie-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 99990;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 22px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.tas-cookie-banner__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.tas-cookie-banner__text {
  margin: 0 0 16px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.tas-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tas-cookie-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.tas-cookie-banner__btn--primary {
  color: var(--text-on-primary);
  background: var(--primary);
}

.tas-cookie-banner__btn--ghost {
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--border-light);
}

.tas-cookie-banner__btn:hover {
  opacity: 0.9;
}

.tas-privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tas-privacy-modal[hidden] {
  display: none !important;
}

.tas-privacy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.tas-privacy-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 28px 28px 24px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.tas-privacy-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.tas-privacy-modal__title {
  margin: 0 32px 8px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.tas-privacy-modal__intro {
  margin: 0 0 22px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.tas-privacy-modal__section {
  padding: 16px 0;
  border-top: 1px solid var(--border-light);
}

.tas-privacy-modal__section-title {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--primary);
}

.tas-privacy-modal__section-desc {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.tas-privacy-modal__choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tas-privacy-modal__option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-body);
  cursor: pointer;
}

.tas-privacy-modal__option input {
  margin-top: 3px;
  flex-shrink: 0;
}

.tas-privacy-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tas-privacy-modal__save {
  padding: 11px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-on-primary);
  background: var(--primary);
  cursor: pointer;
}

body.tas-privacy-modal-open {
  overflow: hidden;
}

/* Keep fixed UI aligned when the scrollbar is temporarily removed */
body.tas-privacy-modal-open .tour-fixed-btn {
  left: calc(50% - (var(--tas-privacy-sb, 0px) / 2));
}

body.tas-privacy-modal-open .to-top {
  right: calc(var(--tas-to-top-right, 100px) + var(--tas-privacy-sb, 0px));
}

@media (max-width: 1199px) {
  body.tas-privacy-modal-open .to-top {
    --tas-to-top-right: 27px;
  }
}

@media (max-width: 992px) {
  body.tas-privacy-modal-open .to-top {
    --tas-to-top-right: 25px;
  }
}

@media (max-width: 767px) {
  body.tas-privacy-modal-open .to-top {
    --tas-to-top-right: 15px;
  }
}

#footer .site-footer__legal-link--btn {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 767px) {
  .tas-cookie-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
    padding: 16px;
  }

  .tas-cookie-banner__btn {
    flex: 1 1 calc(50% - 5px);
  }

  .tas-privacy-modal__dialog {
    padding: 22px 18px 18px;
  }
}
