/* 친구 추천 · 크레딧 이벤트 팝업 (메인) */
.credit-event-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.credit-event-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.credit-event-backdrop.is-open .credit-event-popup {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.credit-event-popup {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: min(92vh, 640px);
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.credit-event-popup__hero {
  position: relative;
  padding: 28px 24px 22px;
  background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 45%, #3b82f6 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.credit-event-popup__hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 140%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 55%);
  pointer-events: none;
}

.credit-event-popup__badge {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.credit-event-popup__title {
  position: relative;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.credit-event-popup__rewards {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 8px;
}

.credit-event-popup__reward-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.credit-event-popup__reward-role {
  min-width: 3.2em;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.88;
  text-align: right;
}

.credit-event-popup__reward {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 14px 0 6px;
}

.credit-event-popup__amount {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.credit-event-popup__unit {
  font-size: 1.1rem;
  font-weight: 700;
  opacity: 0.92;
}

.credit-event-popup__subtitle {
  position: relative;
  font-size: 0.92rem;
  opacity: 0.92;
  line-height: 1.5;
}

.credit-event-popup__body {
  padding: 22px 24px 20px;
}

.credit-event-popup__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.credit-event-popup__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.5;
}

.credit-event-popup__list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--color-accent);
}

.credit-event-popup__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.credit-event-popup__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.credit-event-popup__cta--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.credit-event-popup__cta--primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
}

.credit-event-popup__cta--ghost {
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-weight: 600;
}

.credit-event-popup__cta--ghost:hover {
  background: #e8edf5;
}

.credit-event-popup__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.credit-event-popup__dismiss {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  cursor: pointer;
  user-select: none;
}

.credit-event-popup__dismiss input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.credit-event-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.credit-event-popup__close:hover {
  background: rgba(255, 255, 255, 0.32);
}

.credit-event-popup__note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  margin-top: 12px;
}

@media (max-width: 480px) {
  .credit-event-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .credit-event-popup {
    max-width: none;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
  }

  .credit-event-popup__title {
    font-size: 1.2rem;
  }

  .credit-event-popup__amount {
    font-size: 2.1rem;
  }
}
