/* Records: customers and their categories, vehicles, drivers, places (ui/js/pages/records.js).
 * Built on coach.css's pieces; only the colours of its variables, so both themes read. */

/* the search box in a page head */
.rc-search { position: relative; }
.rc-search > svg { position: absolute; left: 10px; top: 9px; color: var(--rf-dim); pointer-events: none; }
.rc-search .input { width: 230px; height: 36px; padding-left: 34px; padding-right: 30px; }
.rc-search .x { position: absolute; right: 6px; top: 7px; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--rf-dim); }
.rc-search .x:hover { color: var(--rf-text); background: var(--rf-hover); }

/* filter chips (customer categories) */
.rc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.rc-chips .chip { height: 32px; font-size: 12px; font-weight: 600; color: var(--rf-dim); }
.rc-chips .chip.on { color: var(--sr-action-ink); }
.rc-chips .chip .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--sr-soft); color: var(--rf-dim); }
.rc-chips .chip.on .n { background: rgba(var(--sr-action-rgb), 0.16); color: var(--sr-action-ink); }

/* the lists */
.rc-name { display: inline-flex; align-items: center; gap: 9px; }
.rc-name .swatch { width: 14px; height: 14px; }
.rc-cat { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.rc-reg { display: inline-block; padding: 2px 7px; border-radius: 5px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; background: var(--sr-soft); color: var(--rf-text); }
.rc-date { white-space: nowrap; }
table.list td.nowrap { white-space: nowrap; }
table.list td.rc-clip, table.list td.rc-feat { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.list td.rc-feat { color: var(--rf-dim); font-size: 12px; max-width: 200px; }
table.list td.rc-tags { white-space: nowrap; }
table.list td.rc-tags .tag + .tag { margin-left: 4px; }
.rc-nomatch { margin: 0; padding: 18px 20px; font-size: 12.5px; }
.rc-none { margin: 4px 0; font-size: 12.5px; }

/* empty states */
.rc-empty { padding: 56px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--rf-dim); }
.rc-empty .ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 4px; color: var(--co-accent-text); background: rgba(var(--co-accent-rgb), 0.12); }
.rc-empty b { font-size: 15px; color: var(--rf-text); }
.rc-empty p { margin: 0 0 8px; max-width: 440px; line-height: 1.5; font-size: 12.5px; }

/* fields with a hint under them; colours */
.rc-hinted { display: flex; flex-direction: column; min-width: 0; }
.rc-hint { display: block; margin-top: 5px; font-size: 11.5px; line-height: 1.4; color: var(--rf-faint); }
.rc-hint.warn { color: var(--rf-warn); font-weight: 600; }
.rc-hint.err { color: var(--rf-err); font-weight: 600; }
.rc-warn { color: var(--rf-warn); font-weight: 600; }
.rc-colour { height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 4px 0 4px; border-radius: 9px; background: var(--rf-field); box-shadow: inset 0 0 0 1.3px var(--sr-edge); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rc-colour input[type="color"], .rc-swatch-in { flex: none; width: 44px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: none; cursor: pointer; }
.rc-colour input[type="color"]::-webkit-color-swatch-wrapper, .rc-swatch-in::-webkit-color-swatch-wrapper { padding: 0; }
.rc-colour input[type="color"]::-webkit-color-swatch, .rc-swatch-in::-webkit-color-swatch { border: 0; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.rc-colour input[type="color"]::-moz-color-swatch, .rc-swatch-in::-moz-color-swatch { border: 0; border-radius: 7px; }
.rc-swatch-in { width: 52px; height: 32px; }
.rc-cats td { padding-top: 7px; padding-bottom: 7px; }
.rc-sep { height: 1px; background: var(--rf-line); margin: 4px 0; }

/* rows of fields: contacts, absences */
.rc-rows { display: flex; flex-direction: column; gap: 6px; }
.rc-row { display: grid; gap: 8px; align-items: center; }
.rc-row.contact { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) 38px; }
.rc-row.abs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 38px; gap: 6px 8px; padding: 8px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--rf-line); }
.rc-row.abs.head { padding: 0 8px; box-shadow: none; }
.rc-row.abs .note { grid-column: 1 / 4; height: 32px; font-size: 12.5px; }
.rc-row.head { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rf-faint); padding: 0 2px; }
.rc-row.past .input, .rc-row.past .select { color: var(--rf-faint); }

/* the delete that asks again */
.rc-armed { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--rf-err); font-weight: 600; }

/* availability: the list beside the months */
.rc-avail { display: grid; grid-template-columns: minmax(400px, 1fr) minmax(0, 1.25fr); gap: 28px; align-items: start; }
.rc-cal { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; border-radius: 14px; background: var(--rf-bar); box-shadow: inset 0 0 0 1px var(--sr-edge); }
.rc-cal-head { gap: 6px; }
.rc-cal-head .chip { height: 32px; font-size: 12px; font-weight: 600; }
.rc-cal-head .select { width: auto; min-width: 130px; height: 34px; }
.rc-cal .cal { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.rc-cal .days button.today { box-shadow: inset 0 0 0 1.5px var(--co-accent); }
.rc-cal .days button.wd-off:not(.off) { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--rf-line) 4px 7px); color: var(--rf-faint); }
.rc-cal .days button.off { color: var(--rf-text); }
.rc-cal .legend { font-size: 11.5px; gap: 12px; }
.rc-key { width: 12px; height: 12px; border-radius: 4px; display: inline-block; box-shadow: inset 0 0 0 1px var(--rf-line); }
.rc-key.today { box-shadow: inset 0 0 0 1.5px var(--co-accent); }
.rc-key.hol { box-shadow: inset 0 -2px 0 var(--rf-warn), inset 0 0 0 1px var(--rf-line); }
.rc-key.wd-off { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--rf-dim) 3px 4px); opacity: 0.6; }

/* the kinds of day away, each its colour (cal buttons and the legend's keys) */
.rc-cal .days button.k-holiday, .rc-key.k-holiday { background: rgba(90, 141, 255, 0.3); }
.rc-cal .days button.k-sick, .rc-key.k-sick { background: rgba(240, 72, 72, 0.3); }
.rc-cal .days button.k-training, .rc-key.k-training { background: rgba(0, 169, 157, 0.32); }
.rc-cal .days button.k-day_off, .rc-key.k-day_off { background: rgba(135, 146, 179, 0.34); }
.rc-cal .days button.k-other, .rc-key.k-other { background: rgba(124, 77, 255, 0.3); }
.rc-cal .days button.k-workshop, .rc-key.k-workshop { background: rgba(255, 166, 38, 0.34); }
.rc-cal .days button.k-mot, .rc-key.k-mot { background: rgba(90, 141, 255, 0.3); }
.rc-cal .days button.k-hired_out, .rc-key.k-hired_out { background: rgba(var(--co-accent-rgb), 0.28); }

/* places: the list beside the map */
.co-page.rc-fillpage { display: flex; flex-direction: column; }
.rc-fillpage > .co-page-head { flex: none; }
.rc-places { flex: 1; min-height: 460px; display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 16px; }
.rc-plist { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.rc-pscroll { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.rc-place { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-align: left; }
.rc-place:hover { background: var(--rf-hover); }
.rc-place.on { background: rgba(var(--co-accent-rgb), 0.1); box-shadow: inset 0 0 0 1.5px var(--co-accent); }
.rc-place .grow { display: flex; flex-direction: column; gap: 2px; }
.rc-place b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-place small { font-size: 11.5px; color: var(--rf-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-ppin { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; color: var(--sr-action-ink); background: var(--sr-soft); }
.rc-place.on .rc-ppin { color: #fff; background: var(--co-accent-deep); }
.rc-ppin.none { color: var(--rf-faint); }
.rc-pedit { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; box-shadow: inset 0 -1px 0 var(--rf-line); background: var(--rf-card); }
.rc-pedit textarea.input { min-height: 58px; }
.rc-pfoot { gap: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.rc-pmap { position: relative; display: flex; flex-direction: column; min-height: 0; }
.rc-find { gap: 6px; margin-bottom: 8px; }
.rc-pmap .co-map.rc-map { flex: 1; min-height: 360px; }
.rc-found { position: absolute; top: 46px; left: 0; right: 52px; z-index: 5; max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 12px; background: var(--rf-card); box-shadow: var(--rf-shadow), inset 0 0 0 1px var(--sr-edge); }
.rc-found button { text-align: left; padding: 7px 9px; border-radius: 8px; display: flex; flex-direction: column; gap: 2px; }
.rc-found button:hover { background: var(--rf-hover); }
.rc-found small { font-size: 11px; color: var(--rf-dim); }
.rc-found button.close { align-self: flex-end; font-size: 12px; font-weight: 600; color: var(--rf-dim); padding: 4px 9px; }
.rc-maphint { margin: 6px 0 0; font-size: 11.5px; }

@media (max-width: 1250px) {
  .rc-avail { grid-template-columns: minmax(0, 1fr); }
  .rc-places { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
}
