/* ── Liked Homes List ───────────────────────────────── */
.listing-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
}

.listing-item {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.listing-item:active { transform: scale(0.98); border-color: var(--primary-border); }

.listing-item-image {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-alt);
  flex-shrink: 0;
}

.listing-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.listing-item-price {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 2px;
}

.listing-item-address {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.listing-item-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Match Action Buttons ──────────────────────────── */
.match-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.match-action-btn:hover, .match-action-btn:active {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
}

/* ── Tour Calendar ──────────────────────────────────── */
.tour-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
}

.tour-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  transition: all 0.2s;
}

.tour-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.tour-card-address {
  font-weight: 600;
  font-size: 15px;
  flex: 1;
  margin-right: 8px;
}

.tour-card-details {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
}

.tour-card-details div {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.tour-card-actions {
  display: flex;
  gap: 8px;
}

/* ── Buyer Tour Status Tracker ─────────────────────── */
.buyer-tour-status-tracker {
  display: flex;
  flex-direction: column;
}

.tracker-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}

.tracker-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 36px;
  bottom: -4px;
  width: 2px;
  background: #2a2a4a;
}

.tracker-step.completed:not(:last-child)::after {
  background: #00d48a;
}

.tracker-step.active:not(:last-child)::after {
  background: linear-gradient(to bottom, #6366f1 50%, #2a2a4a 50%);
}

.tracker-step-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  z-index: 1;
}

.tracker-step.completed .tracker-step-indicator {
  background: #00d48a;
  color: #0f0f1a;
  font-weight: 700;
}

.tracker-step.active .tracker-step-indicator {
  background: #6366f1;
  color: #ffffff;
  animation: pulse-glow 2s ease-in-out infinite;
}

.tracker-step.upcoming .tracker-step-indicator {
  background: #2a2a4a;
  color: #666;
}

.tracker-step.failed .tracker-step-indicator {
  background: #ff4458;
  color: #ffffff;
}

.tracker-step.cancelled .tracker-step-indicator {
  background: #2a2a4a;
  color: #666;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

.tracker-step-label {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  margin-top: 3px;
}

.tracker-step.upcoming .tracker-step-label { color: #666; }
.tracker-step.cancelled .tracker-step-label { color: #666; text-decoration: line-through; }

.tracker-step-detail {
  color: #9ca3af;
  font-size: 12px;
  margin-top: 2px;
}

/* ── Calendar Picker ───────────────────────────────── */
.cal-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.15s;
  text-align: left;
}

.cal-option-btn:hover { border-color: #6366f1; }

.cal-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}


/* ── Time Window Picker ─────────────────────────────── */
.time-windows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.time-window-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.time-window-row .input { flex: 1; }

.time-window-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 8px;
  display: flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.add-time-window {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 0;
  min-height: 44px;
}


/* ── Tour Tab Enhancements ─────────────────────────── */
.tour-tabs {
  display: flex;
  gap: 0;
  margin: 0 16px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.tour-tab {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
  min-height: 44px;
}

.tour-tab.active {
  background: var(--primary-bg);
  color: var(--primary);
}

.tour-tab + .tour-tab {
  border-left: 1px solid var(--card-border);
}

.tour-buyer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tour-buyer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.tour-buyer-info {
  flex: 1;
  min-width: 0;
}

.tour-buyer-name {
  font-weight: 600;
  font-size: 14px;
}

.tour-buyer-contact {
  font-size: 12px;
  color: var(--text-secondary);
}

.tour-time-slots {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}

.tour-time-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 10px;
  background: var(--surface-alt);
  border-radius: 8px;
}

.tour-time-slot svg { flex-shrink: 0; }

.tour-listing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.tour-listing-thumb {
  width: 48px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-alt);
  flex-shrink: 0;
}

.tour-listing-detail {
  flex: 1;
  min-width: 0;
}

.tour-listing-addr {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-listing-price {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Tour Coordination Panel ──────────────────────── */
.coord-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.coord-panel {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.coord-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.coord-panel-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.coord-panel-body {
  padding: 16px 20px 24px;
}

.coord-section {
  background: var(--surface-alt);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.coord-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.coord-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.coord-actions .btn {
  justify-content: center;
}

/* ── Tour Groups (Buyer's Agent View) ────────────── */
.tour-group {
  margin-bottom: 20px;
}

.tour-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.tour-group-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tour-group-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-alt);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 10px;
}

.tour-group-header.needs-action .tour-group-title {
  color: var(--warning);
}

.tour-group-header.needs-action .tour-group-count {
  background: var(--warning-bg);
  color: var(--warning);
}

.tour-coord-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.tour-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

