/* ==========================
   NAV BUTTON MENU (desktop horizontal bar)
========================== */

.nav-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
}

.nav-buttons a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  font-size: 17px;
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}

.nav-buttons a:hover {
  background: #0073e6;
  color: #fff;
  border-color: #0073e6;
  transform: translateY(-2px);
}

.nav-buttons a.active {
  background: #333;
  color: #fff;
}

.hide-mobile {
  display: inline-flex;
}

@media (max-width: 600px) {
  .nav-buttons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
  }

  .nav-buttons a {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .hide-mobile {
    display: none !important;
  }
}

/* ==========================
   HAMBURGER — slide-out side menu
   (Single source of truth. Previously duplicated inline
   inside hamburger.php with conflicting values — consolidated here.)
========================== */

.hamburger { position: relative; z-index: 9999; }

.hamburger #menuToggle {
  position: fixed;
  top: 15px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  z-index: 1001;
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.hamburger #menuOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 1000;
}

.hamburger #sideMenu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  /* background-color is set per-domain via a small inline style in hamburger.php,
     matching $row_rsDomain['domain_backgroundcolor'] (same value used for the
     overall site background) — intentionally not hardcoded here. */
  box-shadow: -3px 0 10px rgba(0,0,0,0.2);
  padding: 20px;
  padding-top: 70px;
  transition: right 0.35s ease;
  z-index: 1002;
}

.hamburger.open #sideMenu { right: 0; }
.hamburger.open #menuOverlay { display: block; }

.hamburger #sideMenu a {
  display: block;
  padding: 12px;
  margin-bottom: 10px;
  background: #f5f5f5;
  text-decoration: none;
  color: #333;
  border-radius: 6px;
}

.hamburger #sideMenu button {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  text-align: left;
  font-size: 16px;
  border-radius: 6px;
}

.hamburger #sideMenu button:hover {
  background: #e0e0e0;
}

/* Close (X) button — single definition, was duplicated as two elements before */
.hamburger #menuClose {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 42px;
  height: 42px;
  background: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hamburger #menuClose span {
  position: absolute;
  width: 18px;
  height: 2px;
  background: #333;
}

.hamburger #menuClose span:first-child { transform: rotate(45deg); }
.hamburger #menuClose span:last-child  { transform: rotate(-45deg); }

.hamburger #menuClose:hover span { background: #000; }
.hamburger #menuClose:hover { background: #e0e0e0; }
.hamburger #menuClose:active { transform: scale(0.95); }

/* Login pill, top-left of side menu */
#menuLogin {
  position: absolute;
  top: 15px;
  left: 20px;
}

#menuLogin a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 14px;
  background: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  color: #333;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
}

/* Amazon-style submenu toggle */
.hamburger .submenu-toggle {
  display: block;
  width: calc(100% - 30px);
  margin-left: 15px;
  margin-right: 15px;
  margin-bottom: 10px;
  box-sizing: border-box;
  padding: 12px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  color: #333;
  text-decoration: none;
  font-size: inherit;
  line-height: inherit;
  font-weight: normal;
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.hamburger .submenu {
  display: none;
  padding-left: 12px;
}

.hamburger .submenu a {
  font-size: 15px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

/* ==========================
   MOBILE
========================== */
@media (max-width: 600px) {
  .hamburger .submenu-toggle {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    width: calc(100% - 30px);
    margin-left: 15px;
    margin-right: 15px;
    margin-bottom: 0;
    box-sizing: border-box;
    padding: 18px 16px;
    font-size: 17px;
    line-height: 1.4;
    font-family: inherit;
    font-weight: normal;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    color: #333;
    text-align: left;
    cursor: pointer;
  }

  .hamburger #sideMenu {
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .hamburger #sideMenu a {
    margin-bottom: 0;
    padding: 18px 16px;
    font-size: 17px;
    line-height: 1.4;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  }

  .hamburger #sideMenu hr {
    margin: 8px 0;
  }
}