/* ═══════════════════════════════════════════════════════════════════════════
   Empower Real Estate — IDX Property Search Styles
   Dark luxury aesthetic: --deep-navy backgrounds, --gold accents
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Mode Toggle ─────────────────────────────────────────────────────────── */
.idx-mode-toggle {
  display: flex;
  gap: 2px;
  margin-right: auto;
  background: rgba(201,169,110,0.06);
  border: 1px solid rgba(201,169,110,0.12);
  padding: 2px;
  flex-shrink: 0;
}
.idx-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}
.idx-mode-btn:hover { color: var(--cream); }
.idx-mode-btn.active {
  background: var(--gold);
  color: var(--noir);
}
.idx-mode-btn.active svg { stroke: var(--noir); }

/* ── Filter Bar ──────────────────────────────────────────────────────────── */
.idx-filters {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 12px;
}
.idx-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.idx-filter-lbl {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.6;
}
.idx-select {
  background: rgba(10,10,10,0.8);
  border: 1px solid rgba(201,169,110,0.18);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 12px;
  padding: 8px 28px 8px 10px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.3s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23C9A96E' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  min-width: 100px;
}
.idx-select:focus { border-color: rgba(201,169,110,0.5); }
.idx-select option { background: #0D1B2A; color: var(--cream); }
.idx-select-sm { min-width: 70px; }
.idx-price-row { display: flex; align-items: center; gap: 4px; }
.idx-price-dash { color: var(--text-muted); font-size: 11px; }
.idx-search-btn {
  padding: 8px 24px;
  background: var(--gold);
  color: var(--noir);
  border: none;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s;
  align-self: flex-end;
}
.idx-search-btn:hover { background: var(--gold-light); }

/* ── Map Section ─────────────────────────────────────────────────────────── */
.idx-map-section {
  border-bottom: 1px solid rgba(201,169,110,0.08);
}
.idx-map-container {
  position: relative;
}
/* Override Google Maps InfoWindow styling */
.gm-style .gm-style-iw-c {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
}
.gm-style .gm-style-iw-d { overflow: visible !important; }
.gm-style .gm-style-iw-tc::after { display: none !important; }
.gm-style button.gm-ui-hover-effect {
  filter: invert(1) !important;
  opacity: 0.6 !important;
}

/* ── Results Section ─────────────────────────────────────────────────────── */
.idx-results-section {
  padding: 32px 52px 80px;
}
.idx-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(201,169,110,0.08);
}
.idx-results-count {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  color: var(--cream);
}

/* ── Property Cards Grid ─────────────────────────────────────────────────── */
.idx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.idx-card {
  background: rgba(13,27,42,0.4);
  border: 1px solid rgba(201,169,110,0.08);
  cursor: pointer;
  transition: all 0.35s var(--ease);
  overflow: hidden;
}
.idx-card:hover {
  border-color: rgba(201,169,110,0.25);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.idx-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #080c12;
}
.idx-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.idx-card:hover .idx-card-img img { transform: scale(1.05); }
.idx-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: var(--noir);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
}
.idx-photo-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(10,10,10,0.75);
  color: var(--cream);
  font-size: 10px;
  padding: 4px 8px;
  backdrop-filter: blur(8px);
}
.idx-card-body { padding: 20px; }
.idx-card-price {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: 6px;
}
.idx-card-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--cream);
  margin-bottom: 8px;
}
.idx-dot { color: var(--text-muted); font-size: 8px; }
.idx-card-addr {
  font-size: 14px;
  color: var(--cream);
  font-weight: 400;
  margin-bottom: 2px;
}
.idx-card-city {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.idx-card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.idx-card-agent {
  display: flex;
  flex-direction: column;
  padding-top: 10px;
  border-top: 1px solid rgba(201,169,110,0.06);
}
.idx-card-agent .idx-agent-name {
  font-size: 11px;
  color: var(--text-light);
}
.idx-card-agent .idx-agent-office {
  font-size: 10px;
  color: var(--text-muted);
}

/* ── Loading & Empty States ──────────────────────────────────────────────── */
.idx-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.idx-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(201,169,110,0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: idxSpin 0.8s linear infinite;
}
@keyframes idxSpin { to { transform: rotate(360deg); } }
.idx-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 300;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.idx-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}
.idx-page-btn {
  padding: 10px 24px;
  background: none;
  border: 1px solid rgba(201,169,110,0.25);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}
.idx-page-btn:hover {
  background: var(--gold);
  color: var(--noir);
}
.idx-page-info {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Compliance ──────────────────────────────────────────────────────────── */
.idx-compliance {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(201,169,110,0.06);
  font-size: 10px;
  color: rgba(140,135,130,0.4);
  line-height: 1.8;
}

/* ── Detail Modal ────────────────────────────────────────────────────────── */
.idx-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s;
  overflow-y: auto;
  padding: 40px 20px;
}
.idx-modal.open { opacity: 1; visibility: visible; }
.idx-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
}
.idx-modal-content {
  position: relative;
  background: var(--noir);
  border: 1px solid rgba(201,169,110,0.12);
  max-width: 900px;
  width: 100%;
  z-index: 1;
  margin: auto;
}
.idx-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(10,10,10,0.7);
  border: 1px solid rgba(201,169,110,0.2);
  color: var(--cream);
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
}
.idx-modal-close:hover { background: var(--gold); color: var(--noir); border-color: var(--gold); }

/* Gallery */
.idx-detail-gallery { background: #080c12; }
.idx-gallery-main {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.idx-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.idx-gallery-thumbs {
  display: flex;
  gap: 2px;
  padding: 2px;
  overflow-x: auto;
  background: rgba(10,10,10,0.8);
}
.idx-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
  flex-shrink: 0;
}
.idx-thumb:hover, .idx-thumb.active { opacity: 1; }

/* Detail body */
.idx-detail-body { padding: 32px; }
.idx-detail-price {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: 8px;
}
.idx-detail-addr {
  font-size: 16px;
  color: var(--cream);
  margin-bottom: 24px;
}
.idx-detail-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 32px;
  padding: 20px;
  background: rgba(13,27,42,0.5);
  border: 1px solid rgba(201,169,110,0.08);
}
.idx-detail-stat { text-align: center; }
.idx-stat-val {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--cream);
  display: block;
}
.idx-stat-lbl {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}
.idx-detail-desc { margin-bottom: 24px; }
.idx-detail-desc h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 12px;
}
.idx-detail-desc p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  font-weight: 300;
}
.idx-detail-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.idx-feature {
  font-size: 10px;
  padding: 5px 12px;
  border: 1px solid rgba(201,169,110,0.15);
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* CTAs */
.idx-detail-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.idx-cta-primary {
  flex: 1;
  padding: 14px 24px;
  background: var(--gold);
  color: var(--noir);
  text-decoration: none;
  text-align: center;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: background 0.3s;
}
.idx-cta-primary:hover { background: var(--gold-light); }
.idx-cta-secondary {
  flex: 1;
  padding: 14px 24px;
  background: none;
  border: 1px solid rgba(201,169,110,0.3);
  color: var(--gold);
  text-decoration: none;
  text-align: center;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.3s;
}
.idx-cta-secondary:hover { background: rgba(201,169,110,0.08); }

/* Agent info */
.idx-detail-agent {
  padding: 16px 0;
  border-top: 1px solid rgba(201,169,110,0.06);
  border-bottom: 1px solid rgba(201,169,110,0.06);
  margin-bottom: 16px;
}
.idx-agent-info { display: flex; flex-direction: column; gap: 2px; }
.idx-agent-label { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); opacity: 0.5; }

/* Disclaimer */
.idx-detail-disclaimer {
  font-size: 10px;
  color: rgba(140,135,130,0.4);
  line-height: 1.7;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .idx-results-section { padding: 24px 24px 60px; }
  .idx-detail-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .idx-mode-toggle { margin-right: 0; margin-bottom: 8px; }
  .idx-filters { gap: 8px; }
  .idx-filter-group { min-width: 0; }
  .idx-grid { grid-template-columns: 1fr; }
  .idx-detail-body { padding: 20px; }
  .idx-detail-price { font-size: 28px; }
  .idx-detail-stats { grid-template-columns: repeat(3, 1fr); }
  .idx-detail-cta { flex-direction: column; }
  .idx-modal { padding: 20px 10px; }
}
@media (max-width: 480px) {
  .idx-mode-btn { padding: 6px 10px; font-size: 10px; }
  .idx-select { font-size: 11px; padding: 6px 24px 6px 8px; min-width: 60px; }
  .idx-detail-stats { grid-template-columns: repeat(2, 1fr); }
}
