/*
 * Toolbox Pro unified card layouts.
 *
 * 2026-05-12 parity audit: Booking + WO cards rendered with four
 * different layouts across surfaces. These tokens are the single
 * source of truth — pair with .sp.sp-<status> from status_pills.css.
 *
 * Two card flavors:
 *   .tbp-card        — generic surface (used for tasks, sections, panels)
 *   .tbp-detail-card — list-item card with a title row + meta + status
 *                      pill on the right + optional action footer
 *
 * Usage:
 *   <article class="tbp-detail-card">
 *     <div class="tbp-detail-card__title-row">
 *       <h3 class="tbp-detail-card__id">WO #42</h3>
 *       <h2 class="tbp-detail-card__title">6962 W Palo Verde Dr</h2>
 *       <span class="sp sp-completed">completed</span>
 *     </div>
 *     <div class="tbp-detail-card__meta">📍 6962 W Palo Verde Dr · 4 tasks</div>
 *     <footer class="tbp-detail-card__actions">…buttons…</footer>
 *   </article>
 */

.tbp-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tbp-detail-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.tbp-detail-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}
.tbp-detail-card:focus-within {
  outline: 2px solid #c67b29;
  outline-offset: 2px;
}

.tbp-detail-card__title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.tbp-detail-card__id {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a5661d;          /* WCAG-AA on white — matches the brand orange */
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  flex-shrink: 0;
}
.tbp-detail-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tbp-detail-card__title-row .sp {
  margin-left: auto;        /* status pill always on the right */
}

.tbp-detail-card__meta {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
  margin-top: 2px;
}
.tbp-detail-card__meta + .tbp-detail-card__meta {
  margin-top: 1px;
}

.tbp-detail-card__price {
  font-size: 0.92rem;
  font-weight: 700;
  color: #16a34a;
  font-feature-settings: "tnum";
  margin-top: 6px;
}
.tbp-detail-card__price--est {
  color: #92400e;
  font-weight: 600;
}

.tbp-detail-card__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

/* Disabled / sealed state (paid, invoiced, cancelled) */
.tbp-detail-card.is-sealed {
  background: #fafbfc;
  border-style: dashed;
  cursor: default;
}
.tbp-detail-card.is-sealed:hover { box-shadow: none; border-color: #e2e8f0; }
