/* ==========================================================================
   BuddieSpace — Waitlist Modal
   Figma node: 1:889
   ========================================================================== */

/* --------------------------------------------------------------------------
   Overlay (fixed, hidden by default)
   -------------------------------------------------------------------------- */
.bs-waitlist-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2.78vw, 40px);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.bs-waitlist-modal--visible {
  display: flex;
}

/* --------------------------------------------------------------------------
   Dialog card
   -------------------------------------------------------------------------- */
.bs-waitlist-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: clamp(16px, 2.96vw, 21px);
  box-shadow: 0 2px 14px 0 rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Top content area (avatars + headline)
   -------------------------------------------------------------------------- */
.bs-waitlist-modal__content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(24px, 4.44vw, 32px) clamp(24px, 4.44vw, 32px) 0;
}

/* --------------------------------------------------------------------------
   Avatar group — three overlapping circles
   -------------------------------------------------------------------------- */
.bs-waitlist-modal__avatars {
  position: relative;
  width: 160px;
  height: 76px;
  flex-shrink: 0;
  margin-bottom: clamp(16px, 2.22vw, 24px);
}

.bs-waitlist-modal__avatar {
  position: absolute;
  border-radius: 50%;
  border: 2px solid #ffffff;
  overflow: hidden;
  background: #c7b9da;
}

.bs-waitlist-modal__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bs-waitlist-modal__avatar--left {
  width: 64px;
  height: 64px;
  left: 0;
  top: 11px;
  z-index: 1;
  background: #aa9c75;
}

.bs-waitlist-modal__avatar--center {
  width: 76px;
  height: 76px;
  left: 42px;
  top: 0;
  z-index: 3;
  background: #c7b9da;
}

.bs-waitlist-modal__avatar--right {
  width: 64px;
  height: 64px;
  right: 0;
  top: 11px;
  z-index: 2;
  background: #d4b5ad;
}

/* --------------------------------------------------------------------------
   Modal header (headline)
   -------------------------------------------------------------------------- */
.bs-waitlist-modal__header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 clamp(24px, 4.44vw, 32px) clamp(20px, 3.33vw, 28px);
}

.bs-waitlist-modal__headline {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(20px, 3.33vw, 28px);
  line-height: 1.35;
  color: #21254a;
  text-align: center;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Body — email field
   -------------------------------------------------------------------------- */
.bs-waitlist-modal__body {
  width: 100%;
  padding: 0 clamp(24px, 4.44vw, 32px);
}

.bs-waitlist-modal__field {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.11vw, 8px);
  width: 100%;
}

.bs-waitlist-modal__label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(13px, 1.25vw, 16px);
  line-height: 1.4;
  color: #404040;
}

.bs-waitlist-modal__input {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #21254a;
  border-radius: clamp(8px, 1.48vw, 11px);
  box-shadow: 0 1.5px 3px 0 rgba(0, 0, 0, 0.05);
  padding: clamp(11px, 1.85vw, 14px) clamp(14px, 2.59vw, 18px);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 1.48vw, 18px);
  color: #21254a;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.bs-waitlist-modal__input::placeholder {
  color: #21254a;
  opacity: 0.5;
}

.bs-waitlist-modal__input:focus {
  border-color: #21254a;
  box-shadow: 0 0 0 3px rgba(33, 37, 74, 0.12);
}

/* --------------------------------------------------------------------------
   Actions area (divider + buttons)
   -------------------------------------------------------------------------- */
.bs-waitlist-modal__actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: clamp(24px, 4.16vw, 32px);
}

.bs-waitlist-modal__divider {
  width: 100%;
  height: 1px;
  background: #e5e5e5;
  flex-shrink: 0;
}

.bs-waitlist-modal__buttons {
  display: flex;
  gap: clamp(12px, 2.22vw, 16px);
  padding: clamp(20px, 3.33vw, 28px) clamp(24px, 4.44vw, 32px) clamp(24px, 4.44vw, 32px);
  width: 100%;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.bs-waitlist-modal__btn {
  flex: 1 0 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 1.85vw, 14px) clamp(16px, 3.33vw, 24px);
  border-radius: clamp(8px, 1.48vw, 11px);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(14px, 1.48vw, 18px);
  line-height: 1.4;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none;
  border-width: 1.5px;
  border-style: solid;
  white-space: nowrap;
}

.bs-waitlist-modal__btn--cancel {
  background: #ffffff;
  color: #21254a;
  border-color: #21254a;
  box-shadow: 0 1.5px 3px 0 rgba(0, 0, 0, 0.05);
}

.bs-waitlist-modal__btn--cancel:hover {
  background: #f5f5f7;
}

.bs-waitlist-modal__btn--signup {
  background: #21254a;
  color: #ffffff;
  border-color: #21254a;
  box-shadow: 0 1.5px 3px 0 rgba(0, 0, 0, 0.05);
}

.bs-waitlist-modal__btn--signup:hover {
  opacity: 0.88;
}

/* --------------------------------------------------------------------------
   Success message (shown after form submit)
   -------------------------------------------------------------------------- */
.bs-waitlist-modal__success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: clamp(24px, 4.44vw, 32px);
  text-align: center;
}

.bs-waitlist-modal__success--visible {
  display: flex;
}

.bs-waitlist-modal__success-icon {
  width: 48px;
  height: 48px;
  background: #b0f288;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bs-waitlist-modal__success-icon svg {
  width: 24px;
  height: 24px;
}

.bs-waitlist-modal__success-text {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(16px, 1.67vw, 20px);
  color: #21254a;
  margin: 0;
}

.bs-waitlist-modal__success-subtext {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(13px, 1.11vw, 15px);
  color: #404040;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Tablet — max-width: 1023px
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .bs-waitlist-modal__dialog {
    max-width: 480px;
  }

  .bs-waitlist-modal__headline {
    font-size: clamp(20px, 4vw, 26px);
  }
}

/* --------------------------------------------------------------------------
   Mobile — max-width: 599px
   -------------------------------------------------------------------------- */
@media (max-width: 599px) {
  .bs-waitlist-modal {
    padding: 16px;
    align-items: flex-end;
  }

  .bs-waitlist-modal__dialog {
    max-width: 100%;
    border-radius: 20px 20px 16px 16px;
  }

  .bs-waitlist-modal__content {
    padding: 24px 20px 0;
  }

  .bs-waitlist-modal__header {
    padding: 0 20px 20px;
  }

  .bs-waitlist-modal__headline {
    font-size: 20px;
  }

  .bs-waitlist-modal__body {
    padding: 0 20px;
  }

  .bs-waitlist-modal__buttons {
    flex-direction: column-reverse;
    padding: 20px;
    gap: 10px;
  }

  .bs-waitlist-modal__btn {
    width: 100%;
    flex: none;
    padding: 14px 20px;
    font-size: 16px;
    border-radius: 10px;
  }

  .bs-waitlist-modal__actions {
    margin-top: 20px;
  }

  .bs-waitlist-modal__avatars {
    width: 140px;
    height: 66px;
  }

  .bs-waitlist-modal__avatar--left,
  .bs-waitlist-modal__avatar--right {
    width: 56px;
    height: 56px;
  }

  .bs-waitlist-modal__avatar--center {
    width: 66px;
    height: 66px;
    left: 37px;
  }

  .bs-waitlist-modal__avatar--right {
    right: 0;
  }
}
