/* Small Business Helper — supplements /style.css and the shared card, modal
   and weekday-picker styling borrowed from /activities/style.css. */

/* Schedule bar above the month grid */
.biz-calbar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin: 0 0 8px; }
.biz-calbar-f { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.biz-calbar-f select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 20px;
  font-family: inherit; font-size: 12.5px; background: #fff; max-width: 220px; }

/* Business pills carry a customer name, which the kid calendar's pills don't.
   Grid items are min-width:auto by default, so a long nowrap name widens its
   column and pushes the last days of the week off a phone screen. */
.cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-cell { min-width: 0; }

/* One-off sessions read as additions, not part of the paid-for run. */
.cal-pill.pill-adhoc { background: #fff !important; color: #5b4fd6;
  border: 1px dashed #a79ff2; }

/* On a phone a cell is ~50px wide and fits one thing: the package name, which
   is what tells sessions apart. The customer filter above the grid narrows by
   person, and the package list below carries the times. */
@media (max-width: 640px) {
  .cal-who, .cal-time { display: none; }
}

.biz-search { width: 100%; max-width: 320px; padding: 8px 12px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 20px; font-family: inherit; font-size: 13px; background: #fff; }
.biz-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(118,109,244,.12); }

.biz-empty { color: var(--muted); font-size: 12.5px; padding: 16px; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; margin: 0 0 10px; }

.biz-hint { font-size: 12px; color: var(--primary); background: #f1effe; border-radius: 8px;
  padding: 6px 10px; margin: -4px 0 12px; min-height: 0; }
.biz-hint:empty { display: none; }

.biz-check { display: flex !important; align-items: center; gap: 8px; font-size: 13px; color: var(--text, #2b2f3e); }
.biz-check input { width: auto !important; }

/* Month totals strip */
.biz-totals { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.biz-totals > div { background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 16px; min-width: 118px; box-shadow: 0 2px 8px -3px rgba(55,56,78,.08); }
.biz-totals > div.is-unpaid { border-color: #f8c7d2; background: #fff7f9; }
.biz-totals > div.is-unpaid b { color: #b3261e; }
.biz-totals-k { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.biz-totals b { font-size: 17px; }

/* Per-customer summary card */
.biz-card { background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 2px 8px -3px rgba(55,56,78,.08); }
.biz-card.has-unpaid { border-left: 3px solid #f36d8a; }
.biz-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.biz-card-name { font-weight: 600; font-size: 13.5px; }
.biz-card-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.biz-card-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.biz-card-sub { font-size: 13.5px; font-weight: 600; color: var(--primary); }
.biz-unpaid-tag { font-size: 11px; font-weight: 600; color: #b3261e; background: #fde8ec;
  border-radius: 20px; padding: 2px 8px; margin-left: 4px; }

/* Package table inside a summary card. The wrapper scrolls on its own so a
   wide table never pushes the whole page sideways on a phone. */
.biz-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.biz-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12.5px; }
.biz-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--muted); font-weight: 600; padding: 0 8px 5px 0; border-bottom: 1px solid var(--border); }
.biz-table td { padding: 7px 8px 7px 0; border-bottom: 1px solid #f1f2f6; vertical-align: middle; }
.biz-table tr:last-child td { border-bottom: none; }
.biz-table .biz-num { text-align: right; }
.biz-table .biz-dim { color: var(--muted); font-size: 11.5px; }

.biz-paid { border: 1px solid var(--border); background: #fff; border-radius: 20px;
  padding: 4px 10px; font-size: 11.5px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.biz-paid:hover { border-color: var(--primary); }
.biz-paid.on { background: #e4f9f1; border-color: #9fe3cd; color: #0f8f68; }

.biz-wa { border: 1px solid #bfe9cf; background: #eefaf2; color: #128c4a; border-radius: 20px;
  padding: 5px 12px; font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.biz-wa:hover { background: #d9f4e5; }
.biz-wa:disabled { opacity: .45; cursor: not-allowed; border-color: var(--border); background: #f5f6f8; color: var(--muted); }

.biz-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Follow-up + customer rows */
.biz-lapse-row, .biz-cust-row { background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 11px 14px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; box-shadow: 0 2px 8px -3px rgba(55,56,78,.08); }
.biz-lapse-row { border-left: 3px solid #ffb15c; }
.biz-cust-row.is-archived { opacity: .55; }

@media (max-width: 640px) {
  .biz-totals > div { flex: 1 1 40%; min-width: 0; padding: 9px 12px; }
  .biz-totals b { font-size: 15px; }
  .biz-card-head, .biz-lapse-row, .biz-cust-row { align-items: flex-start; }
  .biz-table { font-size: 12px; }
  .biz-table td, .biz-table th { padding-right: 5px; }
}
