/* ============================================================
   IDX Search — LuxuryDade
   Live MLS property search styles
   ============================================================ */

/* Search Form */
.idx-search {
  padding: 24px 32px;
  background: rgba(201,169,110,0.04);
  border: 1px solid rgba(201,169,110,0.12);
  border-radius: 8px;
  margin-bottom: 40px;
}

.idx-search__row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.idx-search__group {
  flex: 1;
  min-width: 180px;
}

.idx-search__group--wide {
  flex: 2;
  min-width: 260px;
}

.idx-search__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.idx-search__input,
.idx-search__select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.idx-search__input:focus,
.idx-search__select:focus {
  outline: none;
  border-color: var(--gold);
}

.idx-search__input::placeholder {
  color: rgba(255,255,255,0.3);
}

.idx-search__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a96e' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.idx-search__select option {
  background: #141826;
  color: #fff;
}

.idx-search__btn {
  padding: 12px 32px;
  background: var(--gold);
  color: #0a0a0f;
  border: none;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.idx-search__btn:hover {
  background: #d4b678;
}

.idx-search__row--filters {
  margin-top: 12px;
}

/* Quick Filters */
.idx-quick-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.idx-quick-filter {
  padding: 8px 20px;
  background: rgba(201,169,110,0.06);
  border: 1px solid rgba(201,169,110,0.15);
  border-radius: 20px;
  color: var(--silver);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.idx-quick-filter:hover {
  background: rgba(201,169,110,0.12);
  border-color: var(--gold);
  color: var(--gold);
}

/* Results Meta */
.idx-results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 24px;
}

.idx-results-meta__count {
  font-size: 14px;
  color: var(--white);
  font-weight: 500;
}

.idx-results-meta__page {
  font-size: 13px;
  color: var(--silver);
}

/* Grid */
.idx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Card Link */
.idx-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Card */
.idx-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.idx-card:hover {
  border-color: rgba(201,169,110,0.3);
  transform: translateY(-2px);
}

.idx-card__photo {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #141826;
}

.idx-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.idx-card:hover .idx-card__img {
  transform: scale(1.03);
}

.idx-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
}

.idx-card__badge--active {
  background: rgba(34,197,94,0.9);
  color: #fff;
}

.idx-card__badge--sold {
  background: rgba(239,68,68,0.9);
  color: #fff;
}

.idx-card__badge--pending {
  background: rgba(234,179,8,0.9);
  color: #000;
}

.idx-card__photo-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 3px 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 11px;
  border-radius: 3px;
}

.idx-card__body {
  padding: 20px;
}

.idx-card__price {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--white);
  margin: 0 0 6px;
  line-height: 1.2;
}

.idx-card__address {
  font-size: 14px;
  color: var(--white);
  margin: 0 0 2px;
  font-weight: 500;
}

.idx-card__city {
  font-size: 13px;
  color: var(--silver);
  margin: 0 0 14px;
}

.idx-card__details {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.idx-card__detail {
  font-size: 13px;
  color: var(--silver);
}

.idx-card__detail--ppsf {
  color: var(--gold);
  font-weight: 500;
}

.idx-card__footer {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.idx-card__mls {
  color: rgba(255,255,255,0.3);
  font-size: 11px;
}

.idx-card__dom {
  color: rgba(255,255,255,0.3);
  font-size: 11px;
}

.idx-card__cta {
  margin-left: auto;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: color 0.2s;
}

.idx-card__cta:hover {
  color: #d4b678;
}

/* Pagination */
.idx-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 40px 0;
}

.idx-pagination__btn {
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  color: var(--silver);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.idx-pagination__btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.idx-pagination__btn--active {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0a0f;
  font-weight: 600;
}

.idx-pagination__dots {
  color: var(--silver);
  font-size: 13px;
  padding: 0 4px;
}

/* Loading */
.idx-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 0;
}

.idx-loading__spinner {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(201,169,110,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: idx-spin 0.8s linear infinite;
}

@keyframes idx-spin {
  to { transform: rotate(360deg); }
}

.idx-loading__text {
  color: var(--silver);
  font-size: 14px;
  margin-top: 16px;
}

/* Empty State */
.idx-empty {
  text-align: center;
  padding: 80px 20px;
}

.idx-empty__text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--white);
  margin: 0 0 8px;
}

.idx-empty__sub {
  color: var(--silver);
  font-size: 14px;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto;
}

/* Disclaimer */
.idx-disclaimer {
  margin-top: 40px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 4px;
}

.idx-disclaimer p {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   MY LISTINGS
   ============================================================ */

.ml-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
}

.ml-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--silver);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.ml-tab:hover { color: var(--white); }

.ml-tab--active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.ml-tab__count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  background: rgba(201,169,110,0.12);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
}

.ml-panel { display: none; }
.ml-panel--active { display: block; }

.ml-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.ml-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(201,169,110,0.03);
  border: 1px solid rgba(201,169,110,0.12);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.ml-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.ml-card__photo {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #141826;
}

.ml-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.ml-card:hover .ml-card__photo img { transform: scale(1.03); }

.ml-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
}

.ml-card__badge--active { background: rgba(34,197,94,0.9); color: #fff; }
.ml-card__badge--sold { background: rgba(239,68,68,0.9); color: #fff; }
.ml-card__badge--pending { background: rgba(234,179,8,0.9); color: #000; }

.ml-card__body { padding: 18px 20px; }

.ml-card__price {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--white);
  margin: 0 0 4px;
}

.ml-card__address {
  font-size: 14px;
  color: var(--white);
  font-weight: 500;
  margin: 0 0 2px;
}

.ml-card__city {
  font-size: 13px;
  color: var(--silver);
  margin: 0 0 10px;
}

.ml-card__meta {
  font-size: 13px;
  color: var(--silver);
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ml-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ml-card__mls {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}

.ml-card__cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .idx-search {
    padding: 16px 20px;
  }

  .idx-search__group {
    min-width: 100%;
  }

  .idx-search__group--wide {
    min-width: 100%;
  }

  .idx-search__row {
    gap: 10px;
  }

  .idx-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ml-grid {
    grid-template-columns: 1fr;
  }

  .idx-results-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .idx-quick-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .idx-quick-filters::-webkit-scrollbar {
    display: none;
  }

  .idx-pagination {
    flex-wrap: wrap;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .idx-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
