/* ─────────────────────────────────────────────────────────────────────────────
   GiftFlow — Invite Gate Styles
   Consolidated from assets/css/invite/gf-invite.css (Phase 13D)
   Covers: homepage modal overlay + inline invite step on /login register view
───────────────────────────────────────────────────────────────────────────── */

/* ── OVERLAY ─────────────────────────────────────────────────────────────── */

.gf-invite-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  backdrop-filter: blur(2px);
}

.gf-invite-overlay.is-open {
  display: block;
}

body.gf-invite-modal-open {
  overflow: hidden;
}

/* ── MODAL ───────────────────────────────────────────────────────────────── */

.gf-invite-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px 32px;
  width: min(480px, calc(100vw - 32px));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
  animation: gf-invite-in 0.22s ease;
}

.gf-invite-modal.is-open {
  display: block;
}

@keyframes gf-invite-in {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

.gf-invite-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #888;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s;
}

.gf-invite-modal__close:hover {
  color: #333;
}

.gf-invite-modal__brand {
  margin-bottom: 20px;
}

.gf-invite-modal__brand img {
  height: 28px;
  width: auto;
}

.gf-invite-modal__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1a1333;
}

.gf-invite-modal__sub {
  font-size: 14px;
  color: #666;
  margin: 0 0 20px;
  line-height: 1.5;
}

.gf-invite-modal__no-code {
  margin-top: 14px;
  font-size: 13px;
  color: #888;
  text-align: center;
}

.gf-invite-modal__login-hint {
  margin-top: 8px;
  font-size: 13px;
  color: #aaa;
  text-align: center;
}

.gf-invite-modal__no-code a,
.gf-invite-modal__login-hint a {
  color: #7b5cff;
  text-decoration: none;
}

.gf-invite-modal__no-code a:hover,
.gf-invite-modal__login-hint a:hover {
  text-decoration: underline;
}

/* ── STEPS (modal) ───────────────────────────────────────────────────────── */

.gf-invite-step {
  display: none;
}

.gf-invite-step.is-active {
  display: block;
}

/* ── DONE STEP ───────────────────────────────────────────────────────────── */

.gf-invite-done-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

/* ── SHARED FIELD ────────────────────────────────────────────────────────── */

.gf-invite-field {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.gf-invite-input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}

.gf-invite-input:focus {
  border-color: #7b5cff;
}

.gf-invite-btn {
  height: 44px;
  padding: 0 20px;
  background: #7b5cff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, opacity 0.15s;
}

.gf-invite-btn:hover {
  background: #6a4de8;
}

.gf-invite-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ── ERROR / SUCCESS MESSAGES ────────────────────────────────────────────── */

.gf-invite-error {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.gf-invite-success {
  margin-top: 10px;
  padding: 10px 14px;
  background: #f0fdf4;
  color: #15803d;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}

/* ── COMPACT CARD HEAD (invite gate + region-blocked views) ─────────────── */

.gf-entry-card__head--compact {
  margin-bottom: 4px;
}

.gf-entry-card__head--compact h2 {
  margin-bottom: 0;
}

.gf-registration-gate {
  text-align: center;
  padding-top: 8px;
}

.gf-registration-gate .gf-gate-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.gf-registration-gate h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #111328;
}

.gf-registration-gate p {
  font-size: 14px;
  color: #666;
  margin: 0 0 4px;
  line-height: 1.5;
}

.gf-registration-gate .gf-auth-field,
.gf-registration-gate .gf-auth-btn {
  text-align: left;
}

/* ── INLINE INVITE STEP (on /login register view) ────────────────────────── */

.gf-invite-step-inline {
  padding: 8px 0 16px;
}

.gf-invite-step-inline__badge {
  display: inline-block;
  background: linear-gradient(135deg, #7b5cff, #a78bfa);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  box-shadow: 0 8px 18px rgba(123, 92, 255, 0.28);
}

.gf-invite-step-inline__title {
  margin: 0 0 10px;
  color: #111328;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: 0;
}

.gf-invite-step-inline__label {
  font-size: 15px;
  color: #494569;
  font-weight: 500;
  margin: 0 0 14px;
  line-height: 1.6;
}

.gf-invite-step-inline__cta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 22px;
  padding: 10px 14px;
  border: 1px solid rgba(123, 92, 255, 0.2);
  border-radius: 10px;
  background: rgba(123, 92, 255, 0.06);
  color: #494569;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

/* ── SUCCESS CARD (register interest / region interest "done" states) ───── */

.gf-invite-success-card {
  text-align: center;
  padding: 8px 0 4px;
}

.gf-invite-success-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecfdf3, #d4f7e3);
  box-shadow: 0 10px 24px rgba(21, 128, 61, 0.18);
}

.gf-invite-success-card .gf-invite-step-inline__title {
  text-align: center;
}

.gf-invite-success-card .gf-invite-step-inline__label {
  text-align: center;
  margin-bottom: 0;
}

.gf-invite-step-inline__label a {
  color: #7b5cff;
  text-decoration: none;
}

.gf-invite-step-inline__label a:hover {
  text-decoration: underline;
}

.gf-invite-step-inline .gf-invite-field {
  flex-direction: column;
  gap: 10px;
}

.gf-invite-step-inline .gf-invite-input {
  width: 100%;
}

.gf-invite-step-inline .gf-invite-btn {
  width: 100%;
}

.gf-invite-step-inline__no-code {
  margin-top: 12px;
  font-size: 13px;
  color: #999;
  text-align: center;
}

.gf-invite-step-inline__no-code a {
  color: #7b5cff;
  text-decoration: none;
}

.gf-invite-step-inline__no-code a:hover {
  text-decoration: underline;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .gf-invite-modal {
    padding: 28px 20px 24px;
    border-radius: 12px 12px 0 0;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    animation: gf-invite-in-mobile 0.25s ease;
  }

  @keyframes gf-invite-in-mobile {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
  }

  .gf-invite-field {
    flex-direction: column;
  }

  .gf-invite-btn {
    width: 100%;
  }
}
