/* ===========================================================
   WHATBIN — CONSOLIDATED, MOBILE-FIRST MAIN.CSS
   =========================================================== */

/* ---------- 1) Base / Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 16px/1.45 "Source Sans Pro", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1c2731;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
ol, ul { list-style: none; margin: 0; padding: 0; }
table { border-collapse: collapse; border-spacing: 0; }

/* ---------- 2) Typography & Links ---------- */
h1,h2,h3,h4,h5,h6 { margin: 0 0 .5em; font-weight: 700; color: #434343; }
h1 { font-family: "Duru Sans", Arial, sans-serif; font-size: 36px; line-height: 40px; text-transform: uppercase; }
h2 { font-size: 24px; color: #29a643; }
h3 { font-family: "Duru Sans", Arial, sans-serif; font-size: 18px; line-height: 24px; font-weight: 400; }
p  { margin: 0 0 .75em; font-size: 14px; line-height: 1.45; color: #636363; }

a { color: #0099CC; text-decoration: none; font-weight: 600; }
a:hover { color: #67B13D; text-decoration: underline; }

.blue { color: #0b63b6; }
.green { color: #29a643; }
.red { color: #FF0000; }

.clear { clear: both; }

/* ---------- 3) Layout Shell ---------- */
#wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  background: #fff;
}

#content .content { padding: 8px 0; }

/* ---------- 4) Top Header ---------- */
.topheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: #fff;
}
.topheader .brand img { height: 38px; width: auto; }

.topheader .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: right;
}

/* Selected location cluster (matches reference screenshot) */
.topheader .location .city { color: #29a643; font-weight: 800; font-size: 18px; line-height: 1; }
.topheader .links { font-size: 13px; line-height: 1.2; margin-top: 2px; }
.topheader .links a { color: #29a643; font-weight: 700; }
.topheader .links a:hover { color: #1f8a35; text-decoration: underline; }
.topheader .links .sep { margin: 0 6px; color: #c7cdd3; }

/* Compact on small screens */
@media (max-width: 480px){
  .topheader{padding:8px 12px;}
  .topheader .meta{flex-direction:column;align-items:flex-end;gap:4px;}
  .topheader > .brand img { display: none; }
  .topheader .links { height: 55px; }
}

/* ---------- 5) Hide duplicate homepage headers ---------- */
#header-responsive,
#logo-responsive { display: none !important; }
#banner { display: none; }
@media (min-width: 1024px){
  #banner { display: block;  }
  #banner > img { margin: 0 auto; }
}

.responsive{ display:none;}

/* ---------- 6) Search Section ---------- */
.city-search-title { text-align: center; margin: 10px 0 6px; color: #0b63b6; }
.city-search-title h2 { color: #0b63b6; font-size: 22px; }
.open-list { color: #0b63b6; font-weight: 700; font-size: 18px; }

#city-search form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
}

#item-search-input { position: relative; min-height: 48px; }
#item-search-input .input-prepend { position: relative; width: 100% !important; }
#item-search-input .add-on,
#item-search-input .icon-search { display: none !important; }

#SearchForm input#search,
#item-search-input input[type="text"],
#search {
  width: 100% !important;
  height: 48px !important;
  padding: 10px 14px 10px 20px !important;
  font-size: 16px !important;
  border: 1px solid #cfd6de;
  border-radius: 12px;
  outline: none;
  background-color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}

#item-search-input .input-prepend::before {
  content: "🔎";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  line-height: 1;
  opacity: .6;
}

#SearchForm input#search:focus {
  border-color: #2a96ff;
  box-shadow: 0 0 0 3px rgba(42,150,255,.15);
}

.button-float { width: 100% !important; }
.button-float .btn,
input.btn {
  display: inline-block;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 700;
  border: 0;
  border-radius: 12px;
  background: #29a643;
  color: #fff;
}
.button-float .btn:hover { filter: brightness(.96); }

/* ---------- 7) City List ---------- */
#city-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100% !important;
  margin-top: 12px;
}
#city-list .city { font-size: 16px; }
#city-list .city a {
  display: block;
  padding: 12px 14px;
  min-height: 44px;
  border: 1px solid #e6ebf1;
  border-radius: 12px;
  background: #fff;
  color: #0b63b6;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
#city-list .city a:active { background: #f3f7fb; }

@media (min-width: 768px){
  #city-search form { grid-template-columns: 1fr auto; }
  .button-float .btn { width: auto; min-width: 140px; }
  #city-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px){
  #city-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- 8) Footer ---------- */
#have-questions { text-align: center; font-size: 14px; padding: 0 0 20px; }
#footer { padding: 16px 12px; text-align: center; border-top: 1px solid #efefef; color: #5b6773; }

/* ---------- 9) Misc Polish ---------- */
a { -webkit-tap-highlight-color: rgba(11,99,182,.15); }
.info { padding: 12px 16px; color: #f00; background: #fee; text-align: center; }
.pagination { padding: 2px; text-align: center; }

/* ---------- 10) Recology Widget ---------- */
#rCw {
  width: 100% !important;
  min-width: unset !important;
  margin-right: auto;
  margin-left: auto;
}

/* Hide old category buttons on interior, the widget replaces them */
#category-items{ display:none; }

/* ===== Autocomplete dropdown polish ===== */
#item-search-input { position: relative; }

#main #term-match{
  display: none;            /* JS toggles */
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  background: #fff;
  border: 1px solid #d7dee6;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  padding: 6px 0;
}

#main #term-match li{
  padding: 12px 16px;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
}
#main #term-match li + li { border-top: 1px solid #eef2f7; }
#main #term-match li:hover,
#main #term-match li.is-active { background: #eef7ff; }
#main #term-match .match { font-weight: 700; color: #0b63b6; }

/* Mobile: sticky search + comfy dropdown */
@media (max-width: 480px){
    #wrapper {
      margin-top: 1rem;
    }
  #main #term-match { max-height: 50vh; border-radius: 16px; }
  #main #term-match li { padding: 14px 16px; }
  #city-search {
    position: sticky;
    top: .5rem;
    z-index: 20;
    background: #fff;
    padding-bottom: .5rem;
  }
  #city-search::after{
    content:"";
    display:block;
    height:1px;
    background:#EEF2F7;
    margin-top:.5rem;
  }
}

.banner-responsive, #banner-responsive{ display:none; }

/* Visible focus for keyboard users */
:where(a, button, input, [role="option"]):focus {
  outline: 3px solid rgba(42,150,255,.35);
  outline-offset: 2px;
}
.responsive { display: none !important; visibility: hidden !important; }

/* ===== Desktop: compact city grid (old-site style) ===== */
@media (min-width: 1024px){
  #wrapper { max-width: 1120px; }
  #banner > img{ margin: 0 auto; }
  #header-center-in a img{
    margin: 0 auto;
  }

  #city-list {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 8px;
    margin-top: 10px;
  }

  #city-list .city { font-size: 14px; }
  #city-list .city a{
    padding: 6px 8px;
    min-height: unset;
    border-radius: 6px;
    box-shadow: none;
    border-color: #dfe6ee;
    line-height: 1.2;
  }

  #city-search form { gap: 8px; }
  .button-float .btn { min-width: 120px; padding: 8px 12px; }
  #SearchForm input#search,
  #item-search-input input[type="text"],
  #search {
    height: 40px !important;
    padding: 8px 12px 8px 36px !important;
    font-size: 15px !important;
    border-radius: 10px;
  }

  .city-search-title h2 { font-size: 22px; margin-bottom: 4px; }
  .open-list { font-size: 16px; }
}

/* Ultra-wide screens: 6 columns */
@media (min-width: 1280px){
  #wrapper { max-width: 1280px; }
  #city-list { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  
}