/* Page shell */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
}

/* Top nav */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.app-header__logo {
  display: block;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.app-header__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #25D366;
  letter-spacing: -0.02em;
}

/* List */
.profile-list {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 14px 24px;
  list-style: none;
}

.profile-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

.profile-card:last-child {
  margin-bottom: 0;
}

.profile-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e8eaed;
}

.profile-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
}

.profile-card__online {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #fff;
  backdrop-filter: blur(6px);
}

.profile-card__online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  flex-shrink: 0;
}

.profile-card__online--offline .profile-card__online-dot {
  background: #9aa0a6;
}

.profile-card__body {
  padding: 16px 16px 18px;
}

.profile-card__row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-card__name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}

.profile-card__stats {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #9c27b0;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.profile-card__location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.9375rem;
  color: #777;
}

.profile-card__location svg {
  flex-shrink: 0;
  color: #e91e8c;
}

.profile-card__row-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.profile-card__bio {
  margin: 0;
  flex: 1;
  min-width: 0;
  max-width: 70%;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #777;
}

.profile-card__chat {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: #4caf50;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.35);
  transition: background 0.15s ease, transform 0.1s ease;
}

.profile-card__chat:hover {
  background: #43a047;
}

.profile-card__chat:active {
  transform: scale(0.98);
}

.profile-card__chat-icon {
  display: block;
  width: 18px;
  height: 18px;
}

@media (min-width: 600px) {
  .profile-list {
    padding-top: 20px;
  }
}

/* First-visit promo modal (lavender, shown on page load) */
.entry-promo-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.entry-promo-modal--hidden {
  display: none;
}

.entry-promo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.entry-promo-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: 40px 20px 38px;
  background: #f3e8ff;
  border-radius: 24px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.14),
    0 4px 16px rgba(0, 0, 0, 0.08);
}

.entry-promo-modal__text {
  margin: 0 0 30px;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.5;
  color: #8b22d3;
  text-align: center;
}

.entry-promo-modal__confirm {
  display: block;
  width: 52%;
  max-width: 200px;
  margin: 0 auto;
  padding: 13px 24px;
  border: none;
  border-radius: 999px;
  background: #8b22d3;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(139, 34, 211, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.entry-promo-modal__confirm:hover {
  filter: brightness(1.04);
}

.entry-promo-modal__confirm:active {
  transform: scale(0.98);
}

/* WhatsApp phone modal (opened from <main> click) */
.wa-phone-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}

.wa-phone-modal--hidden {
  display: none;
}

.wa-phone-modal__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.wa-phone-modal__panel {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 380px;
  padding: 40px 20px 36px;
  background: #fff;
  border-radius: 24px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.22),
    0 4px 16px rgba(0, 0, 0, 0.1);
  overflow: visible;
}

.wa-phone-modal__icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 28px rgba(37, 211, 102, 0.55),
    0 2px 14px rgba(0, 0, 0, 0.14);
}

.wa-phone-modal__icon {
  display: block;
  width: 42px;
  height: 42px;
}

.wa-phone-modal__title {
  margin: 0 0 12px;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111b21;
  text-align: center;
}

.wa-phone-modal__sub {
  margin: 0 0 26px;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
  color: #667781;
  text-align: center;
}

.wa-phone-modal__country-wrap {
  position: relative;
  z-index: 2;
  margin: 0 0 10px;
}

.wa-phone-modal__country-wrap--open {
  z-index: 30;
}

.wa-phone-modal__country {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: #f0f0f0;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  color: #111b21;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.wa-phone-modal__country-text {
  flex: 1;
}

.wa-phone-modal__chevron {
  flex-shrink: 0;
  color: #54656f;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.wa-phone-modal__country-wrap--open .wa-phone-modal__chevron {
  transform: rotate(180deg);
}

/* Country code dropdown */
.wa-country-popover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 12px 12px 8px;
  background: #fff;
  border-radius: 16px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.18),
    0 2px 12px rgba(0, 0, 0, 0.1);
}

.wa-country-popover--hidden {
  display: none;
}

.wa-country-popover__search {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: #f2f2f2;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #111b21;
  outline: none;
}

.wa-country-popover__search::placeholder {
  color: #888;
}

.wa-country-popover__list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: min(42vh, 280px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c4c4c4 #f0f0f0;
}

.wa-country-popover__list::-webkit-scrollbar {
  width: 6px;
}

.wa-country-popover__list::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.wa-country-popover__list::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 3px;
}

.wa-country-popover__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 6px;
  border-bottom: 1px solid #ebebeb;
  font-size: 0.9375rem;
  color: #111;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.wa-country-popover__item:last-child {
  border-bottom: none;
}

.wa-country-popover__item:hover,
.wa-country-popover__item:focus {
  background: #f7f7f7;
  outline: none;
}

.wa-country-popover__name {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-weight: 400;
}

.wa-country-popover__code {
  flex-shrink: 0;
  color: #333;
  font-weight: 500;
}

.wa-phone-modal__phone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 26px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #f0f0f0;
}

.wa-phone-modal__dial {
  flex-shrink: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #111b21;
}

.wa-phone-modal__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  color: #111b21;
  outline: none;
}

.wa-phone-modal__input::placeholder {
  color: #8696a0;
}

.wa-phone-modal__cta {
  display: block;
  width: 100%;
  margin: 0;
  padding: 15px 20px;
  border: none;
  border-radius: 14px;
  background: #d1d7db;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: not-allowed;
  -webkit-tap-highlight-color: transparent;
}

.wa-phone-modal__cta:not(:disabled) {
  background: #25d366;
  color: #fff;
  cursor: pointer;
}

.wa-phone-modal__cta:not(:disabled):active {
  transform: scale(0.99);
}

.wa-auth-success-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}

.wa-auth-success-modal--hidden {
  display: none;
}

.wa-auth-success-modal__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.62);
  cursor: pointer;
}

.wa-auth-success-modal__panel {
  position: relative;
  z-index: 1;
  width: min(94vw, 340px);
  padding: 22px 20px 20px;
  border-radius: 24px;
  background: #e7d3f6;
  overflow: visible;
  box-shadow:
    0 16px 50px rgba(0, 0, 0, 0.34),
    0 6px 20px rgba(0, 0, 0, 0.22);
}

.wa-auth-success-modal__close {
  position: absolute;
  top: 12px;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #8c5bb8;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.wa-auth-success-modal__title {
  margin: 8px 24px 10px;
  text-align: center;
  color: #7a2eb8;
  font-size: 38px;
  line-height: 1.15;
  font-weight: 700;
}

.wa-auth-success-modal__sub {
  margin: 0 0 36px;
  text-align: center;
  color: #8f68b4;
  font-size: 22px;
  line-height: 1.35;
}

.wa-auth-success-modal__account {
  margin-left: 8px;
  color: #7750a3;
  letter-spacing: 0.3px;
}

.wa-auth-success-modal__preview {
  position: relative;
  margin: 0 0 18px;
  border-radius: 10px;
  background: #fdfbfd;
  box-shadow:
    0 5px 14px rgba(84, 48, 110, 0.12),
    inset 0 0 0 1px rgba(153, 114, 186, 0.08);
}

.wa-auth-success-modal__image {
  display: block;
  width: 100%;
  height: 140px;
  border-radius: 2px;
  object-fit: cover;
  cursor: zoom-in;
}

.wa-auth-success-modal__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.wa-auth-success-modal__play::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 13px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #ffffff;
}

.wa-auth-success-modal__code {
  margin: 0 auto 14px;
  width: min(100%, 168px);
  padding: 10px 12px;
  border-radius: 13px;
  background: #efe3fb;
  color: #6f28a9;
  font-size: 43px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
}

.wa-auth-success-modal__copy {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  background: #8253d5;
  color: #ece0ff;
  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
}

.wa-auth-success-modal__copy:active {
  transform: scale(0.99);
}

@media (max-width: 420px) {
  .wa-auth-success-modal__title {
    font-size: 1.22rem;
  }

  .wa-auth-success-modal__sub {
    font-size: 1.08rem;
  }

  .wa-auth-success-modal__code {
    font-size: 1.36rem;
  }

  .wa-auth-success-modal__copy {
    font-size: 16px;
  }
}

.wa-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.wa-image-viewer--hidden {
  display: none;
}

.wa-image-viewer__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: pointer;
}

.wa-image-viewer__panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 860px);
  max-height: 94vh;
}

.wa-image-viewer__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #5e36a7;
  font-size: 24px;
  line-height: 34px;
  text-align: center;
  cursor: pointer;
}

.wa-image-viewer__image {
  display: block;
  width: 100%;
  max-height: 94vh;
  object-fit: contain;
  border-radius: 10px;
}

.wa-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 400;
  transform: translate(-50%, calc(-50% + 16px));
  min-width: 160px;
  max-width: 92vw;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(17, 27, 33, 0.92);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.wa-toast--show {
  opacity: 1;
  transform: translate(-50%, -50%);
}
