/* v0.36 (owner 2026-10-13): activity tiles "Ko šodien darīsi?", the activity card, the entry hints and the pulse rule
   in the week plan and the Garmin preview. Colour marks the WHO category; the category is also written in text. */
:root { --act-aerobic: var(--blue); --act-muscle: #c2410c; --act-flex: var(--teal); --act-warn-ink: #8a4b00; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --act-muscle: #f59e5b; --act-warn-ink: #f3c77a; }
}
:root[data-theme="dark"] { --act-muscle: #f59e5b; --act-warn-ink: #f3c77a; }

.act36-cat-aerobic { --act-c: var(--act-aerobic); }
.act36-cat-muscle { --act-c: var(--act-muscle); }
.act36-cat-flexibility { --act-c: var(--act-flex); }

/* ---------- tiles ---------- */
.act36 > header { padding-bottom: 8px; }
.act36-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.daily-view .act36-tile { display: grid; justify-items: center; align-content: center; gap: 4px; width: 100%; height: 100%; min-height: 96px;
  padding: 10px 4px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  white-space: normal; text-align: center; line-height: 1.2; }
.act36-tile:hover { border-color: var(--act-c); background: color-mix(in srgb, var(--act-c) 6%, var(--surface)); }
.act36-tile:focus-visible { outline: 2px solid var(--focus, var(--blue)); outline-offset: 2px; }
.act36-tile.is-open { border-color: var(--act-c); border-width: 2px; padding: 9px 3px 7px; background: color-mix(in srgb, var(--act-c) 10%, var(--surface)); }
.act36-ico { display: block; width: 40px; height: 40px; color: var(--act-c); }
.act36-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; hyphens: auto; }
.act36-cat { font-size: 11.5px; color: var(--ink-2); }
.act36-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; color: var(--ink-2); }
.act36-key { display: inline-flex; align-items: center; gap: 6px; }
.act36-key > span { width: 10px; height: 10px; border-radius: 50%; background: var(--act-c); flex: 0 0 10px; }

/* ---------- card ---------- */
.act36-card { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line-strong); border-left: 4px solid var(--act-c, var(--line-strong));
  border-radius: 14px; background: var(--surface); }
.act36-card:focus { outline: none; }
.act36-card-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.act36-card-ico { display: block; width: 48px; height: 48px; color: var(--act-c); }
.act36-card-cat { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--act-c); text-transform: uppercase; letter-spacing: .03em; }
.act36-card-head h3 { margin: 2px 0 0; }
.act36-card-head h3:focus { outline: none; }
.act36-card-head h3:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.act36-card-head .dt-close { position: static; transform: none; width: 44px; height: 44px; min-width: 44px; font-size: 18px; }
.act36-counts { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--act-c) 8%, var(--surface)); }
.act36-card h4 { margin: 12px 0 4px; }
.act36-start { margin: 0; padding-left: 20px; }
.act36-start li { margin-block: 5px; line-height: 1.5; }
.act36-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.daily-view .act36-actions button { height: auto; min-height: 44px; padding: 8px 14px; font-size: 14px; white-space: normal; text-align: left; }

/* ---------- entry form, history ---------- */
.act36-select { display: flex; align-items: center; gap: 8px; }
.act36-select-ico { display: inline-flex; width: 28px; height: 28px; flex: 0 0 28px; margin-top: 6px; color: var(--blue); }
.act36-select select { flex: 1 1 auto; }
.act36-hint { margin: 10px 0 0; }
.act36-hint:empty { display: none; }
.act36-hint.is-warn, .aw-intensity-hint.is-warn { color: var(--act-warn-ink); background: var(--suspected-light); border-left: 3px solid var(--suspected); padding: 6px 10px; border-radius: 0 8px 8px 0; }
.act36-confirm { margin-top: 6px; }
.act36-hist-type { display: inline-flex; align-items: center; gap: 6px; }
.act36-hist-type .aw-ico { width: 20px; height: 20px; flex-basis: 20px; }
.act36-count { display: block; font-size: 12px; color: var(--verified); }
.act36-count.is-off { color: var(--ink-2); }
.act36-count.is-warn { color: var(--act-warn-ink); font-weight: 600; }
.aw-not-counted { color: var(--act-warn-ink); font-weight: 600; }
.aw-not-counted-quiet { color: var(--ink-2); }
/* Category colour on activity icons (the logged rows stay muted on purpose). */
.aw-ico.act36-cat-aerobic, .aw-ico.act36-cat-muscle, .aw-ico.act36-cat-flexibility { color: var(--act-c); }
.aw-logged .aw-ico.act36-cat-aerobic, .aw-logged .aw-ico.act36-cat-muscle, .aw-logged .aw-ico.act36-cat-flexibility { color: color-mix(in srgb, var(--act-c) 65%, var(--ink-muted)); }
/* v0.34 made every label in the plan form a grid; the "Jau izdarīts" tick stays on one line. */
.aw-form label.daily-check { display: flex; align-items: center; }
.aw-not-counted-note { border-inline-start-color: var(--suspected); }

/* ---------- Garmin preview ---------- */
.gi-type-name { display: inline-flex; align-items: center; gap: 6px; }
.gi-type-name .aw-ico { width: 20px; height: 20px; flex-basis: 20px; }
.gi-why { display: block; max-width: 260px; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--ink-2); }
.gi-confirm { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; cursor: pointer; }
.gi-count { display: block; margin-top: 2px; font-size: 12px; color: var(--verified); }
.gi-count.is-off { color: var(--ink-2); }
.gi-count.is-warn { color: var(--act-warn-ink); font-weight: 600; }

@media (max-width: 1100px) { .act36-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .act36-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .daily-view .act36-tile { min-height: 88px; }
  .act36-name { font-size: 13px; }
  .act36-card { padding: 12px; }
  .act36-card-head { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; }
  .act36-card-ico { width: 40px; height: 40px; }
  .daily-view .act36-actions button { flex: 1 1 100%; justify-content: center; text-align: center; }
  .gi-why { max-width: none; }
}
