/*
 * Search page (_search.php). Matches the home page: navy header, light blue
 * hero wash, white rounded cards, blue pill buttons. Everything is scoped to
 * .rzs* so the older search styles in renteez_style.css don't interfere.
 * Note: the Where field's input is swapped for Google's <gmp-place-autocomplete>
 * at runtime; its suggestion list is drawn inside the widget, so nothing
 * around it may clip overflow.
 */
:root {
  --rzs-ink: #16212c;
  --rzs-muted: #5f6d7b;
  --rzs-line: #e1e8ef;
  --rzs-primary: #0091ff;
  --rzs-primary-dark: #0a7fe0;
  --rzs-navy: #03446a;
  --rzs-radius: 16px;
  --rzs-shadow: 0 1px 2px rgba(16, 33, 48, 0.04), 0 10px 28px -14px rgba(16, 33, 48, 0.18);
}

body.rzs-body {
  background: #f7f7f7;
}

.rzs {
  color: var(--rzs-ink);
}

.rzs-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.rzs h1,
.rzs h2,
.rzs h3,
.rzs h4,
.rzs p {
  margin: 0;
  text-align: left;
}

/* ---------- Hero + search bar ---------- */
.rzs-hero {
  padding: 36px 0 28px;
  background:
    radial-gradient(ellipse 60% 120% at 85% 0%, rgba(0, 145, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #eef6ff 0%, #f7f7f7 100%);
}

.rzs-eyebrow {
  margin-bottom: 6px !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rzs-primary);
}

.rzs-hero h1 {
  margin-bottom: 18px !important;
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--rzs-ink);
  overflow-wrap: anywhere;
}

.rzs-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 1.15fr) minmax(0, 1.15fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--rzs-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(3, 68, 106, 0.12);
}

.rzs-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin: 0;
}

.rzs-label {
  padding-left: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rzs-muted);
}

.rzs-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--rzs-line);
  border-radius: 12px;
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.rzs-control:focus-within {
  border-color: var(--rzs-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 145, 255, 0.15);
}

.rzs-control > i {
  flex: 0 0 auto;
  font-size: 14px;
  color: #8a99a8;
}

.rzs-control input,
.rzs-control select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--rzs-ink);
  font-size: 0.95rem;
  box-shadow: none;
}

/* older rules give .datepickr / flatpickr inputs their own box */
.rzs-control input.datepickr,
.rzs-control input.flatpickr-input,
.rzs-control input.form-control {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: 44px !important;
}

.rzs-control select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* Google's address widget replaces the Where input. */
.rzs-control gmp-place-autocomplete {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 20;
  color-scheme: light;
  border: 0;
  background: transparent;
  overflow: visible;
}

.rzs-locate {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--rzs-primary);
  cursor: pointer;
  box-shadow: none;
}

.rzs-locate:hover { background: #e8f4ff; }

.rzs-submit {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.rzs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 46px;
  margin: 0;
  padding: 10px 22px;
  border: 1px solid var(--rzs-line);
  border-radius: 999px;
  background: #fff;
  color: var(--rzs-ink);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.rzs-btn-primary {
  border-color: var(--rzs-primary);
  background: var(--rzs-primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 145, 255, 0.28);
}

.rzs-btn-primary:hover,
.rzs-btn-primary:focus-visible {
  border-color: var(--rzs-primary-dark);
  background: var(--rzs-primary-dark);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.rzs-btn:disabled { opacity: 0.7; cursor: progress; transform: none; }

.rzs-clear {
  width: auto;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--rzs-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
}

.rzs-clear:hover { color: var(--rzs-primary); text-decoration: underline; }

/* ---------- Results + map ---------- */
.rzs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: start;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 56px;
}

.rzs-map {
  position: sticky;
  top: 84px;
  overflow: hidden;
  border: 1px solid var(--rzs-line);
  border-radius: var(--rzs-radius);
  background: #eaf1f7;
  box-shadow: var(--rzs-shadow);
}

.rzs-map #map_canvas,
.rzs-map .google_map_canvas {
  width: 100% !important;
  height: min(72vh, 640px) !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.rzs-results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rzs-results-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rzs-ink);
  overflow-wrap: anywhere;
}

/* By id: the page's old display-type code rewrites this element's class list.
   One result per row (a wide list card) reads better than narrow tiles in this column. */
#product-rows.results-section,
#product-rows {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
}

.rzs-group {
  grid-column: 1 / -1;
  margin: 8px 0 -4px !important;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rzs-muted);
}

.rzs-group:first-child { margin-top: 0 !important; }

.rzs-card {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--rzs-line);
  border-radius: var(--rzs-radius);
  background: #fff;
  box-shadow: var(--rzs-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.rzs-card:hover {
  border-color: #b8d9f5;
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -18px rgba(3, 68, 106, 0.35);
}

.rzs-card-media {
  position: relative;
  display: block;
  min-height: 180px;
  background: #eef2f6;
  overflow: hidden;
}

.rzs-card-media img {
  position: absolute;
  inset: 0;
}

.rzs-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rzs-card:hover .rzs-card-media img { transform: scale(1.04); }

.rzs-card-distance {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--rzs-navy);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.rzs-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 18px 20px 16px;
}

.rzs-card-title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
}

.rzs-card-title a {
  color: var(--rzs-ink);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rzs-card-title a:hover { color: var(--rzs-primary); }

.rzs-card-desc {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--rzs-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rzs-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eef2f6;
}

.rzs-price {
  font-size: 0.86rem;
  color: var(--rzs-muted);
  line-height: 1.25;
}

.rzs-price strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--rzs-ink);
}

.rzs-price span {
  display: block;
  font-size: 0.76rem;
}

.rzs-card .rzs-rent {
  min-height: 40px;
  padding: 8px 20px;
  font-size: 0.9rem;
  box-shadow: none;
}

.rzs-pager[hidden] { display: none; }

/* ---------- Empty / start states ---------- */
.rzs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 44px 20px;
  border: 1px dashed #d3dde7;
  border-radius: var(--rzs-radius);
  background: #fff;
  text-align: center;
}

.rzs-empty > i {
  font-size: 30px;
  color: #9fb3c6;
}

.rzs-empty h2 {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  color: var(--rzs-ink);
}

.rzs-empty p {
  max-width: 440px;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  color: var(--rzs-muted);
}

.rzs-empty .rzs-btn { margin-top: 6px; }

/* ---------- Pager ---------- */
.rzs-pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.rzs-pager button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rzs-line);
  border-radius: 50%;
  background: #fff;
  color: var(--rzs-ink);
  cursor: pointer;
  box-shadow: none;
}

.rzs-pager button:hover:not(:disabled) { border-color: var(--rzs-primary); color: var(--rzs-primary); }
.rzs-pager button:disabled { opacity: 0.4; cursor: default; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .rzs-bar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .rzs-field-what,
  .rzs-field-where { grid-column: span 3; }
  .rzs-field-distance,
  .rzs-field-date { grid-column: span 2; }
  .rzs-submit { grid-column: 1 / -1; flex-direction: row; justify-content: center; align-items: center; gap: 16px; }
  .rzs-submit .rzs-btn { min-width: 220px; }
}

@media (max-width: 991.98px) {
  .rzs-layout { grid-template-columns: minmax(0, 1fr); }
  .rzs-map { position: relative; top: auto; order: -1; }
  .rzs-map #map_canvas,
  .rzs-map .google_map_canvas { height: 260px !important; }
}

@media (max-width: 640px) {
  .rzs-wrap { padding: 0 16px; }
  .rzs-hero { padding: 24px 0 20px; }
  .rzs-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; gap: 8px; }
  .rzs-field-what,
  .rzs-field-where,
  .rzs-field-distance { grid-column: 1 / -1; }
  .rzs-field-date { grid-column: span 1; }
  .rzs-submit .rzs-btn { flex: 1; min-width: 0; }
  #product-rows { gap: 12px; }
  .rzs-card { grid-template-columns: minmax(0, 1fr); }
  .rzs-card-media { min-height: 0; aspect-ratio: 16 / 10; }
  .rzs-card-body { padding: 14px 14px 12px; }
}
