/* ==========================================
   PROPERTY COMPS PAGE
   ========================================== */

.comps-section {
  min-height: 100vh;
  padding: 100px 40px 80px;
  background: var(--bg);
  display: flex;
  align-items: flex-start;
}

.comps-container {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.comps-header {
  margin-bottom: 40px;
}

.comps-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.comps-sub {
  font-size: 1rem;
  color: var(--fg-dim);
}

/* CARD */
.comps-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.comps-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(245,158,11,0.15), transparent 60%);
  pointer-events: none;
}

/* FILTERS */
.comp-filters {
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.comp-address-group {
  flex: 2;
  min-width: 220px;
}

.comp-radius-group {
  flex: 1;
  min-width: 140px;
}

.comp-filters .inp-group-btn {
  flex: 0;
  min-width: auto;
}

.comp-radius-select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--fg);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.comp-radius-select:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

.comp-radius-select option {
  background: var(--bg-card);
  color: var(--fg);
}

/* SEARCH BUTTON */
.btn-comp-search {
  background: var(--amber);
  color: #000;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-comp-search:hover {
  background: #FBBF24;
  transform: translateY(-1px);
}

.btn-comp-search:active {
  transform: translateY(0);
}

/* SKIPTRACE BUTTON */
.btn-comp-skiptrace {
  background: transparent;
  color: var(--amber);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-comp-skiptrace:hover {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
  transform: translateY(-1px);
}

.btn-comp-skiptrace:active {
  transform: translateY(0);
}

/* RESULTS HEADER */
.comp-results-header {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

/* TABLE */
.comp-table-wrap {
  overflow-x: auto;
  margin-top: 24px;
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.comp-table th {
  text-align: left;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.comp-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-dim);
}

.comp-table td.comp-price,
.comp-table td:nth-child(2) {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--amber);
}

.comp-table tbody tr:hover {
  background: var(--bg-card-hover);
}

/* EMPTY / LOADING STATES */
.comp-empty,
.comp-loading {
  text-align: center;
  padding: 48px 24px;
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* SKIPTRACE CARD */
.comp-skiptrace-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 8px;
}

.comp-skiptrace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.comp-skiptrace-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.comp-skiptrace-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}

.comp-skiptrace-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  word-break: break-word;
}

.comp-skiptrace-value.comp-skiptrace-phone {
  color: var(--amber);
}

/* SKIPTRACE LOADING / ERROR */
.comp-skiptrace-loading,
.comp-skiptrace-error {
  text-align: center;
  padding: 32px 24px;
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.comp-skiptrace-error {
  color: var(--amber);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.05);
}

/* ==========================================
   RESPONSIVE — PROPERTY COMPS
   ========================================== */
@media (max-width: 640px) {
  .comps-section {
    padding: 88px 20px 60px;
  }

  .comp-filters {
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
  }

  .comp-address-group,
  .comp-radius-group {
    flex: 1;
    min-width: unset;
  }

  .comp-filters .inp-group-btn {
    flex: 1;
  }

  .btn-comp-search {
    width: 100%;
    padding: 14px 28px;
  }

  .btn-comp-skiptrace {
    width: 100%;
    padding: 14px 28px;
  }

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

/* ==========================================
   TOAST — SAVE CONTACT FEEDBACK
   ========================================== */
.comp-toast {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  margin-top: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  align-self: flex-start;
  animation: comp-toast-fade 0.25s ease-in;
}

.comp-toast-success {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #4ADE80;
}

.comp-toast-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #F87171;
}

@keyframes comp-toast-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .comp-toast {
    margin-top: 10px;
  }
}
