/* GWI v14 mobile fixes — loaded after styles.177.css */

/* Stop double-tap zoom without blocking pinch-zoom. */
html{touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%}

@media (max-width:760px){
  /* iOS Safari zooms into any focused field under 16px. Keep every field at 16px+. */
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea{font-size:16px!important}

  html body .course-results-sort select,
  html body .weather-results-toolbar .course-results-sort select{
    font-size:16px!important;min-height:40px!important;width:auto!important;
    min-width:190px!important;max-width:100%!important;padding-right:34px!important
  }
  .course-results-view-button{font-size:14px!important;min-height:40px!important}

  /* ======================================================================
     COMPACT SEARCH GRID
     Row 1: location (full width)
     Row 2: Date · Time · Golfers
     Row 3: Distance · Price · Holes
     Used by: results bar, Search Live Tee Times bar, Weather/home card.
     ====================================================================== */

  /* Containers become a 3-column grid; wrappers "dissolve" so their children
     sit directly in the grid. */
  html body .mobile-results-quick-shell,
  html body .home-search-card.mobile-home-compact-search .home-search-controls{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    padding:10px!important;
    margin:0!important;
    overflow:visible!important;
    border:0!important;
    align-items:stretch!important;
  }
  html body .mobile-results-quick-shell > *,
  html body .home-search-card.mobile-home-compact-search .home-search-controls > *{
    grid-column:1 / -1;order:9;
  }
  html body .mobile-results-quick-shell .mobile-results-context,
  html body .mobile-results-quick-shell .mobile-results-filter-strip,
  html body .home-search-card.mobile-home-compact-search .mobile-home-search-options,
  html body .home-search-card.mobile-home-compact-search .mobile-home-filter-strip{
    display:contents!important;
  }
  /* The ←date→ stepper repeated the date button; the Date button replaces it. */
  html body .mobile-results-quick-shell .mobile-results-date-stepper{display:none!important}

  /* ---- Location bar (row 1) ---- */
  html body .mobile-results-quick-shell .mobile-results-location-cell,
  html body .home-search-card.mobile-home-compact-search .home-course-finder{
    grid-column:1 / -1!important;order:0!important;
    display:flex!important;align-items:center!important;gap:6px!important;
    min-width:0!important;width:auto!important;max-width:none!important;
    height:48px!important;min-height:48px!important;margin:0!important;
    padding:0 6px 0 12px!important;
    border:1.5px solid #9ca7a2!important;border-radius:14px!important;
    background:#fff!important;box-shadow:none!important;
    overflow:visible!important;position:relative!important;z-index:30!important;
  }
  html body .mobile-results-quick-shell .mobile-results-location-cell:focus-within,
  html body .home-search-card.mobile-home-compact-search .home-course-finder:focus-within{
    border-color:#0c3b2e!important;box-shadow:0 0 0 3px rgba(12,59,46,.12)!important;
  }
  html body .mobile-results-quick-shell .mobile-results-location-cell > span[aria-hidden]{font-size:15px!important;flex:0 0 auto!important}
  html body .mobile-results-quick-shell .mobile-results-location-cell .course-finder,
  html body .mobile-results-quick-shell .mobile-results-location-cell .course-search-row,
  html body .mobile-results-quick-shell .mobile-results-location-cell .course-search-wrap,
  html body .mobile-results-quick-shell .mobile-results-location-cell .tee-live-location-autocomplete,
  html body .home-search-card.mobile-home-compact-search .home-course-finder .course-search-row,
  html body .home-search-card.mobile-home-compact-search .home-course-finder .course-search-wrap{
    min-width:0!important;width:100%!important;flex:1 1 auto!important;
    height:44px!important;margin:0!important;padding:0!important;
    border:0!important;background:transparent!important;box-shadow:none!important;
  }
  html body .mobile-results-quick-shell .mobile-results-location-cell input,
  html body .home-search-card.mobile-home-compact-search .home-course-finder input{
    min-width:0!important;width:100%!important;height:44px!important;
    border:0!important;background:transparent!important;box-shadow:none!important;
    padding:0 4px!important;font-weight:700!important;text-overflow:ellipsis!important;outline:none!important;
  }
  html body .mobile-results-quick-shell .mobile-results-location-cell input::placeholder,
  html body .home-search-card.mobile-home-compact-search .home-course-finder input::placeholder{color:#7b8781!important;font-weight:600!important}

  /* Live Tee Times suggestion list under the location bar */
  html body .mobile-results-quick-shell .tee-live-location-autocomplete{position:relative!important;overflow:visible!important}
  html body .mobile-results-quick-shell .tee-search-suggestions{
    position:absolute!important;top:calc(100% + 8px)!important;left:-40px!important;right:-8px!important;
    width:auto!important;max-height:60vh!important;overflow:auto!important;
    z-index:700!important;background:#fff!important;border:1px solid #d6ddd9!important;
    border-radius:14px!important;box-shadow:0 14px 36px rgba(12,33,28,.18)!important;
  }
  html body .mobile-results-quick-shell .tee-search-suggestions.hidden{display:none!important}

  /* ---- Date + filter buttons (rows 2–3) ---- */
  html body .mobile-results-quick-shell .gwi-date-chip,
  html body .home-search-card.mobile-home-compact-search .gwi-date-chip,
  html body .mobile-results-quick-shell:not(#gwi-x) .mobile-results-filter-strip > button,
  html body .home-search-card.mobile-home-compact-search:not(#gwi-x) .mobile-home-filter-strip > button{
    grid-column:auto!important;
    position:relative!important;
    display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;
    gap:1px!important;
    min-width:0!important;width:auto!important;max-width:none!important;
    height:52px!important;min-height:52px!important;margin:0!important;
    padding:6px 10px!important;
    border:1.5px solid #cfd6d2!important;border-radius:12px!important;
    background:#fff!important;color:#12211c!important;box-shadow:none!important;
    text-align:left!important;overflow:hidden!important;
  }
  html body .mobile-results-quick-shell .mobile-results-filter-strip > button.active,
  html body .home-search-card.mobile-home-compact-search .mobile-home-filter-strip > button.active,
  html body .mobile-results-quick-shell .gwi-date-chip:focus-within,
  html body .home-search-card.mobile-home-compact-search .gwi-date-chip:focus-within{
    border-color:#0c3b2e!important;background:#eef4f0!important;
  }
  /* Hide the old icons and the date field's own label/▣ marker. */
  html body .mobile-results-quick-shell .mobile-results-filter-strip > button > span[aria-hidden],
  html body .home-search-card.mobile-home-compact-search .mobile-home-filter-strip > button > span[aria-hidden],
  html body .mobile-results-quick-shell .gwi-date-chip > span[aria-hidden]:not(.gwi-chip-text),
  html body .home-search-card.mobile-home-compact-search .gwi-date-chip > label{display:none!important}
  html body .mobile-results-quick-shell .mobile-results-filter-strip > button > strong,
  html body .home-search-card.mobile-home-compact-search .mobile-home-filter-strip > button > strong,
  html body .gwi-date-chip .gwi-chip-text{
    display:flex!important;flex-direction:column!important;align-items:flex-start!important;
    gap:1px!important;min-width:0!important;width:100%!important;
    font-size:14px!important;line-height:1.15!important;
  }
  html body .gwi-chip-label{
    display:block!important;font-size:11px!important;font-weight:700!important;
    letter-spacing:.04em!important;text-transform:uppercase!important;color:#69766f!important;
  }
  html body .gwi-chip-value{
    display:block!important;max-width:100%!important;font-size:14px!important;font-weight:800!important;
    color:#12211c!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  /* Invisible native date control covering the whole Date button. */
  html body .gwi-date-chip .gwi-chip-overlay{
    position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
    min-width:0!important;max-width:none!important;margin:0!important;padding:0!important;
    opacity:0!important;border:0!important;cursor:pointer!important;z-index:2!important;
    font-size:16px!important;-webkit-appearance:none!important;appearance:none!important;
  }

  /* Order: Date, Time, Golfers / Distance, Price, Holes */
  html body .gwi-date-chip::before{content:none!important;display:none!important}
  html body .mobile-results-quick-shell .gwi-date-chip,
  html body .home-search-card.mobile-home-compact-search .gwi-date-chip{order:1!important}
  html body .mobile-results-quick-shell:not(#gwi-x) .mobile-results-filter-strip > button[data-mobile-filter="time"],
  html body .mobile-results-quick-shell:not(#gwi-x) .mobile-results-filter-strip > button[data-mobile-live-filter="time"],
  html body .home-search-card.mobile-home-compact-search:not(#gwi-x) .mobile-home-filter-strip > button[data-mobile-home-filter="time"]{order:2!important}
  html body .mobile-results-quick-shell:not(#gwi-x) .mobile-results-filter-strip > button[data-mobile-filter="golfers"],
  html body .mobile-results-quick-shell:not(#gwi-x) .mobile-results-filter-strip > button[data-mobile-live-filter="golfers"],
  html body .home-search-card.mobile-home-compact-search:not(#gwi-x) .mobile-home-filter-strip > button[data-mobile-home-filter="golfers"]{order:3!important}
  html body .mobile-results-quick-shell:not(#gwi-x) .mobile-results-filter-strip > button[data-mobile-filter="distance"],
  html body .mobile-results-quick-shell:not(#gwi-x) .mobile-results-filter-strip > button[data-mobile-live-filter="distance"],
  html body .home-search-card.mobile-home-compact-search:not(#gwi-x) .mobile-home-filter-strip > button[data-mobile-home-filter="distance"]{order:4!important}
  html body .mobile-results-quick-shell:not(#gwi-x) .mobile-results-filter-strip > button[data-mobile-filter="price"],
  html body .mobile-results-quick-shell:not(#gwi-x) .mobile-results-filter-strip > button[data-mobile-live-filter="price"],
  html body .home-search-card.mobile-home-compact-search:not(#gwi-x) .mobile-home-filter-strip > button[data-mobile-home-filter="price"]{order:5!important}
  html body .mobile-results-quick-shell:not(#gwi-x) .mobile-results-filter-strip > button[data-mobile-filter="holes"],
  html body .mobile-results-quick-shell:not(#gwi-x) .mobile-results-filter-strip > button[data-mobile-live-filter="holes"],
  html body .home-search-card.mobile-home-compact-search:not(#gwi-x) .mobile-home-filter-strip > button[data-mobile-home-filter="holes"]{order:6!important}

  /* The open filter sheet (Time slider, Golfers, …) spans the full width under the buttons. */
  html body .mobile-results-quick-shell .mobile-results-filter-panel,
  html body .home-search-card.mobile-home-compact-search .mobile-results-filter-panel{
    grid-column:1 / -1!important;order:8!important;margin:2px 0 0!important;
  }
  html body .mobile-results-quick-shell .mobile-results-filter-panel.hidden,
  html body .home-search-card.mobile-home-compact-search .mobile-results-filter-panel.hidden{display:none!important}
}

@media (max-width:360px){
  html body .mobile-results-quick-shell,
  html body .home-search-card.mobile-home-compact-search .home-search-controls{gap:6px!important;padding:8px!important}
  html body .gwi-chip-value{font-size:13px!important}
  html body .mobile-results-quick-shell .mobile-results-filter-strip > button,
  html body .home-search-card.mobile-home-compact-search .mobile-home-filter-strip > button,
  html body .gwi-date-chip{padding:6px 8px!important}
}

@media (max-width:760px){
  /* v15: smaller clear "×" with a 44px invisible tap area around it. */
  html body .course-search-clear,
  html body .mobile-results-location-search-host .course-search-clear,
  html body .gwi-live-clear{
    position:relative!important;
    flex:0 0 auto!important;
    width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;
    margin:0 4px 0 2px!important;padding:0!important;
    border:0!important;border-radius:50%!important;
    background:#e3e8e5!important;color:#33413b!important;
    font-size:15px!important;font-weight:700!important;line-height:24px!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    box-shadow:none!important;cursor:pointer!important;
    touch-action:manipulation!important;-webkit-tap-highlight-color:transparent!important;
  }
  html body .course-search-clear::after,
  html body .gwi-live-clear::after{content:''!important;position:absolute!important;inset:-10px!important}
  html body .course-search-clear[hidden],
  html body .gwi-live-clear[hidden]{display:none!important}
  html body .course-search-clear:active,
  html body .gwi-live-clear:active{background:#cfd6d2!important}
  /* Use our own × on the Live Tee Times box instead of the browser's. */
  html body .mobile-results-quick-shell #teeSearchLocation::-webkit-search-cancel-button{-webkit-appearance:none!important;display:none!important}
  html body .mobile-results-quick-shell .tee-live-location-autocomplete{display:flex!important;align-items:center!important}
}
