/* calendario: estilos do módulo (arquivo próprio para não conflitar com app.css) */

/* ---------- pill de dono (Y / V / Y+V) ----------
   --oc é a cor do dono; o texto é escurecido/clareado por color-mix para ter contraste nos dois temas. */
.cal-own-pill { background: color-mix(in srgb, var(--oc) 18%, transparent) !important; color: color-mix(in srgb, var(--oc) 62%, var(--label)) !important; font-weight: 700; letter-spacing: .2px; }
:root[data-theme="dark"] .cal-own-pill { color: color-mix(in srgb, var(--oc) 80%, #fff) !important; }
.cal-own-pill .dot { width: 6px; height: 6px; border-radius: 3px; background: var(--oc); display: inline-block; }
.cal-own-pill.sm { height: 18px; padding: 0 6px; font-size: 10.5px; border-radius: 9px; gap: 4px; }
.cal-own-pill.sm .dot { width: 5px; height: 5px; }
.cal-wev .cal-own-pill.sm { flex: none; }

/* Filtro de dono (acima dos chips de pilar) */
.cal-own-filter { display: flex; flex-direction: column; gap: 10px; }
.cal-own-filter .segmented button .dot { width: 7px; height: 7px; border-radius: 4px; display: inline-block; }
@media (min-width: 900px) { .cal-own-filter { flex-direction: row; align-items: center; gap: 14px; } .cal-own-filter .segmented.full { width: 320px; flex: none; } }

/* Botão do dia na semana (abre o resumo quando o dia tem itens) */
.cal-day-btn { display: inline-flex; align-items: center; gap: 8px; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; padding: 2px 6px 2px 2px; margin: -2px 0 -2px -2px; border-radius: 16px; transition: background .15s; min-height: 32px; }
.cal-day-btn:active { background: var(--fill3); }
@media (hover: hover) { .cal-day-btn.has:hover { background: var(--fill3); } }
.cal-day-btn .cal-day-cnt { font-size: 11px; font-weight: 700; color: var(--label2); background: var(--fill2); border-radius: 9px; padding: 1px 6px; letter-spacing: 0; text-transform: none; }

/* ---------- resumo do dia (sheet) ---------- */
.cal-day-wrap { display: flex; flex-direction: column; gap: 16px; padding-top: 2px; }
.cal-day-sum { display: flex; flex-direction: column; gap: 8px; }
.cal-day-count { font-size: 15px; font-weight: 600; color: var(--label); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.cal-day-count .sep { color: var(--label3); }
.cal-day-count .y { color: var(--tint-text); }
.cal-day-count .v { color: var(--blue-text); }
.cal-day-done { font-size: 13px; color: var(--label2); display: flex; align-items: center; gap: 10px; }
.cal-day-done .cal-chk-bar { flex: 1; }

.cal-day-sec { display: flex; flex-direction: column; gap: 10px; }
.cal-day-sech { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--oc-text, var(--label2)); padding: 0 2px; }
.cal-day-sech .dot { width: 10px; height: 10px; border-radius: 5px; background: var(--oc); flex: none; }
.cal-day-sech .n { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--label2); background: var(--fill2); border-radius: 10px; padding: 1px 8px; text-transform: none; letter-spacing: 0; }
.cal-day-sec.yallon { --oc: var(--tint); --oc-text: var(--tint-text); }
.cal-day-sec.vucko { --oc: var(--blue); --oc-text: var(--blue-text); }
.cal-day-empty { font-size: 14px; color: var(--label3); padding: 6px 4px 2px; }

/* Card de item dentro da seção: borda esquerda na cor do dono da seção */
.cal-day-card { background: var(--bg-elev2); border-radius: var(--r); padding: 12px 12px 10px; border-left: 3px solid var(--oc); display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-1); }
:root[data-theme="dark"] .cal-day-card { background: var(--bg-elev2); }
.cal-day-cardh { display: flex; align-items: flex-start; gap: 10px; }
.cal-day-cardh .ttl { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.cal-day-cardh .cal-chk-prog { flex: none; }
.cal-day-time { font-size: 13px; color: var(--label2); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
.cal-day-with { font-size: 12.5px; color: var(--label2); font-style: italic; }
.cal-day-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cal-day-acts { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.cal-day-acts .btn.xs { background: var(--fill2); color: var(--label); }
.cal-day-acts .btn.xs.tinted { background: var(--tint-soft); color: var(--tint-text); }
.cal-day-nochk { font-size: 13px; color: var(--label3); }

/* ---------- checklist ---------- */
.cal-chk-prog { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--label2); background: var(--fill2); border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.cal-chk-prog.full { background: rgba(52,199,89,.16); color: var(--green-text); }
.cal-chk-bar { height: 3px; border-radius: 2px; background: var(--fill2); overflow: hidden; }
.cal-chk-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--oc, var(--tint)); transition: width .35s var(--ease); }
.cal-chk-bar.ok > span { background: var(--green); }

.cal-chk { display: flex; flex-direction: column; margin: 0 -4px; }
.cal-chk-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 6px; border-radius: 10px; text-align: left; color: var(--label); font-size: 15px; line-height: 1.3; transition: background .15s, transform .2s var(--spring); }
.cal-chk-row:active { background: var(--fill3); transform: scale(.995); }
@media (hover: hover) { .cal-chk-row:hover { background: var(--fill3); } }
.cal-chk-row + .cal-chk-row { position: relative; }
.cal-chk-row + .cal-chk-row::before { content: ""; position: absolute; left: 40px; right: 6px; top: 0; height: 1px; background: var(--sep); opacity: .6; }
.cal-chk-ic { flex: none; width: 24px; height: 24px; display: grid; place-items: center; color: var(--label3); transition: color .15s, transform .2s var(--spring); }
.cal-chk-ic .ic { width: 22px; height: 22px; }
.cal-chk-row[aria-pressed="true"] .cal-chk-ic { color: var(--oc, var(--green)); transform: scale(1.05); }
.cal-chk-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; transition: color .15s; }
.cal-chk-row[aria-pressed="true"] .cal-chk-txt { text-decoration: line-through; text-decoration-color: var(--label3); color: var(--label2); }
.cal-chk-own { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--oc-text, var(--label2)); }
.cal-chk-row.yallon { --oc: var(--tint); --oc-text: var(--tint-text); }
.cal-chk-row.vucko { --oc: var(--blue); --oc-text: var(--blue-text); }
.cal-chk-row[disabled] { opacity: .55; pointer-events: none; }

/* Checklist no detalhe: em cartão próprio */
.cal-chk-card { background: var(--bg-elev2); border-radius: var(--r); padding: 10px 10px 6px; display: flex; flex-direction: column; gap: 6px; }
.cal-chk-cardh { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-size: 13px; font-weight: 600; color: var(--label2); text-transform: uppercase; letter-spacing: .4px; }
.cal-chk-cardh .cal-chk-prog { margin-left: auto; }

/* ---------- editor da checklist (formulário) ---------- */
.cal-chk-edit { display: flex; flex-direction: column; gap: 8px; }
.cal-chk-erow { display: grid; grid-template-columns: 92px minmax(0, 1fr) 36px; gap: 6px; align-items: center; }
.cal-chk-erow .select { padding-right: 24px; font-size: 14px; }
.cal-chk-erow .input { font-size: 15px; }
.cal-chk-erow .input.done { text-decoration: line-through; color: var(--label2); }
.cal-chk-erow .icon-btn { width: 36px; height: 36px; color: var(--red); }
.cal-chk-erow .icon-btn .ic { width: 18px; height: 18px; }
.cal-chk-eadd { align-self: flex-start; }
.cal-chk-ehint { font-size: 12.5px; color: var(--label3); }
