/* ============================================================
   CommodityNode — Clerk Auth Styles
   ============================================================ */

/* ---------- Auth Area (Header) ---------- */
.clerk-auth-area {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 12px;
}

/* ---------- Auth Buttons ---------- */
.clerk-btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
}

.clerk-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #9494a8;
}

.clerk-btn-ghost:hover {
  border-color: rgba(34, 211, 238, 0.4);
  color: #f0f0f5;
  background: rgba(34, 211, 238, 0.06);
}

.clerk-btn-primary {
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
  border: 1px solid transparent;
  color: #050508;
  box-shadow: 0 2px 12px rgba(34, 211, 238, 0.25);
}

.clerk-btn-primary:hover {
  background: linear-gradient(135deg, #67e8f9 0%, #22d3ee 100%);
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.4);
  transform: translateY(-1px);
}

.clerk-btn-sm {
  font-size: 0.72rem;
  padding: 5px 10px;
}

/* ---------- User Menu ---------- */
.clerk-user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clerk-avatar-wrap {
  position: relative;
}

.clerk-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(34, 211, 238, 0.3);
  object-fit: cover;
}

.clerk-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ---------- Meter Badge ---------- */
.clerk-meter-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #9494a8;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.02em;
  white-space: nowrap;
  min-width: 52px;
  text-align: center;
}

.clerk-meter-badge.cn-meter-full {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.3);
  background: rgba(244, 63, 94, 0.08);
}

/* ---------- Blur Wrapper ---------- */
.cn-blur-wrapper {
  position: relative;
  margin: 32px 0;
  border-radius: 14px;
  overflow: hidden;
}

.cn-blur-content {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  padding: 24px;
}

.cn-blur-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 8, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 10;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.1);
}

/* ---------- Blur CTA ---------- */
.cn-blur-cta {
  text-align: center;
  padding: 40px 32px;
  max-width: 420px;
  animation: cn-slide-up 0.5s ease-out;
}

@keyframes cn-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cn-blur-cta svg {
  margin-bottom: 16px;
  opacity: 0.8;
}

.cn-blur-cta h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f0f0f5;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.cn-blur-cta p {
  font-size: 0.88rem;
  color: #9494a8;
  line-height: 1.6;
  margin-bottom: 12px;
}

.cn-blur-price {
  font-size: 0.8rem !important;
  color: #22d3ee !important;
  font-weight: 600;
}

.cn-blur-cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.cn-blur-cta-buttons .clerk-btn-primary {
  padding: 10px 28px;
  font-size: 0.88rem;
}

.cn-blur-cta-buttons .clerk-btn-ghost {
  font-size: 0.78rem;
  border: none;
  padding: 6px 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .clerk-auth-area {
    gap: 6px;
    margin-right: 8px;
  }

  .clerk-btn {
    font-size: 0.72rem;
    padding: 5px 10px;
  }

  .clerk-meter-badge {
    font-size: 0.62rem;
    padding: 2px 6px;
  }

  .cn-blur-cta {
    padding: 28px 20px;
  }

  .cn-blur-cta h3 {
    font-size: 1.1rem;
  }
}

/* ---------- Mobile Auth (hamburger nav 안) ---------- */
.clerk-auth-area-mobile {
  display: none;
}

.clerk-auth-nav {
  display: none;
  padding: 16px 0 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 8px;
  gap: 8px;
  flex-direction: column;
}

@media (max-width: 768px) {
  /* 데스크탑 auth 영역 숨김 */
  .clerk-auth-area {
    display: none !important;
  }

  /* 모바일 아바타 — 햄버거 버튼 왼쪽에 아바타만 표시 (로그인시) */
  .clerk-auth-area-mobile {
    display: flex;
    align-items: center;
    margin-right: 4px;
  }

  /* nav 열리면 auth 버튼 표시 */
  .main-nav.open .clerk-auth-nav {
    display: flex;
  }

  .clerk-auth-nav .clerk-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 0.88rem;
    justify-content: center;
  }

  .clerk-auth-nav .clerk-meter-badge {
    text-align: center;
    margin-bottom: 4px;
  }

  .clerk-auth-nav .clerk-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 12px;
    color: #f0f0f5;
    font-size: 0.88rem;
  }
}

@media (max-width: 480px) {
  .clerk-auth-area .clerk-btn-ghost:not(.clerk-btn-sm) {
    display: none;
  }
}
