/* ════════════════════════════════════════════════════════════════
 * Garage Leads — B2C pages
 * #/garages  (directory + request modal)
 * #/requests (My requests)
 * Mirrors the app's existing card / token palette.
 * ════════════════════════════════════════════════════════════════ */

/* ── Filter input ─────────────────────────────────────────────── */
.garages-filter-wrap {
  margin-bottom: 20px;
}

.garages-filter {
  width: 100%;
  max-width: 480px;
  padding: 10px 14px;
  background: var(--surface-card, #11182b);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary, #f1f5f9);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.garages-filter::placeholder {
  color: var(--text-dim, #64748b);
}

.garages-filter:focus {
  border-color: rgba(34, 211, 166, 0.45);
}

/* ── Garage directory card ────────────────────────────────────── */
.garage-dir-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--surface-card, #11182b);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
}

.garage-dir-card:hover {
  border-color: rgba(34, 211, 166, 0.2);
  background: rgba(34, 211, 166, 0.03);
}

/* Skeleton placeholder */
.garage-dir-card--skeleton {
  min-height: 80px;
  opacity: 0.35;
  animation: garage-leads-pulse 1.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes garage-leads-pulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.15; }
}

.garage-dir-card__body {
  flex: 1;
  min-width: 0;
}

.garage-dir-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #f1f5f9);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.garage-dir-card__address {
  font-size: 0.825rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 8px;
  line-height: 1.4;
}

.garage-dir-card__services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.garage-dir-card__service-chip {
  display: inline-block;
  padding: 2px 9px;
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 20px;
  font-size: 0.75rem;
  color: #5eead4;
  white-space: nowrap;
}

.garage-dir-card__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.garage-dir-card__quote-btn {
  padding: 9px 14px;
  background: linear-gradient(90deg, #0EA5E9, #22d3a6);
  border: 0;
  border-radius: 8px;
  color: #0a0f1e;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.garage-dir-card__quote-btn:hover {
  opacity: 0.88;
}

/* ── Request modal fields (extends lead-modal from garage-lead-modal.css) ── */
.lead-modal__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lead-modal__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lead-modal__select,
.lead-modal__input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-primary, #f1f5f9);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.lead-modal__select:focus,
.lead-modal__input:focus {
  border-color: rgba(34, 211, 166, 0.4);
}

.lead-modal__select option {
  background: #11182b;
  color: #f1f5f9;
}

/* ── My Requests cards ────────────────────────────────────────── */
.requests-card {
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--surface-card, #11182b);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s;
}

.requests-card:hover {
  border-color: rgba(255, 255, 255, 0.13);
}

/* Skeleton placeholder */
.requests-card--skeleton {
  min-height: 90px;
  opacity: 0.35;
  animation: garage-leads-pulse 1.4s ease-in-out infinite;
  pointer-events: none;
}

.requests-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.requests-card__garage {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary, #f1f5f9);
}

/* Status badge */
.requests-card__status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted, #94a3b8);
}

.requests-card__status-badge--pending   { background: rgba(251,191,36,0.12); color: #fbbf24; }
.requests-card__status-badge--quoted    { background: rgba(34,211,166,0.12); color: #22d3a6; }
.requests-card__status-badge--booked    { background: rgba(99,102,241,0.15); color: #818cf8; }
.requests-card__status-badge--completed { background: rgba(34,197,94,0.12);  color: #4ade80; }
.requests-card__status-badge--declined  { background: rgba(239,68,68,0.12);  color: #f87171; }

.requests-card__vehicle {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
}

.requests-card__service {
  font-size: 0.875rem;
  color: var(--text-secondary, #cbd5e1);
}

/* Quote block */
.requests-card__quote {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(34, 211, 166, 0.06);
  border: 1px solid rgba(34, 211, 166, 0.2);
  border-radius: 8px;
}

.requests-card__quote-amount {
  font-size: 0.95rem;
  font-weight: 700;
  color: #22d3a6;
}

.requests-card__quote-note {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
}

/* Booking block */
.requests-card__booking {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
}

.requests-card__booking-time {
  font-size: 0.85rem;
  color: var(--text-secondary, #cbd5e1);
}

.requests-card__accept-btn {
  padding: 8px 14px;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.requests-card__accept-btn:hover:not(:disabled) {
  opacity: 0.88;
}

.requests-card__accept-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Booking confirmed badge */
.requests-card__confirmed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4ade80;
}

/* Empty-state link */
.requests-empty-link {
  color: #22d3a6;
  text-decoration: none;
  font-weight: 600;
}

.requests-empty-link:hover {
  text-decoration: underline;
}

/* ── Mobile adjustments ──────────────────────────────────────── */
@media (max-width: 600px) {
  .garage-dir-card {
    flex-direction: column;
    align-items: stretch;
  }

  .garage-dir-card__actions {
    justify-content: flex-end;
  }

  .requests-card__booking {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Rate-this-garage button (My Requests — shown after a booking is accepted) ── */
.requests-card__rate-btn {
  margin-left: 12px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(34, 211, 166, 0.12);
  border: 1px solid rgba(34, 211, 166, 0.45);
  border-radius: 8px;
  color: #5eead4;
  transition: background 0.15s, border-color 0.15s;
}
.requests-card__rate-btn:hover {
  background: rgba(34, 211, 166, 0.22);
  border-color: rgba(34, 211, 166, 0.7);
}
.requests-card__rate-btn--rated {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-muted, #94a3b8);
}

/* ── "See reviews" toggle (Find a Garage directory card) ── */
.garage-dir-card__see-reviews {
  margin-top: 8px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-muted, #94a3b8);
  transition: border-color 0.15s, color 0.15s;
}
.garage-dir-card__see-reviews:hover {
  border-color: rgba(34, 211, 166, 0.45);
  color: #5eead4;
}
