/* ==========================================================================
   HIRELY AGENCY — CALIBRATED CONTENT BOUNDARY SYSTEM
   Maintains a tight, professional spacing (~12px - 16px) between header and content.
   Prevents double-padding on sticky headers and stops cards from colliding.
   ========================================================================== */

:root {
  --page-top-gap-desktop: 1.25rem; /* ~20px */
  --page-top-gap-mobile: 0.75rem;   /* ~12px */
}

/* --------------------------------------------------------------------------
   1. PORTAL FAMILY & ALL INNER PAGES
   -------------------------------------------------------------------------- */
body[data-page="verification"] #main,
body[data-page="support"] #main,
body[data-page="jobs"] #main,
body[data-page="job"] #main,
body[data-page="apply"] #main,
body[data-page="applications"] #main,
body[data-page="saved-jobs"] #main,
body[data-page="profile"] #main,
body[data-page="notifications"] #main,
body[data-page="payment"] #main,
body[data-page="dashboard"] #main,
main.portal-main,
#main.portal-content,
body:not([data-page="landing"]) #main {
  box-sizing: border-box;
  width: 100%;
  margin-top: 0 !important;
  /* Tight, calibrated distance right under the navigation bar */
  padding-top: var(--page-top-gap-desktop) !important;
  padding-bottom: 3rem;
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
}

@media (max-width: 768px) {
  body[data-page="verification"] #main,
  body[data-page="support"] #main,
  body[data-page="jobs"] #main,
  body[data-page="job"] #main,
  body[data-page="apply"] #main,
  body[data-page="applications"] #main,
  body[data-page="saved-jobs"] #main,
  body[data-page="profile"] #main,
  body[data-page="notifications"] #main,
  body[data-page="payment"] #main,
  body[data-page="dashboard"] #main,
  body:not([data-page="landing"]) #main {
    padding-top: var(--page-top-gap-mobile) !important;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
  }
}

/* --------------------------------------------------------------------------
   2. REMOVE EXCESSIVE MARGINS ON THE VERY FIRST CHILD OF #main
   (e.g., banner notices, alerts, cards)
   -------------------------------------------------------------------------- */
#main > *:first-child,
#main > section:first-of-type,
#main > .alert:first-child,
#main > .notice:first-child,
.email-unverified-notice,
.unverified-banner {
  margin-top: 0 !important;
}

/* --------------------------------------------------------------------------
   3. SUPPORT.HTML SPECIFIC GUARD (Cards start cleanly, no icon overflow)
   -------------------------------------------------------------------------- */
.support-hero,
.support-container,
.support-grid,
.contact-cards-grid,
.contact-grid {
  margin-top: 0 !important;
  transform: none !important;
}

.support-card,
.contact-card,
.info-card {
  position: relative;
  overflow: visible;
  margin-top: 0 !important;
}

.support-card .card-icon,
.contact-card .card-icon,
.support-card .icon-wrap,
.contact-card .icon-wrap {
  position: static !important;
  margin-bottom: 0.75rem !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   4. LANDING PAGE EXCLUSION
   -------------------------------------------------------------------------- */
body[data-page="landing"] #main {
  padding-top: 0 !important;
}

/* hirely-portal-dashboard-bell-v1 BEGIN */
body[data-portal-bell="dashboard"] .notif-bell {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 6px !important;
  margin: 0 4px !important;
  background: transparent !important;
  border: none !important;
  color: inherit !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  overflow: visible !important;
}
body[data-portal-bell="dashboard"] .notif-bell .bell-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.25rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25)) !important;
}
body[data-portal-bell="dashboard"] .notif-bell #header-notif-count {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  box-sizing: border-box !important;
  min-width: 17px !important;
  width: auto !important;
  height: 17px !important;
  margin: 0 !important;
  padding: 0 4px !important;
  background: #e74c3c !important;
  color: #ffffff !important;
  border: 1.5px solid #061B30 !important;
  border-radius: 9999px !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}
body[data-portal-bell="dashboard"] .notif-bell #header-notif-count:empty,
body[data-portal-bell="dashboard"] .notif-bell #header-notif-count[hidden] {
  display: none !important;
}
/* hirely-portal-dashboard-bell-v1 END */


/* HIRELY_BUTTON_SPINNER_V1_START */

/*
 * Presentation only: the action handler owns the pending state.
 * Do not infer loading from disabled alone.
 */
button[aria-busy="true"] {
  cursor: progress;
}

button[aria-busy="true"] > .spinner {
  display: inline-block;
  position: static;
  inset: auto;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 0;
  margin-inline-end: 0.5em;
  padding: 0;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  opacity: 1;
  vertical-align: -0.15em;
  transform-origin: center;
  pointer-events: none;
  animation: hirely-button-spin-v1 700ms linear infinite;
}

@keyframes hirely-button-spin-v1 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  button[aria-busy="true"] > .spinner {
    animation: none;
    transform: none;
  }
}

@media (forced-colors: active) {
  button[aria-busy="true"] > .spinner {
    forced-color-adjust: auto;
  }
}

/* HIRELY_BUTTON_SPINNER_V1_END */

/* ============================================================
   Hirely — Auto-Hide Header on Scroll
   ============================================================ */
.site-header {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease !important;
  will-change: transform;
}
.site-header.header-hidden {
  transform: translateY(-100%) !important;
  box-shadow: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none !important;
  }
}

/* ==========================================================================
   HIRELY_PUBLIC_NAV_DRAWER_CONSOLIDATION_V1
   Hide outside desktop auth clusters on mobile viewports so all navigation
   remains cleanly inside the drawer (#mobile-nav-panel).
   ========================================================================== */
@media (max-width: 768px) {
  .site-header .nav-actions .hirely-desktop-auth-cluster,
  header .nav-actions .hirely-desktop-auth-cluster {
    display: none !important;
  }
}


/* ==========================================================================
   HIRELY_BORDERLESS_ARCHITECTURAL_STREAM_V4_AUDITED_BRAND
   Open, box-free navigation stream with exact audited Header Brand Lockup
   (./assets/images/logo.png + .hirely-brand-lockup with 4px gap), indented
   hairlines, free-floating multi-tone realistic colored SVG icons, and
   glowing laser active bar.
   ========================================================================== */
@keyframes hirelyStreamFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes hirelyStreamRowSlide {
  0% {
    opacity: 0;
    transform: translateX(-12px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

#mobile-nav-panel.mobile-nav {
  background:
    radial-gradient(520px 320px at 0% 12%, rgba(56, 189, 248, 0.08), transparent 65%),
    radial-gradient(500px 360px at 100% 88%, rgba(212, 175, 55, 0.08), transparent 65%),
    linear-gradient(180deg, #051322 0%, #030B14 100%) !important;
  backdrop-filter: blur(20px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(170%) !important;
  padding: 1.15rem 1.5rem 2.25rem !important;
}

#mobile-nav-panel.mobile-nav.open {
  animation: hirelyStreamFadeIn 0.22s ease-out both !important;
}

/* Open, Box-Free Header with Exact Audited Brand Lockup */
#mobile-nav-panel .mobile-nav-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.15rem 0 1.05rem !important;
  margin: 0 0 0.5rem !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#mobile-nav-panel .mobile-nav-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #FFFFFF !important;
  font-family: 'Poppins', system-ui, sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: -0.2px !important;
  line-height: 1.2 !important;
}

#mobile-nav-panel .mobile-nav-title::before {
  content: none !important;
  display: none !important;
}

#mobile-nav-panel .mobile-nav-title img.brand-mark,
#mobile-nav-panel .mobile-nav-title img.brand-logo {
  display: inline-block !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

#mobile-nav-panel .mobile-nav-title .hirely-brand-lockup {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

#mobile-nav-panel .mobile-nav-title .hirely-brand-text {
  color: #FFFFFF !important;
  font-family: 'Poppins', system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-size: 20px !important;
  letter-spacing: -0.2px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#mobile-nav-panel .mobile-nav-title .hirely-brand-badge,
#mobile-nav-panel .mobile-nav-title .badge {
  display: inline-flex !important;
  align-items: center !important;
  background: #D4AF37 !important;
  color: #061B30 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  font: 700 12px/1.5 'Poppins', system-ui, sans-serif !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  vertical-align: middle !important;
  margin: 0 !important;
}

#mobile-nav-panel .mobile-nav-close-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #94A3B8 !important;
  font-size: 1.75rem !important;
  line-height: 1 !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease !important;
}

#mobile-nav-panel .mobile-nav-close-btn:hover,
#mobile-nav-panel .mobile-nav-close-btn:focus-visible {
  transform: rotate(90deg) scale(1.1) !important;
  color: #F8FAFC !important;
  background: transparent !important;
}

/* Borderless Stream List with Indented Hairlines */
#mobile-nav-panel ul {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#mobile-nav-panel ul > li {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: linear-gradient(
    90deg,
    transparent 0px,
    transparent 44px,
    rgba(255, 255, 255, 0.065) 44px,
    rgba(255, 255, 255, 0.065) 100%
  ) bottom / 100% 1px no-repeat !important;
}

#mobile-nav-panel ul > li:last-of-type,
#mobile-nav-panel ul > li:nth-last-child(2) {
  background: none !important;
}

#mobile-nav-panel.open ul > li {
  animation: hirelyStreamRowSlide 0.32s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}
#mobile-nav-panel.open ul > li:nth-child(1) { animation-delay: 20ms !important; }
#mobile-nav-panel.open ul > li:nth-child(2) { animation-delay: 40ms !important; }
#mobile-nav-panel.open ul > li:nth-child(3) { animation-delay: 60ms !important; }
#mobile-nav-panel.open ul > li:nth-child(4) { animation-delay: 80ms !important; }
#mobile-nav-panel.open ul > li:nth-child(5) { animation-delay: 100ms !important; }
#mobile-nav-panel.open ul > li:nth-child(6) { animation-delay: 120ms !important; }
#mobile-nav-panel.open ul > li:nth-child(7) { animation-delay: 140ms !important; }
#mobile-nav-panel.open ul > li:nth-child(8) { animation-delay: 160ms !important; }
#mobile-nav-panel.open ul > li:nth-child(9) { animation-delay: 180ms !important; }

/* Open, Box-Free Link Rows */
#mobile-nav-panel a {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  padding: 0.95rem 0.25rem !important;
  min-height: 54px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #CBD5E1 !important;
  font-size: 1.04rem !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  text-decoration: none !important;
  transition: color 0.18s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#mobile-nav-panel a:hover,
#mobile-nav-panel a:active {
  color: #FFFFFF !important;
  background: transparent !important;
  transform: translateX(4px) !important;
}

/* Active Row: Glowing Left Laser Bar + Crisp White/Gold Text (No Box!) */
#mobile-nav-panel a.active {
  color: #FFFFFF !important;
  font-weight: 700 !important;
  background: radial-gradient(140px 44px at 18px 50%, rgba(212, 175, 55, 0.14), transparent 100%) !important;
}

#mobile-nav-panel a.active::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 22%;
  bottom: 22%;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #FDE68A 0%, #D4AF37 100%);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.85);
}

/* Free-Floating Realistic Colored SVG Icon Wrapper (Zero Box!) */
#mobile-nav-panel .hn-icon-box {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  flex-shrink: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35)) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), filter 0.22s ease !important;
}

#mobile-nav-panel a:hover .hn-icon-box,
#mobile-nav-panel a.active .hn-icon-box {
  transform: scale(1.14) translateY(-1px) !important;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5)) !important;
  background: transparent !important;
  border: none !important;
}

/* Badge & Right-Edge Chevron Alignment */
#mobile-nav-panel a .nav-badge:not(:empty) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: auto !important;
  margin-right: 10px !important;
  min-width: 22px !important;
  height: 22px !important;
  padding: 0 7px !important;
  border-radius: 9999px !important;
  background: linear-gradient(135deg, #FBBF24, #D97706) !important;
  color: #051322 !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4) !important;
}

#mobile-nav-panel .hn-chevron {
  margin-left: auto !important;
  color: rgba(148, 163, 184, 0.45) !important;
  font-size: 1.3rem !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

#mobile-nav-panel a .nav-badge:not(:empty) + .hn-chevron {
  margin-left: 0 !important;
}

#mobile-nav-panel a:hover .hn-chevron,
#mobile-nav-panel a.active .hn-chevron {
  transform: translateX(4px) !important;
  color: #FBBF24 !important;
}

/* Open, Box-Free Architectural Sign-Out Row */
#mobile-nav-panel .mobile-logout-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  width: 100% !important;
  min-height: 52px !important;
  margin-top: 0.85rem !important;
  padding: 1rem 0.25rem 0.5rem !important;
  background: transparent !important;
  border: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #F87171 !important;
  font-size: 1.02rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  transition: color 0.18s ease, transform 0.2s ease !important;
}

#mobile-nav-panel .mobile-logout-btn:hover,
#mobile-nav-panel .mobile-logout-btn:active {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #FCA5A5 !important;
  transform: translateX(4px) !important;
}

@media (prefers-reduced-motion: reduce) {
  #mobile-nav-panel.mobile-nav.open,
  #mobile-nav-panel.open ul > li,
  #mobile-nav-panel a,
  #mobile-nav-panel .hn-icon-box,
  #mobile-nav-panel .mobile-nav-close-btn,
  #mobile-nav-panel .hn-chevron,
  #mobile-nav-panel .mobile-logout-btn {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
