/* =========================================================================
   Christmas Checklist — scoped styles (loaded only on the checklist page).
   Reuses the theme CSS custom properties (--hmtc-*).
   ========================================================================= */

/* ---- Shared primitives ---- */
.hmtcb-btn { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer; line-height: 1.1; transition: background .15s ease, transform .12s ease; }
.hmtcb-btn:hover { transform: translateY(-1px); }
.hmtcb-btn--primary { background: var(--hmtc-red); color: #fff; }
.hmtcb-btn--primary:hover { background: #a81f1f; }
.hmtcb-btn--ghost { background: #eef2f9; color: var(--hmtc-deep-blue); }
.hmtcb-btn--ghost:hover { background: #e0e8f5; }
.hmtcb-btn--danger { background: #fdecec; color: #a81f1f; }
.hmtcb-btn--tiny { padding: 5px 11px; font-size: .82rem; }
.hmtcb-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.hmtcb-req { color: var(--hmtc-red); }

.hmtcb-save-status { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--hmtc-muted); }
.hmtcb-save-status__dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa7bd; }
.hmtcb-save-status[data-state="saving"] .hmtcb-save-status__dot { background: var(--hmtc-gold); }
.hmtcb-save-status[data-state="saved"] .hmtcb-save-status__dot { background: #2e9e5b; }
.hmtcb-save-status[data-state="error"] .hmtcb-save-status__dot { background: var(--hmtc-red); }

.hmtc-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.hmtc-field label { font-weight: 600; font-size: .9rem; color: var(--hmtc-deep-blue); }
.hmtc-field input, .hmtc-field textarea, .hmtc-field select { font: inherit; padding: 9px 11px; border: 1.5px solid #d3dcea; border-radius: 10px; background: #fff; color: var(--hmtc-ink); width: 100%; }
.hmtc-field--inline { margin-bottom: 0; }
.hmtc-field input:focus, .hmtc-field textarea:focus, .hmtc-field select:focus { outline: 3px solid var(--hmtc-gold); outline-offset: 1px; }

.hmtcb-dialog { border: 0; border-radius: 16px; padding: 0; max-width: 560px; width: calc(100% - 28px); box-shadow: 0 22px 60px rgba(11,30,63,.3); }
.hmtcb-dialog--wide, .hmtc-cl-dialog--wide { max-width: 760px; }
.hmtcb-dialog::backdrop { background: rgba(11,30,63,.45); }
.hmtcb-dialog__form { padding: 22px; max-height: 88vh; overflow-y: auto; }
.hmtcb-dialog__title { margin: 0 0 10px; color: var(--hmtc-deep-blue); }
.hmtcb-dialog__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }

.hmtcb-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--hmtc-deep-blue); color: #fff; border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; box-shadow: var(--hmtc-shadow); z-index: 100; max-width: calc(100% - 24px); }
.hmtcb-toast__undo { background: var(--hmtc-gold); color: var(--hmtc-deep-blue); border: 0; border-radius: 999px; padding: 6px 14px; font-weight: 800; cursor: pointer; }

:focus-visible { outline: 3px solid var(--hmtc-gold); outline-offset: 2px; }

/* ---- Layout shell ---- */
.hmtc-cl { padding: 8px 0 24px; }
.hmtc-cl-h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); color: var(--hmtc-deep-blue); margin-bottom: .5rem; }
.hmtc-cl-h3 { font-size: 1.05rem; color: var(--hmtc-deep-blue); margin: 0; }
.hmtc-cl-dash, .hmtc-cl-toolbar, .hmtc-cl-filters, .hmtc-cl-cta { background: #fff; border: 1px solid rgba(11,30,63,.07); border-radius: var(--hmtc-radius); box-shadow: var(--hmtc-shadow-sm); padding: 20px; margin: 18px auto; }

/* ---- Header ---- */
.hmtc-cl-header { text-align: center; position: relative; padding: 26px 20px 6px; }
.hmtc-cl-header__deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hmtc-cl-snip { position: absolute; font-size: 1.4rem; opacity: .5; animation: hmtc-cl-float 7s ease-in-out infinite; }
.hmtc-cl-snip--1 { left: 8%; top: 12px; } .hmtc-cl-snip--2 { right: 10%; top: 6px; animation-delay: 1.6s; } .hmtc-cl-snip--3 { left: 22%; top: 46px; animation-delay: 3s; }
@keyframes hmtc-cl-float { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(6deg); } }
.hmtc-cl-title { font-size: clamp(1.9rem, 5vw, 2.9rem); color: var(--hmtc-deep-blue); margin: 0 0 .3rem; }
.hmtc-cl-intro { max-width: 720px; margin: 0 auto 1rem; color: var(--hmtc-ink); }
.hmtc-cl-statusline { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-bottom: 12px; }
.hmtc-cl-chip { background: #eef4fc; border: 1px solid #dbe6f5; color: var(--hmtc-deep-blue); border-radius: 999px; padding: 6px 14px; font-size: .88rem; font-weight: 600; }
.hmtc-cl-chip--accent { background: var(--hmtc-red); color: #fff; border-color: var(--hmtc-red); }
.hmtc-cl-year-wrap { display: inline-flex; gap: 6px; align-items: center; }
.hmtc-cl-year { padding: 6px 10px; border-radius: 999px; border: 1.5px solid #d3dcea; font: inherit; }
.hmtc-cl-privacy { max-width: 720px; margin: 0 auto; background: #eef7ef; border: 1px solid #cfe6d3; color: #1c4c2f; border-radius: 12px; padding: 10px 14px; font-size: .88rem; }
.hmtc-cl-noscript { background: #fff3cd; border: 1px solid #ffe08a; padding: 10px 14px; border-radius: 10px; margin: 12px auto; max-width: 720px; }

/* ---- Dashboard ---- */
.hmtc-cl-celebrate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: linear-gradient(135deg, var(--hmtc-green), #14432e); color: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.hmtc-cl-celebrate__icon { font-size: 1.8rem; }
.hmtc-cl-celebrate strong { display: block; font-size: 1.1rem; }
.hmtc-cl-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.hmtc-cl-stat { background: #f7faff; border: 1px solid #e2e9f4; border-radius: 12px; padding: 12px 8px; text-align: center; }
.hmtc-cl-stat__v { display: block; font-size: 1.5rem; font-weight: 900; color: var(--hmtc-deep-blue); }
.hmtc-cl-stat__l { font-size: .74rem; color: var(--hmtc-muted); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.hmtc-cl-progress-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 16px 0 4px; font-weight: 600; color: var(--hmtc-deep-blue); }
.hmtc-cl-progress-sub { color: var(--hmtc-muted); font-weight: 500; font-size: .86rem; }
.hmtc-cl-bar { height: 18px; background: #e7edf6; border-radius: 999px; overflow: hidden; }
.hmtc-cl-bar__fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--hmtc-green), #2e9e5b); transition: width .5s ease; }
.hmtc-cl-panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.hmtc-cl-panel { background: #f7faff; border: 1px solid #e2e9f4; border-radius: 12px; padding: 14px; }
.hmtc-cl-panel__title { margin: 0 0 8px; font-size: 1rem; color: var(--hmtc-deep-blue); }
.hmtc-cl-reminders, .hmtc-cl-insights, .hmtc-cl-focus { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hmtc-cl-reminder { font-size: .9rem; padding: 6px 10px; border-radius: 8px; background: #eef2f9; }
.hmtc-cl-reminder.is-danger { background: #fdecec; color: #8a2a2a; font-weight: 600; }
.hmtc-cl-reminder.is-warn { background: #fff6e6; color: #7a5a10; font-weight: 600; }
.hmtc-cl-reminder.is-ok { background: #eef7ef; color: #1c4c2f; }
.hmtc-cl-insight { font-size: .88rem; color: var(--hmtc-ink); padding: 6px 10px; border-left: 3px solid var(--hmtc-gold); background: #fff8ec; border-radius: 6px; }
.hmtc-cl-focus__btn { width: 100%; text-align: left; background: #fff; border: 1px solid #e2e9f4; border-radius: 8px; padding: 8px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.hmtc-cl-focus__btn:hover { background: #f2f6fc; }
.hmtc-cl-focus__meta { color: var(--hmtc-muted); font-size: .78rem; white-space: nowrap; }
.hmtc-cl-focus__empty { font-size: .88rem; color: var(--hmtc-muted); }

/* ---- Toolbar ---- */
.hmtc-cl-quickadd { display: flex; gap: 8px; flex-wrap: wrap; }
.hmtc-cl-quickadd__input { flex: 1 1 260px; min-width: 0; padding: 11px 14px; border: 1.5px solid #d3dcea; border-radius: 999px; font: inherit; }
.hmtc-cl-toolrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.hmtc-cl-timefilter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.hmtc-cl-timefilter__label { font-size: .85rem; color: var(--hmtc-muted); font-weight: 600; margin-right: 4px; }
.hmtc-cl-timebtn { font: inherit; font-size: .82rem; border: 1.5px solid #d3dcea; background: #fff; color: var(--hmtc-deep-blue); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.hmtc-cl-timebtn.is-active { background: var(--hmtc-deep-blue); color: #fff; border-color: var(--hmtc-deep-blue); }

/* ---- Filters ---- */
.hmtc-cl-filters__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hmtc-cl-search { flex: 1 1 220px; }
.hmtc-cl-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--hmtc-ink); }
.hmtc-cl-bulkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding: 10px; background: #f2f6fc; border-radius: 10px; }
.hmtc-cl-bulkbar__count { font-weight: 700; color: var(--hmtc-deep-blue); }

/* ---- Workspace ---- */
.hmtc-cl-workspace { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; margin-top: 4px; }
.hmtc-cl-sidebar { background: #fff; border: 1px solid rgba(11,30,63,.07); border-radius: var(--hmtc-radius); box-shadow: var(--hmtc-shadow-sm); padding: 16px; position: sticky; top: 16px; }
.hmtc-cl-sidebar__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hmtc-cl-sidebar__toggle { display: none; }
.hmtc-cl-catnav { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 3px; max-height: 60vh; overflow-y: auto; }
.hmtc-cl-catnav__item { display: flex; align-items: center; border-radius: 8px; }
.hmtc-cl-catnav__item.is-active { background: #eef4fc; }
.hmtc-cl-catnav__btn { flex: 1; text-align: left; background: none; border: 0; cursor: pointer; padding: 8px 10px; font: inherit; color: var(--hmtc-ink); display: flex; justify-content: space-between; gap: 8px; align-items: center; border-radius: 8px; }
.hmtc-cl-catnav__btn:hover { background: #f2f6fc; }
.hmtc-cl-catnav__count { font-size: .78rem; color: var(--hmtc-muted); background: #eef2f9; padding: 1px 8px; border-radius: 999px; }
.hmtc-cl-catnav__actions { display: flex; gap: 2px; opacity: 0; transition: opacity .12s ease; }
.hmtc-cl-catnav__item:hover .hmtc-cl-catnav__actions, .hmtc-cl-catnav__item:focus-within .hmtc-cl-catnav__actions { opacity: 1; }
.hmtc-cl-iconbtn { border: 0; background: transparent; cursor: pointer; width: 28px; height: 28px; border-radius: 6px; font-size: .85rem; line-height: 1; color: var(--hmtc-deep-blue); }
.hmtc-cl-iconbtn:hover { background: #e0e8f5; }
.hmtc-cl-iconbtn:disabled { opacity: .3; cursor: not-allowed; }
.hmtc-cl-addcat { display: flex; gap: 6px; }
.hmtc-cl-addcat input { flex: 1; padding: 8px 10px; border: 1.5px solid #d3dcea; border-radius: 8px; font: inherit; }

/* ---- Task groups + items ---- */
.hmtc-cl-main { min-width: 0; }
.hmtc-cl-group { background: #fff; border: 1px solid rgba(11,30,63,.07); border-radius: var(--hmtc-radius); box-shadow: var(--hmtc-shadow-sm); margin-bottom: 14px; overflow: hidden; }
.hmtc-cl-group__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: #f7faff; border-bottom: 1px solid #eef2f7; }
.hmtc-cl-group__collapse { flex: 1; display: flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; color: var(--hmtc-deep-blue); text-align: left; }
.hmtc-cl-group__count { font-size: .8rem; color: var(--hmtc-muted); background: #eef2f9; padding: 1px 8px; border-radius: 999px; }
.hmtc-cl-group__done { color: #1c7a44; font-weight: 700; font-size: .82rem; }
.hmtc-cl-tasklist { list-style: none; margin: 0; padding: 0; }
.hmtc-cl-task { border-bottom: 1px solid #eef2f7; }
.hmtc-cl-task:last-child { border-bottom: 0; }
.hmtc-cl-task__row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; }
.hmtc-cl-task__select { margin-top: 4px; width: 18px; height: 18px; }
.hmtc-cl-check { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c3cee0; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; transition: background .15s ease, border-color .15s ease; }
.hmtc-cl-check__mark { color: #fff; font-size: .9rem; opacity: 0; transform: scale(.4); transition: opacity .15s ease, transform .15s ease; }
.hmtc-cl-check.is-on { background: var(--hmtc-green); border-color: var(--hmtc-green); }
.hmtc-cl-check.is-on .hmtc-cl-check__mark { opacity: 1; transform: scale(1); }
.hmtc-cl-check--sm { width: 20px; height: 20px; }
.hmtc-cl-check.just-checked { animation: hmtc-cl-pop .35s ease; }
@keyframes hmtc-cl-pop { 0% { transform: scale(1); } 45% { transform: scale(1.25); } 100% { transform: scale(1); } }
.hmtc-cl-task__body { flex: 1; min-width: 0; }
.hmtc-cl-task__title { background: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; color: var(--hmtc-ink); text-align: left; padding: 0; }
.hmtc-cl-task.is-completed .hmtc-cl-task__title { color: var(--hmtc-muted); text-decoration: line-through; }
.hmtc-cl-task__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hmtc-cl-chip2 { font-size: .74rem; padding: 2px 8px; border-radius: 999px; background: #eef2f9; color: var(--hmtc-deep-blue); font-weight: 600; }
.hmtc-cl-chip2.due-over { background: #fdecec; color: #a81f1f; }
.hmtc-cl-chip2.due-today { background: #fff6e6; color: #7a5a10; }
.hmtc-cl-chip2.prio-high { background: #fdecec; color: #a81f1f; }
.hmtc-cl-task__actions { display: flex; gap: 2px; flex-wrap: wrap; align-items: flex-start; }
.hmtc-cl-subprog { display: inline-block; font-size: .76rem; color: var(--hmtc-muted); margin-top: 6px; }
.hmtc-cl-subs { list-style: none; margin: 6px 0 0; padding: 0 0 0 4px; border-left: 2px dashed #e2e9f4; display: grid; gap: 4px; }
.hmtc-cl-sub { display: flex; align-items: center; gap: 8px; padding: 2px 0 2px 8px; }
.hmtc-cl-sub__title { background: none; border: 0; cursor: pointer; font: inherit; font-size: .92rem; color: var(--hmtc-ink); text-align: left; padding: 0; flex: 1; }
.hmtc-cl-sub.is-completed .hmtc-cl-sub__title { color: var(--hmtc-muted); text-decoration: line-through; }

.hmtc-cl-empty { text-align: center; color: var(--hmtc-muted); padding: 28px; background: #fff; border: 1px dashed #d3dcea; border-radius: var(--hmtc-radius); }

/* ---- Dialog specifics ---- */
.hmtc-cl-formgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; }
.hmtc-cl-err { color: #b1160f; font-size: .82rem; font-weight: 600; }
.hmtc-cl-recur { border: 1px solid #e2e9f4; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.hmtc-cl-recur legend { font-weight: 700; font-size: .9rem; padding: 0 6px; }
.hmtc-cl-recur__hint { font-size: .78rem; color: var(--hmtc-muted); display: block; margin-top: 4px; }
.hmtc-cl-tpl-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.hmtc-cl-tpl { border: 1px solid #e2e9f4; border-radius: 12px; padding: 14px; background: #f7faff; }
.hmtc-cl-tpl__name { margin: 0 0 4px; color: var(--hmtc-deep-blue); font-size: 1rem; }
.hmtc-cl-tpl__desc { font-size: .84rem; color: var(--hmtc-muted); margin: 0 0 6px; }
.hmtc-cl-tpl__meta { font-size: .78rem; color: var(--hmtc-deep-blue); font-weight: 600; margin: 0 0 8px; }
.hmtc-cl-tpl__btns { display: flex; flex-wrap: wrap; gap: 6px; }
.hmtc-cl-tpl-preview { margin-top: 14px; border-top: 1px solid #e2e9f4; padding-top: 12px; }
.hmtc-cl-tpl-pv-group ul { margin: 2px 0 10px; padding-left: 20px; }
.hmtc-cl-reset-desc { font-size: .88rem; color: var(--hmtc-muted); }

/* ---- CTA + SEO ---- */
.hmtc-cl-cta__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.hmtc-cl-cta__card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; background: #f7faff; border: 1px solid #e2e9f4; border-radius: 14px; padding: 16px; transition: transform .15s ease, box-shadow .15s ease; }
.hmtc-cl-cta__card:hover { transform: translateY(-3px); box-shadow: var(--hmtc-shadow); }
.hmtc-cl-cta__icon { font-size: 1.6rem; }
.hmtc-cl-cta__title { font-weight: 800; color: var(--hmtc-deep-blue); }
.hmtc-cl-cta__desc { font-size: .86rem; color: var(--hmtc-muted); }
.hmtc-cl-seo { padding: 20px; }
.hmtc-cl-seo__block { margin-bottom: 26px; }
.hmtc-cl-seo__block h2 { color: var(--hmtc-deep-blue); }
.hmtc-cl-seo__cols { columns: 2; }
@media (max-width: 560px) { .hmtc-cl-seo__cols { columns: 1; } }

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.hmtc-cl-stats { grid-template-columns: repeat(3, 1fr); }
	.hmtc-cl-panels { grid-template-columns: 1fr; }
	.hmtc-cl-workspace { grid-template-columns: 1fr; }
	.hmtc-cl-sidebar { position: static; }
	.hmtc-cl-sidebar__toggle { display: inline-block; }
	.hmtc-cl-sidebar__body[hidden] { display: none; }
}
@media (max-width: 560px) {
	.hmtc-cl-formgrid { grid-template-columns: 1fr; }
	.hmtc-cl-dash, .hmtc-cl-toolbar, .hmtc-cl-filters, .hmtc-cl-cta { padding: 14px; }
	.hmtc-cl-task__actions { width: 100%; margin-top: 6px; }
}
@media (max-width: 420px) {
	.hmtc-cl-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
	.hmtc-cl-snip, .hmtc-cl-bar__fill, .hmtc-cl-check, .hmtc-cl-check__mark, .hmtc-cl-check.just-checked { animation: none !important; transition: none !important; }
}
.hmtc-cl-reduced .hmtc-cl-snip, .hmtc-cl-reduced .hmtc-cl-check.just-checked { animation: none !important; }

/* ---- Print (main printing uses a separate window) ---- */
@media print {
	.hmtc-header, .hmtc-footer, .hmtc-cl-toolbar, .hmtc-cl-filters, .hmtc-cl-sidebar, .hmtc-cl-cta, .hmtc-cl-header__deco, .hmtc-cl-task__actions, .hmtcb-toast { display: none !important; }
	.hmtc-cl-dash, .hmtc-cl-group { box-shadow: none !important; border: 1px solid #ccc !important; }
}
