/* ==========================================================================
   JORIE DAILY — cleaning.css · Phase 44 · Cleaning & Home Care ♡
   Additive styles only. Reuses the design system: .card, .confirm / .sheet
   dialogs, .entry-type--tabs, .plan-btn, .btn, .field / .input and the
   Calendar's masked-icon marks. Nothing existing is restyled.
   ========================================================================== */

/* ---------- chips (same family as the timeline chips) ------------------ */
.cl-chip {
  display: inline-flex; align-items: center; flex: none;
  min-height: 22px; padding: 1px 9px; border-radius: var(--radius-pill, 999px);
  font-size: var(--fs-2xs, 0.72rem); font-weight: 700; letter-spacing: 0.02em; line-height: 1.35;
  border: 1px solid var(--line); color: var(--ink-2); background: transparent; white-space: nowrap;
}
.cl-chip--done { background: var(--accent); border-color: var(--accent); color: var(--on-accent, var(--ink)); }
.cl-chip--pending { border-style: dashed; border-color: var(--ink); color: var(--ink); }
.cl-chip--muted { border-style: dashed; color: var(--ink-3, var(--ink-2)); }
.cl-chip--info { background: var(--ds-attn-bg, var(--accent-soft, transparent)); border-color: transparent; color: var(--ink); }

/* ---------- Today timeline entry ---------------------------------------- */
.tl-item[data-source="cleaning"] > .tl-rail .tl-node { border-style: solid; }
.tl-host--cleaning { padding-top: 2px; }

/* ---------- the panel inside an entry / row ------------------------------ */
.cl-host { display: grid; gap: 10px; min-width: 0; }
.cl-host:empty { display: none; }
.cl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cl-btn { position: relative; min-height: 36px; font-size: var(--fs-xs, 0.8rem); font-weight: 600; }
.cl-btn::after { content: ""; position: absolute; inset: -4px -2px; }                 /* ≥ 44 px tap target */
.cl-btn .icon { width: 14px; height: 14px; }
.cl-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.cl-btn[aria-busy="true"] { cursor: progress; }
.cl-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cl-hint { font-size: var(--fs-xs, 0.8rem); color: var(--ink-2); line-height: 1.5; }
.cl-hint:empty { display: none; }
.cl-desc { font-size: var(--fs-sm, 0.9rem); color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
.cl-viewonly { font-style: italic; }
.cl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cl-steps li { display: grid; grid-template-columns: minmax(84px, auto) 1fr; gap: 10px; font-size: var(--fs-sm, 0.9rem); line-height: 1.45; color: var(--ink-2); }
.cl-steps li.is-current { color: var(--ink); font-weight: 600; }
.cl-steps__time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-checklist { margin: 0; padding-left: 1.15em; display: grid; gap: 3px; font-size: var(--fs-sm, 0.9rem); line-height: 1.45; }
.cl-checklist li::marker { color: var(--ink-3, var(--ink-2)); }

/* ---------- the Today / Calendar card ------------------------------------ */
.cl-card { display: grid; gap: 12px; }
.cl-card[hidden] { display: none; }
.cl-card__body { display: grid; gap: 10px; min-width: 0; }
.cl-quiet { font-size: var(--fs-sm, 0.9rem); color: var(--ink-2); }
.cl-summary { font-size: var(--fs-sm, 0.9rem); color: var(--ink-2); }
.cl-sub { margin-top: 4px; font-size: var(--fs-2xs, 0.72rem); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.cl-row {
  display: grid; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm, 14px);
  background: var(--surface);
}
.cl-row.is-inactive { opacity: 0.72; background: transparent; border-style: dashed; }
.cl-row__head { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.cl-row__icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); }
.cl-row__icon .icon { width: 15px; height: 15px; }
.cl-row__text { flex: 1 1 auto; min-width: 0; }
.cl-row__kicker { font-size: var(--fs-2xs, 0.72rem); color: var(--ink-2); letter-spacing: 0.02em; }
.cl-row__title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }

/* ---------- prompts (trip, pause, cancelled trip) ----------------------- */
.cl-prompt {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm, 14px);
  background: color-mix(in srgb, rgb(var(--pink-rgb, 235 200 205)) 14%, var(--surface));
  color: var(--ink);
  animation: clIn var(--dur-3, 320ms) var(--ease-out, ease-out) both;
}
:root[data-theme="dark"] .cl-prompt { background: rgb(var(--pink-rgb, 235 200 205) / 0.08); }
.cl-paused { border-style: dashed; }
.cl-prompt__icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.cl-prompt__icon .icon { width: 17px; height: 17px; }
.cl-prompt__body { min-width: 0; display: grid; gap: 4px; }
.cl-prompt__title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md, 1rem); line-height: 1.3; }
.cl-prompt__text { font-size: var(--fs-sm, 0.9rem); color: var(--ink-2); line-height: 1.5; }
.cl-prompt__actions { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 6px; }
.cl-prompt__actions .plan-btn { min-height: 34px; font-size: var(--fs-xs, 0.8rem); text-decoration: none; }
@keyframes clIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- dialogs ------------------------------------------------------ */
.cl-sheet__sub { margin-top: 6px; font-size: var(--fs-sm, 0.9rem); color: var(--ink-2); line-height: 1.45; }
.cl-sheet__body { display: grid; gap: 14px; min-width: 0; }
.cl-error { font-size: var(--fs-sm, 0.9rem); color: var(--danger, #9b2335); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cl-error:empty { display: none; }
.cl-error__btn { min-height: 32px; font-size: var(--fs-xs, 0.8rem); }
.cl-when-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cl-when-grid[hidden] { display: none; }
@media (max-width: 419px) { .cl-when-grid { grid-template-columns: 1fr; } }
.cl-choices { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; min-width: 0; }
.cl-choice { position: relative; display: block; cursor: pointer; }
.cl-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cl-choice__body {
  display: grid; gap: 2px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm, 14px); background: var(--surface);
  transition: border-color var(--t-fast, 120ms) ease, background-color var(--t-fast, 120ms) ease;
}
.cl-choice__body strong { font-size: var(--fs-sm, 0.9rem); color: var(--ink); }
.cl-choice__body span { font-size: var(--fs-xs, 0.8rem); color: var(--ink-2); line-height: 1.45; }
.cl-choice input:checked + .cl-choice__body { border-color: var(--burgundy, var(--ink)); background: var(--tint-chip, transparent); box-shadow: inset 0 0 0 1px var(--burgundy, var(--ink)); }
:root[data-theme="dark"] .cl-choice input:checked + .cl-choice__body { border-color: var(--pink, var(--ink)); box-shadow: inset 0 0 0 1px var(--pink, var(--ink)); }
.cl-choice input:focus-visible + .cl-choice__body { outline: 3px solid var(--burgundy, var(--ink)); outline-offset: 2px; }
.cl-choice input:disabled + .cl-choice__body { opacity: 0.5; cursor: not-allowed; }
.cl-choice--resting .cl-choice__body span, .cl-choice--ongoing .cl-choice__body span { font-style: italic; }
.cl-choices--list { max-height: min(42vh, 360px); overflow: auto; padding: 2px; overscroll-behavior: contain; }
.cl-preview { font-weight: 600; font-size: var(--fs-sm, 0.9rem); line-height: 1.45; }
.cl-preview:empty { display: none; }
.cl-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-xs, 0.8rem); color: var(--ink-2); }
.cl-presets .plan-btn { min-height: 32px; font-size: var(--fs-xs, 0.8rem); }
.cl-now { font-weight: 600; }
.cl-override { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm, 0.9rem); line-height: 1.45; }
.cl-override[hidden] { display: none; }
.cl-override input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

/* Draw */
.cl-draw { display: grid; gap: 14px; min-height: 120px; }
.cl-draw__card { display: grid; gap: 6px; padding: 18px; border-radius: var(--radius-sm, 14px); border: 1px solid var(--line);
  background: color-mix(in srgb, rgb(var(--pink-rgb, 235 200 205)) 16%, var(--surface)); animation: clIn var(--dur-3, 320ms) var(--ease-out, ease-out) both; }
.cl-draw__title { font-family: var(--font-display); font-size: var(--fs-xl, 1.35rem); line-height: 1.25; }
.cl-draw__desc { line-height: 1.5; overflow-wrap: anywhere; }
.cl-draw__note { font-size: var(--fs-sm, 0.9rem); color: var(--ink-2); line-height: 1.45; }
.cl-draw__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cl-draw__empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 10px; }
.cl-draw__empty .icon { width: 26px; height: 26px; }
.cl-draw__loading { color: var(--ink-2); }
.cl-bonus { justify-content: stretch; }
.cl-bonus .btn { flex: 1 1 220px; }
@media (prefers-reduced-motion: reduce) { .cl-prompt, .cl-draw__card { animation: none; } }

/* ---------- Add to Calendar tab ------------------------------------------ */
:root:not([data-admin]) .entry-type__card--cleaning { display: none; }
.cl-add { display: grid; gap: 14px; min-width: 0; }
.cl-add[hidden] { display: none; }
.cl-add__intro { font-size: var(--fs-sm, 0.9rem); color: var(--ink-2); line-height: 1.5; }
.cl-add__pane, .cl-add__detail { display: grid; gap: 12px; min-width: 0; }
.cl-add__bar { display: flex; align-items: center; gap: 8px; }
.cl-seg { min-width: 0; }

/* ---------- Plan a Trip card --------------------------------------------- */
.cl-tripcard { display: grid; gap: 12px; padding: 18px 20px; margin-top: 16px; }
.cl-tripcard[hidden] { display: none; }
.cl-tripcard > .cl-prompt { margin: -4px; }
.cl-tripcard__head { display: flex; align-items: flex-start; gap: 12px; }
.cl-tripcard__title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg, 1.15rem); line-height: 1.3; }
.cl-tripcard__text { margin-top: 2px; font-size: var(--fs-sm, 0.9rem); color: var(--ink-2); line-height: 1.5; }
.cl-tripcard__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* ---------- Calendar marks ------------------------------------------------ */
.cal-page {
  --jd-ico-cl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 3.5 20.5 9.5M17.5 6.5 11 13'/%3E%3Cpath d='M11 13c-2.6-.6-5.2.6-6.3 3.3L3.5 20.5l4.2-1.2c2.7-1.1 3.9-3.7 3.3-6.3Z'/%3E%3C/svg%3E");
  --jd-ico-cl-paused: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M10 9v6M14 9v6'/%3E%3C/svg%3E");
}
.cal-page .mark--cl { --jd-ico: var(--jd-ico-cl); }
.cal-page .mark--cl-paused { --jd-ico: var(--jd-ico-cl-paused); opacity: 0.7; }
.cl-card--cal { margin-top: var(--space-4, 16px); }
.cl-card--cal .card__head { margin-bottom: 0; }
/* Phase 44.7: the Calendar section folds like the other Calendar sections (.cal-acc). */
.cl-card--cal.cal-acc { gap: 0; padding: clamp(14px, 2vw, 22px); }
.cl-card--cal .card__title { font-size: var(--fs-lg); }
.cl-card--cal .cal-acc__toggle { min-height: 44px; }                       /* ≥ 44 px tap target */
.cl-card--cal .cal-acc__text .card__eyebrow { margin-bottom: 4px; }
.cl-card--cal .cal-acc__body { margin-top: var(--space-4, 16px); }
.cl-card--cal .cal-acc__body[hidden] { display: none; }
.cl-card--cal .cal-acc__count { white-space: nowrap; }
@media (max-width: 519px) {
  .cl-card--cal .cal-acc__toggle { display: flex; }
}
