/**
 * FreeCreditHub — Header companion CSS
 * Brand restore + hamburger icon + unified header actions.
 */

/* Ensure brand mark is visible again (undo prior mobile logo hide) */
.site-header .nav > .brand .brand-mark {
  display: inline-grid !important;
}

.site-header .nav > .brand .fch-mobile-header-logo,
.mobile-menu-header .mobile-menu-logo,
.mobile-menu-header .mobile-menu-logo-text {
  display: none !important;
}

.mobile-menu-header .brand .brand-mark {
  display: inline-grid !important;
}

.mobile-menu-header .brand > span:not(.brand-mark) {
  display: inline !important;
}

/* ---------- Hamburger: CDN icon, borderless ---------- */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.menu-toggle > span {
  display: none !important;
}

.menu-toggle .fch-hamburger-icon {
  display: block !important;
  width: 28px;
  height: auto;
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.menu-toggle:focus-visible {
  outline: 2px solid #326de8 !important;
  outline-offset: 2px !important;
}

/* FCH header unified v3 */

/* Hide legacy long Telegram pill — circular button replaces it */
.site-header .nav > a.nav-cta.telegram-cta,
.site-header .nav > a.nav-cta {
  display: none !important;
}

/* Shared right action group — always on */
.fch-header-actions {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex: 0 0 auto;
  margin-left: auto !important;
  margin-right: 0 !important;
  padding: 0 !important;
  order: 3;
}

.site-header .nav > .brand {
  order: 1;
  flex: 0 1 auto;
  min-width: 0;
}

.site-header .nav > .desktop-menu {
  order: 2;
  display: none !important; /* compact default */
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.fch-header-action {
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0;
  border-radius: 50% !important;
  text-decoration: none;
  line-height: 0;
  flex: 0 0 28px !important;
  -webkit-tap-highlight-color: transparent;
}

.fch-header-telegram {
  color: #ffffff !important;
  background: linear-gradient(135deg, #4d91ff 0%, #326de8 50%, #194cbf 100%) !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.fch-header-telegram svg {
  width: 16px !important;
  height: 16px !important;
  display: block;
  color: #fff !important;
  fill: currentColor;
}

.fch-header-joylink {
  background: transparent;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

/* Fill the full 28px circle; slight scale crops soft PNG fringe so yellow matches TG blue diameter */
.fch-header-joylink img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
  pointer-events: none;
  border-radius: 50%;
  transform: scale(1.12);
  transform-origin: center center;
}

/* Hamburger: hug visible icon so flex gap = true icon-to-icon spacing */
.fch-header-actions > .menu-toggle,
.site-header .nav .menu-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  order: unset;
  line-height: 0 !important;
}

.fch-header-actions > .menu-toggle .fch-hamburger-icon {
  display: block !important;
  margin: 0 !important;
}

.mobile-menu > a.mobile-telegram {
  display: none !important;
}

/* Keep mobile full-bleed nav spacing from prior approval */
@media (max-width: 900px) {
  .site-header .nav.container {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-left: 16px !important;
    padding-right: 5px !important;
  }
}

@media (min-width: 561px) and (max-width: 900px) {
  .site-header .nav.container {
    padding-left: 20px !important;
    padding-right: 5px !important;
  }
}

/*
 * Expanded Header — wide CSS viewport (e.g. desktop window at ~90% zoom).
 * Compact remains default below this width (typical 100% desktop).
 */
/*
 * Expanded Header — very wide CSS viewport (desktop window zoomed out ~90%).
 * Typical 100% desktop widths stay compact (logo | TG | Joy | Menu).
 */
@media (min-width: 2000px) {
  .site-header .nav > .desktop-menu {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0 16px;
    padding: 0;
    list-style: none;
  }

  .site-header .nav.container {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }
}
