/**
 * Shared nav + footer chrome (nav-link, dropdown, search-bar, .footer, newsletter).
 *
 * Canonical HTML for the top nav + dropdown: mirror `calculator/united-states.html`
 * (lines ~4556–4596). Same folder depth as `blog/*.html` uses identical relative `../images/*` paths.
 *
 * Navbar height/padding matches historical `index.html`: `.nav-left img` 48px (!important), wordmark 1.22rem.
 * Persistent green highlight: `#salary-link.nav-link.active` only (dropdown open), not `.nav-link.active`.
 *
 * Canonical footer markup + inline spacing: mirror `index.html` (footer ~773–813) and
 * the copyright strip (`#footer-copyright-text`). Pages in `blog/` use `../images/*`
 * and `../privacy.html`-style relatives; `blog.html` at site root matches `index.html` paths.
 *
 * Root utility pages using this sheet + the same HTML shell: `faq.html`, `contact.html`,
 * `privacy.html`, `imprint.html`, `consent.html` (plus `blog.html` and `blog/*.html`).
 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f9fafb;
  color: #1f2937;
  line-height: 1.6;
  font-size: 0.96em;
}

html {
  /* Matches #footer-copyright strip so short pages never show a light band below the footer */
  background-color: #181b20;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

/* Global breathing room between page content and shared footer across shell pages. */
body > main {
  margin-bottom: clamp(60px, 8vw, 88px);
}

.navbar {
  background-color: #1f2937;
  color: white;
  padding: 0.5rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Matches index.html nav row: wide container + homepage horizontal padding */
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
  padding: 0 2.5rem;
}

.nav-menu {
  display: flex;
  flex: 1 1 0%;
  min-width: 0;
  gap: 0.7rem;
  font-size: 0.95rem;
  align-items: center;
  list-style: none;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.13rem;
  padding: 0.32rem 0.6rem;
  border-radius: 0.375rem;
  transition: color 0.3s, background 0.3s;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.6;
  letter-spacing: 0;
}

.nav-link:hover {
  color: #34a853;
  background-color: rgba(52, 168, 83, 0.08);
  text-decoration: none;
}

/* Only “Salary Calculators” uses .active (dropdown open). Avoid stray .active on Blog/FAQ. */
#salary-link.nav-link.active {
  color: #34a853;
  background-color: rgba(52, 168, 83, 0.08);
  text-decoration: none;
}

/* Logo / wordmark — same compact bar as pre-refactor homepage (HTML may still say 64px; CSS wins) */
.nav-left img {
  width: 48px !important;
  height: 48px !important;
}

.nav-left span {
  font-size: 1.22rem !important;
  font-weight: 700;
}

/* Shell guard: utility pages must never underline navbar links on hover */
.navbar a:hover,
.navbar a:focus-visible {
  text-decoration: none;
}

.nav-secondary-action {
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.38);
  background: rgba(255, 255, 255, 0.04);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav-secondary-action:hover {
  color: #ffffff;
  border-color: rgba(209, 213, 219, 0.65);
  background: rgba(255, 255, 255, 0.09);
  text-decoration: none;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #3f4b5e;
  border-radius: 0.5rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
  min-width: 262px;
  z-index: 9999;
  padding: 0.8rem 0.95rem;
}

.dropdown.open > .dropdown-menu,
.dropdown:hover > .dropdown-menu,
.dropdown:focus-within > .dropdown-menu {
  display: block;
}

/* Salary Calculators row: green label while menu is open by hover/focus (parity with calculator/united-states.html nav) */
#salary-dropdown:hover #salary-link.nav-link,
#salary-dropdown:focus-within #salary-link.nav-link {
  color: #34a853;
  background-color: rgba(52, 168, 83, 0.08);
  text-decoration: none;
}

.dropdown-countries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.56rem 0.9rem;
}

.dropdown-country {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.12rem 0.06rem;
  border-radius: 0.3rem;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.dropdown-country:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #7bd68d;
  text-decoration: none;
}

.dropdown-country img {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
}

.dropdown-country.live-entry {
  color: #f9fafb;
  font-weight: 600;
}

.dropdown-country.live-entry::after {
  content: 'Live';
  margin-left: 0.35rem;
  font-size: 0.6rem;
  font-weight: 600;
  color: #bbf7d0;
  border: 1px solid rgba(134, 239, 172, 0.45);
  border-radius: 999px;
  padding: 0.02rem 0.28rem;
  line-height: 1.1;
}

.dropdown-country.coming-soon {
  opacity: 0.72;
  cursor: default;
  pointer-events: none;
}

.dropdown-status {
  margin-left: 0.4rem;
  font-size: 0.62rem;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.65);
  border-radius: 999px;
  padding: 0.03rem 0.28rem;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.05);
}

.footer {
  background-color: #1f2937;
  color: white;
  text-align: center;
  padding: 1.2rem 0 0 0;
  /* Match calculator/united-states.html; index.html overrides with its own !important */
  margin-top: 0 !important;
}

.footer a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

/* Footer legal link row (Privacy Policy | Cookie Notice | Privacy Preferences): see `.footer-legal-links` in site-footer-modals.css */

.newsletter-input-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 328px;
  background: #ffffff;
  border-radius: 999px;
  overflow: hidden;
  padding: 2px 3px 2px 4px;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.newsletter-input-wrapper input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 7px 10px;
  font-size: 14px;
  line-height: 1.25;
  min-width: 0;
  color: #111827;
}

.newsletter-input-wrapper button {
  border: none;
  background: #3b82f6;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  border-radius: 8px;
  padding: 7px 12px;
  margin-right: 2px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 380px) {
  .newsletter-input-wrapper button {
    padding: 7px 9px;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
    max-width: 1400px;
  }

  .nav-menu {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    font-size: 0.9rem;
  }
}
