/* ==============================
   CSS Variables — BuddySearch Theme
   ============================== */
:root {
  --color-carnation: #F96566;
  --color-sea-pink: #EE9CA0;
  --color-wewak: #F0AAB4;
  --color-vista-white: #F9EFEF;
  --color-white: #ffffff;
  --color-dark: #3D4550;
  --color-dark-alt: #2e3540;
  --color-text: #3D4550;
  --color-text-muted: #7a8494;
  --color-border: #f0e0e0;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(249, 101, 102, 0.1);
  --shadow-md: 0 8px 32px rgba(249, 101, 102, 0.15);
  --shadow-lg: 0 20px 60px rgba(249, 101, 102, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==============================
   Reset & Base
   ============================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Disable double-tap zoom on iOS without removing pinch-to-zoom */
  touch-action: manipulation;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ==============================
   iOS Anti-Zoom Fix
   iOS auto-zooms when focused input font-size < 16px.
   We force 16px using font-size in px (not em/rem) so it
   stays at 16px even when html font-size scales down on mobile.
   ============================== */
input,
textarea,
select {
  font-size: 16px !important;
  -webkit-text-size-adjust: 100%;
}

/* ==============================
   Utility Classes
   ============================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 18px;
  }

  .section-tag {
    font-size: 0.72rem;
    padding: 5px 14px;
  }

  .section-title {
    font-size: clamp(28px, 6vw, 40px);
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  .btn-primary,
  .btn-secondary,
  .btn-white,
  .btn-outline-white {
    font-size: 0.875rem;
    padding: 12px 24px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 14px;
  }

  .section-tag {
    font-size: 0.68rem;
    padding: 4px 12px;
  }

  .section-title {
    font-size: clamp(26px, 7vw, 36px);
  }

  .section-subtitle {
    font-size: 0.875rem;
    line-height: 1.65;
  }

  /* Landing page CTA buttons only — keep full width on small screens */
  .hero .btn-primary,
  .hero .btn-secondary,
  .hero .btn-white,
  .hero .btn-outline-white,
  .cta-section .btn-primary,
  .cta-section .btn-secondary,
  .cta-section .btn-white,
  .cta-section .btn-outline-white {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
    padding: 11px 20px;
  }

  /* Dashboard buttons — compact but NOT full-width by default */
  .btn-primary,
  .btn-secondary,
  .btn-white,
  .btn-outline-white {
    font-size: 0.85rem;
    padding: 10px 20px;
  }
}

.section-tag {
  display: inline-block;
  background: var(--color-vista-white);
  color: var(--color-carnation);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-title span {
  color: var(--color-carnation);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 540px;
  line-height: 1.7;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-carnation);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 50px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(249, 101, 102, 0.35);
}

.btn-primary:hover {
  background: #e8555b;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(249, 101, 102, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--color-carnation);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 50px;
  border: 2px solid var(--color-carnation);
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--color-vista-white);
  transform: translateY(-2px);
}

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--color-carnation);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 50px;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,0.6);
  transition: var(--transition);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
  transform: translateY(-2px);
}
/* ============================================================
   Toast Notifications — Modern PWA Style
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
}

@media (max-width: 480px) {
  /* On mobile / PWA the bottom is crowded by the fixed nav bar, the
     center FAB and the thumb zone. A bottom toast overlaps all of that
     and blocks taps. Dock toasts to the top instead (the standard mobile
     pattern) and respect the safe-area inset so it clears the status bar
     / notch in installed PWAs. */
  .toast-container {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    bottom: auto;
    right: 12px;
    left: 12px;
    max-width: 100%;
    align-items: center;
  }
}

/* ── Base toast ── */
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-family);
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.07),
    0 10px 30px -5px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255,255,255,0.6) inset;
  animation: toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  will-change: transform, opacity;
}

@media (max-width: 480px) {
  .toast {
    min-width: 0;
    max-width: 100%;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 0.8rem;
    gap: 9px;
  }

  .toast__icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .toast__icon svg {
    width: 14px;
    height: 14px;
  }

  .toast__msg {
    line-height: 1.4;
  }

  .toast__close {
    padding: 2px;
  }
}

/* Slide-in from right on desktop, up on mobile */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (max-width: 480px) {
  /* Slide down from the top on mobile since toasts now dock there */
  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translateY(-16px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  /* Full width within the side gutters so it reads as a clean top banner */
  .toast {
    width: 100%;
  }
}

/* ── Progress bar ── */
.toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 16px 16px;
  animation: toast-progress linear both;
  transform-origin: left;
}

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ── Icon container ── */
.toast__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

/* ── Message ── */
.toast__msg {
  flex: 1;
  line-height: 1.45;
  color: inherit;
}

/* ── Close button ── */
.toast__close {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.45;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
  transition: opacity 0.15s, background 0.15s;
  font-family: inherit;
  color: inherit;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toast__close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

/* ── Variants ── */
.toast--success {
  background: rgba(240, 253, 244, 0.95);
  color: #166534;
  border: 1px solid rgba(187, 247, 208, 0.8);
}
.toast--success .toast__icon {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.toast--success .toast__progress {
  background: #22c55e;
}

.toast--error {
  background: rgba(255, 241, 242, 0.95);
  color: #9f1239;
  border: 1px solid rgba(254, 205, 211, 0.8);
}
.toast--error .toast__icon {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}
.toast--error .toast__progress {
  background: #f43f5e;
}

.toast--info {
  background: rgba(240, 253, 244, 0.97);
  color: #166534;
  border: 1px solid rgba(187, 247, 208, 0.8);
}
.toast--info .toast__icon {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.toast--info .toast__progress {
  background: #22c55e;
}

.toast--warning {
  background: rgba(255, 251, 235, 0.95);
  color: #92400e;
  border: 1px solid rgba(253, 230, 138, 0.8);
}
.toast--warning .toast__icon {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}
.toast--warning .toast__progress {
  background: #f59e0b;
}
.spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.spinner__ring {
  border-radius: 50%;
  border-style: solid;
  animation: spin 0.75s linear infinite;
}

.spinner--sm .spinner__ring { width: 18px; height: 18px; border-width: 2px; }
.spinner--md .spinner__ring { width: 32px; height: 32px; border-width: 3px; }
.spinner--lg .spinner__ring { width: 48px; height: 48px; border-width: 4px; }

.spinner--carnation .spinner__ring {
  border-color: rgba(249,101,102,0.2);
  border-top-color: #F96566;
}
.spinner--white .spinner__ring {
  border-color: rgba(255,255,255,0.25);
  border-top-color: white;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* ═══════════════════════════════════════════════════════════
   MembershipRequiredCard  — two-zone paywall card
   ═══════════════════════════════════════════════════════════ */

.mrc {
  width: 100%;
  max-width: 400px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-family);
}

@media (max-width: 480px) {
  .mrc {
    width: calc(100% - 32px);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── Top gradient zone ── */
.mrc__header {
  background: linear-gradient(160deg, var(--color-carnation) 0%, #e84d6a 55%, #d63660 100%);
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: relative;
  /* subtle circles for depth */
  overflow: hidden;
}

.mrc__header::before,
.mrc__header::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.mrc__header::before {
  width: 200px;
  height: 200px;
  top: -60px;
  left: -60px;
}
.mrc__header::after {
  width: 160px;
  height: 160px;
  bottom: -50px;
  right: -40px;
}

.mrc__lock-bubble {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  margin-bottom: 0;
}

.mrc__tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
}

.mrc__title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.25;
}

.mrc__subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  line-height: 1.45;
  max-width: 260px;
}

/* ── Bottom white zone ── */
.mrc__body {
  background: #ffffff;
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Benefits list */
.mrc__benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  width: 100%;
}

.mrc__benefit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f5e8e8;
}

.mrc__benefit-row:last-child {
  border-bottom: none;
}

.mrc__benefit-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #fff0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.mrc__benefit-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-dark);
  line-height: 1.3;
}

/* Social proof row */
.mrc__social-proof {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff5f5;
  border: 1px solid #f5dede;
  border-radius: 50px;
  padding: 8px 16px;
  margin-bottom: 18px;
  width: fit-content;
  align-self: center;
}

.mrc__avatars {
  display: flex;
  align-items: center;
}

.mrc__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff5f5;
  margin-left: -8px;
  flex-shrink: 0;
}

.mrc__avatars .mrc__avatar:first-child {
  margin-left: 0;
}

.mrc__social-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-dark);
}

/* CTA button */
.mrc__btn {
  width: 100%;
  padding: 15px 24px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--color-carnation) 0%, #e84d6a 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(249, 101, 102, 0.45);
  transition: var(--transition);
  font-family: var(--font-family);
  margin-bottom: 10px;
}

.mrc__btn:hover {
  box-shadow: 0 8px 28px rgba(249, 101, 102, 0.55);
  transform: translateY(-1px);
}

.mrc__btn:active {
  transform: translateY(0);
}

/* Pricing note */
.mrc__pricing {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0 0 10px;
  text-align: center;
}

.mrc__pricing strong {
  color: var(--color-dark);
}

/* Maybe later link */
.mrc__btn-later {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 0;
  font-family: var(--font-family);
  transition: color 0.15s;
}

.mrc__btn-later:hover {
  color: var(--color-dark);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .mrc__header {
    padding: 18px 16px 20px;
    gap: 6px;
  }

  .mrc__lock-bubble {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .mrc__lock-bubble svg {
    width: 20px;
    height: 20px;
  }

  .mrc__tag {
    font-size: 10px;
  }

  .mrc__title {
    font-size: 17px;
  }

  .mrc__subtitle {
    font-size: 13px;
    max-width: 240px;
  }

  .mrc__body {
    padding: 14px 16px 14px;
  }

  .mrc__benefits {
    margin-bottom: 12px;
  }

  .mrc__benefit-row {
    padding: 7px 0;
    gap: 10px;
  }

  .mrc__benefit-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 14px;
  }

  .mrc__benefit-icon svg {
    width: 15px;
    height: 15px;
  }

  .mrc__benefit-text {
    font-size: 13px;
  }

  .mrc__social-proof {
    padding: 6px 12px;
    margin-bottom: 12px;
  }

  .mrc__social-text {
    font-size: 11.5px;
  }

  .mrc__btn {
    font-size: 14px;
    padding: 12px 20px;
    margin-bottom: 8px;
  }

  .mrc__pricing {
    font-size: 11px;
    margin-bottom: 0;
  }
}
/* ═══════════════════════════════════════════════════════════
   MembershipGate — blur wrapper + centered overlay
   ═══════════════════════════════════════════════════════════ */

.mg-wrapper {
  position: relative;
  height: calc(100vh - 80px);
  overflow: hidden;
}

.mg-blur {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
  height: 100%;
  overflow: hidden;
}

.mg-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(2px);
  z-index: 10;
  padding: 16px;
}

/* On mobile: center the card in the viewport, matching the Hire feed paywall */
@media (max-width: 768px) {
  .mg-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    padding: 16px;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
  }

  .mg-overlay__stack {
    width: calc(100vw - 32px);
    max-width: 400px;
    max-height: calc(100dvh - 120px);
  }

  .mg-overlay .mrc {
    width: 100%;
    max-width: 400px;
  }
}

/* ═══════════════════════════════════════════════════════════
   mg-overlay__stack — vertical stack: star banner + paywall
   ═══════════════════════════════════════════════════════════ */

.mg-overlay__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════
   StarOfferBanner — compact purple banner above the paywall
   ═══════════════════════════════════════════════════════════ */

.mg-star-banner {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 50%, #8b5cf6 100%);
  color: #fff;
  border-radius: 16px;
  padding: 16px 42px 16px 16px; /* right padding for close button */
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(109, 40, 217, 0.45);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mg-star-banner__glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 110px;
  height: 110px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.mg-star-banner__icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
  filter: drop-shadow(0 2px 6px rgba(255, 200, 0, 0.5));
}

.mg-star-banner__content {
  flex: 1;
  min-width: 0;
}

.mg-star-banner__title {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
}

.mg-star-banner__body {
  font-size: 0.76rem;
  opacity: 0.88;
  line-height: 1.5;
  margin-bottom: 10px;
}

.mg-star-banner__expiry {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  padding: 3px 10px;
  margin-bottom: 10px;
  display: inline-block;
}

.mg-star-banner__btn {
  background: #fff;
  color: #6d28d9;
  border: none;
  border-radius: 50px;
  padding: 9px 20px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s;
  font-family: var(--font-family);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.mg-star-banner__btn:hover { opacity: 0.9; }
.mg-star-banner__btn:disabled { opacity: 0.65; cursor: not-allowed; }

.mg-star-banner__error {
  font-size: 0.72rem;
  color: #fca5a5;
  font-weight: 600;
  margin: 6px 0 0;
}

.mg-star-banner__close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: rgba(255, 255, 255, 0.85);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}

.mg-star-banner__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

@media (max-width: 480px) {
  .mg-overlay__stack {
    gap: 10px;
  }

  .mg-star-banner {
    border-radius: 14px;
    padding: 14px 38px 14px 14px;
  }

  .mg-star-banner__title {
    font-size: 0.83rem;
  }

  .mg-star-banner__body {
    font-size: 0.72rem;
  }
}
/* App-level styles */
#root {
  min-height: 100vh;
  overflow-x: hidden;
}
