/* =======================
   DayHelper final navbar
   Phone / iPad portrait: bottom app navbar
   iPad landscape / small laptop: top navbar with black safe-area strip
   Large desktop: normal top navbar
======================= */

:root {
  --safe-top: 0px;
  --safe-bottom: 0px;
  --dh-statusbar-height: 0px;
}

@supports (padding: env(safe-area-inset-top)) {
  :root {
    --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom);
  }
}

/* Kill old hamburger behavior completely */
.toggle-menu,
.toggle-menu__lines,
#responsive-menu {
  display: none !important;
}

/* Shared navbar reset */
.header {
  background: #000000 !important;
  z-index: 99999 !important;
  transition: transform 0.24s ease-in-out !important;
}

.header__menu {
  list-style: none !important;
}

.header__menuLink {
  text-decoration: none !important;
}

.header__menuIcon,
.header__menuIconWrap {
  display: none;
}

.header__menuBadge {
  display: none;
}

/* =======================
   Top navbar shared layout
======================= */

@media screen and (min-width: 1025px) {
  .header {
    position: sticky !important;
    bottom: auto !important;
    transform: translateY(0) !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  .header.header--visible {
    transform: translateY(0) !important;
  }

  .header > .container,
  .header > .container.container--narrow {
    width: 95% !important;
    max-width: 140rem !important;
    margin: 0 auto !important;
    padding: 1.1rem 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 2rem !important;
  }

  .header__logo {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    position: static !important;
  }

  .header__logo img {
    display: block !important;
    width: auto !important;
    height: 3.8rem !important;
  }

  .header__nav {
    position: static !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .header__nav > ul.header__menu {
    position: static !important;
    inset: auto !important;

    opacity: 1 !important;
    pointer-events: auto !important;

    width: auto !important;
    min-height: auto !important;
    height: auto !important;

    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;

    gap: clamp(1rem, 1.4vw, 2.4rem) !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
  }

  .header__menuItem {
    display: inline-flex !important;
    align-items: center !important;
    min-width: auto !important;
  }

  .header__menuItem--notification {
    display: none !important;
  }

  .header__menuLink,
  .header__menuItem > a {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    min-height: auto !important;

    padding: 0 !important;
    border-radius: 0 !important;

    color: #ffffff !important;
    background: transparent !important;

    font-size: clamp(1.15rem, 0.95vw, 1.45rem) !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
  }

  .header__menuLink:hover,
  .header__menuItem > a:hover {
    color: #00ff00 !important;
    background: transparent !important;
    transform: none !important;
  }

  .header__menuIcon,
  .header__menuIconWrap {
    display: none !important;
  }

  .header__menuText {
    display: inline !important;
    color: inherit !important;
    white-space: nowrap !important;
  }

  .header__menuBadge {
    display: inline !important;
    position: static !important;

    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin-left: 0.35rem !important;

    border: none !important;
    border-radius: 0 !important;

    background: transparent !important;
    color: #00ff00 !important;

    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: 700 !important;
  }
}

/* Large desktop: no fake status strip */
@media screen and (min-width: 1401px) {
  body {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body::before {
    display: none !important;
  }

  .header {
    top: 0 !important;
  }

  .header.header--hidden {
    transform: translateY(-100%) !important;
  }
}

/* iPad landscape / small laptop: top navbar with black strip above it */
@media screen and (min-width: 99999px) and (max-width: 99999px) {
  :root {
    --dh-statusbar-height: max(var(--safe-top), 18px);
  }

  body {
    padding-top: var(--dh-statusbar-height) !important;
    padding-bottom: 0 !important;
  }

  body::before {
    content: "" !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    height: var(--dh-statusbar-height) !important;
    background: #000000 !important;

    z-index: 100000 !important;
    pointer-events: none !important;
  }

  .header {
    top: var(--dh-statusbar-height) !important;
  }

  .header.header--hidden {
    transform: translateY(calc(-100% - var(--dh-statusbar-height))) !important;
  }

  .header > .container,
  .header > .container.container--narrow {
    width: 96% !important;
    padding: 1rem 0 !important;
    gap: 1.5rem !important;
  }

  .header__logo img {
    height: 3.5rem !important;
  }

  .header__nav > ul.header__menu {
    gap: clamp(0.9rem, 1.15vw, 1.8rem) !important;
  }

  .header__menuLink,
  .header__menuItem > a {
    font-size: clamp(1.05rem, 1.1vw, 1.3rem) !important;
  }
}

/* Phone / tablet / iPad portrait bottom navbar */
@media screen and (max-width: 1400px) {
  :root {
    --dh-statusbar-height: max(var(--safe-top), 18px);
  }

  body {
    padding-top: var(--dh-statusbar-height) !important;
    padding-bottom: calc(8.2rem + var(--safe-bottom)) !important;
  }

  body::before {
    content: "" !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    height: var(--dh-statusbar-height) !important;
    background: #000000 !important;

    z-index: 100000 !important;
    pointer-events: none !important;
  }

  .header {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    transform: translateY(0) !important;

    padding: 0 0 var(--safe-bottom) 0 !important;

    border-top: 1px solid rgba(0, 255, 0, 0.35) !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3) !important;
  }

  .header.header--hidden {
    transform: translateY(calc(100% + var(--safe-bottom))) !important;
  }

  .header.header--visible {
    transform: translateY(0) !important;
  }

  .header > .container,
  .header > .container.container--narrow {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;

    display: block !important;
  }

  .header__logo {
    display: none !important;
  }

  .header__nav {
    width: 100% !important;
    position: static !important;
  }

  .header__nav > ul.header__menu {
    position: static !important;
    inset: auto !important;

    width: 100% !important;
    min-height: auto !important;
    height: auto !important;

    opacity: 1 !important;
    pointer-events: auto !important;

    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    justify-content: stretch !important;

    gap: 0 !important;

    margin: 0 !important;
    padding: 0.6rem 0.35rem 0.55rem !important;

    background: #000000 !important;
  }

  .header__menuItem {
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    min-width: 0 !important;
  }

  .header__menuItem--notification {
    display: none !important;
  }

  .header__menuLink,
  .header__menuItem > a {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 6.4rem !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 0.35rem !important;

    padding: 0.4rem 0.25rem !important;
    border-radius: 1.2rem !important;

    background: transparent !important;
    color: #00ff00 !important;

    text-align: center !important;
    text-decoration: none !important;

    font-size: 1rem !important;
    line-height: 1.08 !important;
    font-weight: 700 !important;

    transition: background 0.18s ease, transform 0.18s ease !important;
  }

  .header__menuLink:hover,
  .header__menuItem > a:hover {
    background: rgba(0, 255, 0, 0.12) !important;
    color: #00ff00 !important;
    transform: translateY(-1px) !important;
  }

  .header__menuLink:active,
  .header__menuItem > a:active {
    transform: translateY(1px) scale(0.98) !important;
  }

  .header__menuLink--withBadge {
    position: relative !important;
  }

  .header__menuIconWrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .header__menuIcon {
    display: block !important;
    width: 2.8rem !important;
    height: 2.8rem !important;
    object-fit: contain !important;
    flex: 0 0 auto !important;
  }

  .header__menuText {
    display: block !important;
    max-width: 100% !important;

    color: #00ff00 !important;

    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .header__menuBadge {
    position: absolute !important;
    top: 0.35rem !important;
    right: 0.85rem !important;

    min-width: 1.8rem !important;
    height: 1.8rem !important;
    padding: 0 0.45rem !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 999px !important;
    background: #00ff00 !important;
    color: #000000 !important;

    font-size: 0 !important;
    line-height: 1 !important;
    font-weight: 900 !important;

    border: 2px solid #000000 !important;
  }

  .header__menuBadge::after {
    content: attr(data-count);
    font-size: 1rem !important;
  }

  .site-footer {
    padding-bottom: calc(3rem + var(--safe-bottom)) !important;
  }
}

/* Extra-small phones */
@media screen and (max-width: 420px) {
  .header__menuIcon {
    width: 2.2rem !important;
    height: 2.2rem !important;
  }

  .header__menuLink,
  .header__menuItem > a {
    min-height: 5.7rem !important;
    font-size: 0.78rem !important;
    border-radius: 1rem !important;
  }
}

/* Footer/legal links: keep this outside phone-only media queries */
body {
  min-height: 100vh !important;
}

.site-footer {
  width: 100% !important;
  clear: both !important;
  position: relative !important;
  z-index: 1 !important;

  margin-top: 6rem !important;
  padding: 3rem 0 !important;

  background: #000000 !important;
  color: #ffffff !important;
}

.site-footer .container {
  width: 95% !important;
  max-width: 120rem !important;
  margin: 0 auto !important;
}

.site-footer__links {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 2.4rem !important;

  margin: 0 0 1.2rem 0 !important;
  padding: 0 !important;
}

.site-footer__links a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  min-height: 4.4rem !important;
  padding: 0.6rem 1rem !important;

  color: #00ff00 !important;
  font-size: 1.4rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;

  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
}

.site-footer__links a:hover {
  text-decoration: underline !important;
}

.site-footer__text {
  margin: 0 !important;
  text-align: center !important;
  color: #ffffff !important;
  font-size: 1.3rem !important;
}

.legal-review-links {
  clear: both !important;
  position: relative !important;
  z-index: 1 !important;
  width: 95% !important;
  max-width: 85rem !important;
  margin: 6rem auto 0 !important;
  padding: 2rem !important;
  text-align: center !important;
}

@media screen and (max-width: 1400px) {
  .site-footer {
    margin-top: 6rem !important;
    padding-bottom: calc(12rem + var(--safe-bottom, 0px)) !important;
  }

  .legal-review-links {
    margin-top: 6rem !important;
    margin-bottom: calc(8rem + var(--safe-bottom, 0px)) !important;
  }
}

@media screen and (max-width: 700px) {
  .site-footer__links {
    flex-direction: column !important;
    gap: 0.8rem !important;
  }
}
