/* ── CLERK AUTH OVERRIDES ─────────────────────────────────────────────────
   Sanctum brand styling for Clerk authentication components.
   Loaded on all pages that include Clerk scripts.
   DO NOT edit omd-styles.css for Clerk-specific rules — keep them here.
   ──────────────────────────────────────────────────────────────────────── */

/* ── Header account slot container ── */
.nav__account-item {
  display: flex;
  align-items: center;
  margin-left: 4px;
}

#header-account-slot {
  display: flex;
  align-items: center;
}

/* ── Sign In link (signed-out state) ── */
.nav__sign-in-link {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #e8e0d4;
  text-decoration: none;
  border: 1px solid rgba(232, 224, 212, 0.3);
  padding: 6px 14px;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav__sign-in-link:hover {
  border-color: #8b7355;
  color: #8b7355;
}

/* ── Clerk UserButton: constrain avatar to nav bar height ── */
#header-account-slot .cl-userButtonBox,
#header-account-slot .cl-userButtonTrigger,
#header-account-slot .cl-avatarBox {
  width: 32px !important;
  height: 32px !important;
}

/* ── Mobile nav overrides ── */
@media (max-width: 768px) {
  /* Slot item matches other li spacing */
  .nav__account-item {
    margin-left: 0;
    border-bottom: 1px solid #1a1610;
    padding: 0;
  }

  /* Strip the desktop bordered-button look; inherit mobile nav link styles */
  .nav__sign-in-link {
    display: block;
    border: none;
    border-radius: 0;
    padding: 14px 0;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    color: #c8b080 !important;
    background: transparent;
    width: 100%;
  }

  .nav__sign-in-link:hover {
    border: none;
    color: #C9A84C !important;
    background: transparent;
  }

  /* UserButton avatar: left-aligned with same vertical rhythm as nav links */
  #header-account-slot {
    justify-content: flex-start;
    padding: 10px 0;
  }
}

/* ── PDP nav: slot is outside nav__menu, stays visible at all viewport sizes ──
   _pdp.css hides nav__menu at ≤1024px (no hamburger). The --pdp slot is a
   direct flex child of .nav, so it stays in the nav bar at mobile viewports.
   Restore bordered-button appearance; undo overlay-list styles from above.     */
@media (max-width: 1024px) {
  .nav__account-item--pdp {
    border-bottom: none;
    margin-left: 8px;
    padding: 0;
  }

  .nav__account-item--pdp .nav__sign-in-link {
    display: inline-block;
    border: 1px solid rgba(232, 224, 212, 0.3);
    padding: 6px 10px;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: #e8e0d4 !important;
    background: transparent;
    width: auto;
  }

  .nav__account-item--pdp .nav__sign-in-link:hover {
    border-color: #8b7355;
    color: #8b7355 !important;
  }

  .nav__account-item--pdp #header-account-slot {
    justify-content: center;
    padding: 0;
  }
}

/* ── Sign-in page layout ── */
.clerk-auth-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 70px);
  background: #080808;
  padding: 60px 20px;
}

.clerk-auth-container {
  width: 100%;
  max-width: 480px;
}

/* ── Clerk modal / card brand overrides ──────────────────────────────────
   These target Clerk's internal BEM class names (cl-* prefix).
   If Clerk updates their class names, these may need revisiting.
   ──────────────────────────────────────────────────────────────────────── */
.cl-card {
  background: #0f0f0f !important;
  border: 1px solid rgba(139, 115, 85, 0.2) !important;
  border-radius: 0 !important;
}

.cl-formButtonPrimary {
  background: #8b7355 !important;
  color: #e8e0d4 !important;
  border-radius: 0 !important;
  font-family: 'Josefin Sans', sans-serif !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
}

.cl-formButtonPrimary:hover {
  background: #a08060 !important;
}

.cl-headerTitle,
.cl-headerSubtitle {
  font-family: 'Josefin Sans', sans-serif !important;
  color: #e8e0d4 !important;
}

.cl-socialButtonsBlockButton {
  border-color: rgba(139, 115, 85, 0.3) !important;
  color: #e8e0d4 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.cl-footerActionLink {
  color: #8b7355 !important;
}

.cl-identityPreviewText,
.cl-formFieldLabel,
.cl-formFieldInput {
  color: #e8e0d4 !important;
  font-family: 'Josefin Sans', sans-serif !important;
}

.cl-formFieldInput {
  background: #1a1a1a !important;
  border-color: rgba(232, 224, 212, 0.15) !important;
  border-radius: 0 !important;
}

.cl-formFieldInput:focus {
  border-color: #8b7355 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* ── PREVIEW MODE — Sanctum Soft Launch ─────────────────────────────────── */
.preview-mode-hidden { display: none !important; }

.preview-banner {
  background: rgba(201, 168, 76, 0.05);
  border-top: 1px solid rgba(201, 168, 76, 0.5);
  border-bottom: 1px solid rgba(201, 168, 76, 0.5);
  padding: 14px 52px 14px 24px;
  text-align: center;
  position: relative;
}

.preview-banner__text {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #C9A84C;
  line-height: 1.9;
}

.preview-banner__close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #C9A84C;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.preview-banner__close:hover { opacity: 1; }

.preview-msg {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #C9A84C;
  font-style: italic;
  margin-top: 10px;
  text-align: center;
  line-height: 1.9;
  opacity: 0.9;
}
