/* Responsive overlay — does not change desktop look at >=1280px */

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

.style-module-scss-module__1nVmrq__appLayout .style-module-scss-module__1nVmrq__appLayoutBody {
  width: 100%;
  max-width: 100%;
}

img, video, svg {
  max-width: 100%;
}

.hc-auth-btns {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

#hc-overlay,
#hc-drawer {
  display: none;
}

/* Tablet / small laptop: hide crowded desktop nav, keep hamburger + auth */
@media only screen and (max-width: 1279px) {
  .style-module-scss-module__txTLgq__navMiddle {
    display: none !important;
  }

  .styled-module-scss-module__F9s3QG__phoneSideIcon {
    display: flex !important;
    align-items: center;
    cursor: pointer;
  }

  .styled-module-scss-module__F9s3QG__rightWarp {
    gap: 6px !important;
    margin-right: 0;
  }

  .styled-module-scss-module__F9s3QG__rightWarp > .hide-phone:not(.hc-auth-btns),
  .styled-module-scss-module__F9s3QG__hidePcSmall {
    display: none !important;
  }
}

@media only screen and (min-width: 769px) {
  .hc-auth-btns.hide-phone {
    display: flex !important;
  }
}

.hc-mobile-login {
  display: none;
}

@media only screen and (min-width: 1280px) {
  .styled-module-scss-module__F9s3QG__phoneSideIcon {
    display: none !important;
  }
}

/* Phones: dedicated Log In in the header; Sign Up stays in the drawer */
@media only screen and (max-width: 768px) {
  .style-module-scss-module__txTLgq__header,
  #qa_containerNavigation {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 12px !important;
    box-sizing: border-box;
    left: 0;
    right: 0;
  }

  #qa_containerNavigation > .flex-module-scss-module__tG5usq__flex {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
  }

  .styled-module-scss-module__F9s3QG__rightWarp {
    flex-shrink: 0 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    gap: 4px !important;
  }

  .hc-auth-btns,
  .hc-auth-btns.hide-phone {
    display: none !important;
  }

  .hc-search-wrap {
    display: none !important;
  }

  a.hc-mobile-login {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 2;
  }

  #hc-menu-btn.styled-module-scss-module__F9s3QG__phoneSideIcon {
    display: flex !important;
    visibility: visible !important;
  }

  .hc-mobile-login {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 12px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .styled-module-scss-module__F9s3QG__languageIcon {
    display: none !important;
  }

  .index-module-scss-module__qJInYa__cardGrid,
  .index-module-scss-module__Rc0Krq__features {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .RankTable-module-scss-module__N1cv8G__tableWrap,
  .RankTable-module-scss-module__N1cv8G__skeletonTable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .index-module-scss-module__VYzFxG__common-list-wrap {
    flex-wrap: wrap;
  }
}

/* Mid widths: keep hero from colliding */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
  .index-module-scss-module__wYZm9q__inner {
    gap: 0.64rem;
  }
}

/* Drawer */
#hc-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10080;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#hc-drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(86vw, 360px);
  background: #0f0f0f;
  color: #fff;
  z-index: 10090;
  transform: translateX(105%);
  transition: transform 0.22s ease;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  overflow-y: auto;
}

body.hc-menu-open {
  overflow: hidden;
}

body.hc-menu-open #hc-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.hc-menu-open #hc-drawer {
  transform: translateX(0);
}

.hc-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.hc-drawer-top img {
  height: 26px;
  width: auto;
}

.hc-drawer-close {
  border: 0;
  background: transparent;
  color: #fff;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.hc-drawer-auth {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.hc-drawer-auth a {
  flex: 1;
  text-decoration: none;
}

.hc-drawer-auth button {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 0;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.hc-drawer-auth .hc-login {
  background: #1c1c1c;
  color: #fff;
  border: 1px solid #2a2a2a;
}

.hc-drawer-auth .hc-signup {
  background: #97e763;
  color: #111;
}

.hc-drawer-nav {
  display: flex;
  flex-direction: column;
}

.hc-drawer-nav a {
  color: #fff;
  text-decoration: none;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid #1c1c1c;
}

#hc-menu-btn {
  cursor: pointer;
}
