/* ============================================================================
   iTRAILERSALES.COM — HEADER AUTH WIDGET STYLES
   ============================================================================
   Styles for the markup injected by header-auth.js into the <li id="nav-auth">
   slot in the main nav. Pulled out into a shared stylesheet so every public
   page can include this once via <link rel="stylesheet" href="/header-auth.css">
   instead of duplicating the rules. If you tweak nav widget styling, change
   it here and every page picks it up.

   Expectations about the host page:
     - A nav structured as <header class="main-nav"> > <ul class="nav-links">
     - --accent CSS variable defined (the iTS orange #f57c1f)

   The selectors are scoped under .nav-links so they don't leak to any other
   element on the page that might accidentally share a class name.
   ============================================================================ */

/* Logged-out state: Sign In + Create Account links */
.nav-links a.nav-auth-signin {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  margin-right: 6px;
  padding: 6px 4px;
  transition: color 0.15s;
}
.nav-links a.nav-auth-signin:hover { color: var(--accent); }

.nav-links a.nav-auth-signup {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-links a.nav-auth-signup:hover {
  background: var(--accent);
  color: #fff;
}

/* Logged-in state: avatar circle that toggles the dropdown */
.nav-auth-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  user-select: none;
  cursor: pointer;
  transition: transform 0.1s;
  border: 2px solid transparent;
}
.nav-auth-avatar:hover { transform: scale(1.05); }
.nav-auth-avatar.open { border-color: rgba(255, 255, 255, 0.3); }

/* The dropdown menu. Higher-specificity selectors (scoping under .nav-links)
   so we override the parent .nav-links a { color: #fff } rule used on the
   dark public-site header. */
.nav-links .nav-auth-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(12, 24, 48, 0.18);
  min-width: 240px;
  z-index: 200;
  overflow: hidden;
}
/* IMPORTANT: this `.hidden` class is the one toggled by header-auth.js. It is
   intentionally scoped under .nav-links .nav-auth-menu so we don't conflict
   with any page-local `.hidden` utility class (faq.html has one, for example). */
.nav-links .nav-auth-menu.hidden { display: none; }

.nav-links .nav-auth-menu-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e4e4e4;
  background: #f5f5f4;
}
.nav-links .nav-auth-menu-name {
  font-size: 14px;
  font-weight: 700;
  color: #0c1830;
  margin-bottom: 2px;
  word-break: break-word;
}
.nav-links .nav-auth-menu-email {
  font-size: 12px;
  color: #5a6478;
  word-break: break-all;
}
.nav-links .nav-auth-menu-role {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-top: 4px;
}

.nav-links .nav-auth-menu-item,
.nav-links a.nav-auth-menu-item,
.nav-links button.nav-auth-menu-item {
  display: block;
  padding: 12px 16px;
  color: #0c1830;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.nav-links .nav-auth-menu-item:hover,
.nav-links a.nav-auth-menu-item:hover,
.nav-links button.nav-auth-menu-item:hover { background: #f5f5f4; color: #0c1830; }
.nav-links .nav-auth-menu-divider { height: 1px; background: #e4e4e4; }

.nav-links .nav-auth-menu-item-danger,
.nav-links button.nav-auth-menu-item-danger { color: #dc2626; }
.nav-links .nav-auth-menu-item-danger:hover,
.nav-links button.nav-auth-menu-item-danger:hover { color: #dc2626; background: #fef2f2; }

.nav-links .nav-auth-menu-item-admin,
.nav-links a.nav-auth-menu-item-admin {
  color: var(--accent);
  font-weight: 600;
}
.nav-links .nav-auth-menu-item-admin:hover,
.nav-links a.nav-auth-menu-item-admin:hover { color: var(--accent); background: #f5f5f4; }

/* The host <li#nav-auth> must be position:relative so the absolutely-positioned
   dropdown anchors correctly to it. Also flex so the avatar + dropdown trigger
   are aligned with the rest of the nav items. */
.nav-links li#nav-auth {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
