.individual-terms-popup {
  position: fixed;
  top: auto;
  right: clamp(10px, 1.8vw, 26px);
  bottom: clamp(86px, 10vh, 116px);
  z-index: 1000;
  width: min(372px, calc(100vw - 28px));
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(99, 91, 255, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(241, 245, 249, 0.95));
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(18px, 0, 0) scale(0.96);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

.individual-terms-popup.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.individual-terms-popup__inner {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 1.15rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.52);
}

.individual-terms-popup__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(99, 91, 255, 0.12), transparent 44%),
    radial-gradient(circle at bottom right, rgba(0, 212, 255, 0.12), transparent 34%);
  pointer-events: none;
}

.individual-terms-popup__eyebrow,
.individual-terms-popup__title,
.individual-terms-popup__body,
.individual-terms-popup__actions {
  position: relative;
  z-index: 1;
}

.individual-terms-popup__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.82rem;
  padding: 0.38rem 0.72rem;
  border: 1px solid rgba(99, 91, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4f46e5;
}

.individual-terms-popup__title {
  margin: 0;
  max-width: calc(100% - 3.2rem);
  font-size: 1.5rem;
  line-height: 1.05;
  font-weight: 600;
  color: #0f172a;
}

.individual-terms-popup__body {
  margin: 0.9rem 0 1.15rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #475569;
}

.individual-terms-popup__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.individual-terms-popup__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid rgba(99, 91, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #334155;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.individual-terms-popup__close:hover {
  transform: rotate(90deg);
  border-color: rgba(99, 91, 255, 0.32);
  background: rgba(255, 255, 255, 0.98);
}

.individual-terms-popup__link {
  display: inline-flex;
  position: relative;
  z-index: 2;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #635bff 0%, #3aa8ff 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  pointer-events: auto;
  box-shadow: 0 18px 40px rgba(99, 91, 255, 0.24);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.individual-terms-popup__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(99, 91, 255, 0.28);
  filter: saturate(1.06);
}

body.theme-dark .individual-terms-popup {
  border-color: rgba(92, 127, 192, 0.35);
  background:
    radial-gradient(circle at top right, rgba(99, 91, 255, 0.26), transparent 48%),
    linear-gradient(180deg, rgba(6, 20, 48, 0.96), rgba(4, 16, 40, 0.96));
  box-shadow: 0 28px 70px rgba(1, 7, 22, 0.46);
}

body.theme-dark .individual-terms-popup__inner {
  background: linear-gradient(180deg, rgba(8, 25, 58, 0.94), rgba(5, 18, 44, 0.96));
  border-color: rgba(99, 123, 177, 0.26);
}

body.theme-dark .individual-terms-popup__eyebrow {
  background: rgba(8, 23, 53, 0.74);
  border-color: rgba(96, 165, 250, 0.18);
  color: #9fb0ff;
}

body.theme-dark .individual-terms-popup__title {
  color: #f8fbff;
}

body.theme-dark .individual-terms-popup__body {
  color: #c4d2ec;
}

body.theme-dark .individual-terms-popup__close {
  border-color: rgba(96, 165, 250, 0.18);
  background: rgba(8, 23, 53, 0.84);
  color: #d7e5ff;
}

body.theme-dark .individual-terms-popup__close:hover {
  border-color: rgba(99, 91, 255, 0.38);
  background: rgba(12, 29, 65, 0.96);
}

@media (max-width: 1023px) {
  .individual-terms-popup {
    top: auto;
    right: 14px;
    bottom: 88px;
    left: 14px;
    width: auto;
    transform: translate3d(0, 18px, 0) scale(0.96);
  }

  .individual-terms-popup.is-visible {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (max-width: 640px) {
  .individual-terms-popup {
    right: 10px;
    bottom: 78px;
    left: 10px;
    width: auto;
    padding: 0.62rem;
    border-radius: 22px;
  }

  .individual-terms-popup__inner {
    padding: 0.95rem;
  }

  .individual-terms-popup__title {
    max-width: calc(100% - 3rem);
    font-size: 1.22rem;
  }

  .individual-terms-popup__body {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .individual-terms-popup__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .individual-terms-popup__link {
    width: 100%;
  }
}
