/* The app's own styles, on top of the Ridderholt design system. */

/* ---- Sign-in */
.signin { gap: var(--space-5); }
.google-button { display: flex; align-items: center; justify-content: center; gap: var(--space-4); width: 100%; height: 44px; padding: 0 var(--space-5);
  border: 1px solid #747775; border-radius: var(--radius-2); background: #ffffff; color: #1f1f1f; font-weight: var(--weight-medium); }
.google-button:hover { background: #f2f2f2; text-decoration: none; }
.google-mark { flex: none; }
[data-theme="dark"] .google-button { background: #131314; border-color: #8e918f; color: #e3e3e3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .google-button { background: #131314; border-color: #8e918f; color: #e3e3e3; } }

/* ---- Admin */
form.inline { display: inline; }

/* ---- Connecting an assistant (mcpauth's consent page) */
.mcpauth-consent { display: grid; gap: var(--space-3); }
.mcpauth-consent dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); margin: 0; }
.mcpauth-consent dd { margin: 0; }
.mcpauth-note, .mcpauth-warning { padding: var(--space-3) var(--space-4); border-radius: var(--radius-2); font-size: var(--text-sm); }
.mcpauth-note { background: var(--surface-2); }
.mcpauth-warning { background: var(--warn-bg); color: var(--warn-fg); }
.mcpauth-consent form { display: flex; gap: var(--space-3); }
.mcpauth-consent button { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 var(--space-4);
  border: 1px solid var(--line-strong); border-radius: var(--radius-2); background: var(--surface); color: var(--text);
  font: inherit; font-weight: var(--weight-medium); cursor: pointer; }
.mcpauth-consent button:hover { background: var(--surface-2); }
.mcpauth-consent button[value="allow"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.mcpauth-consent button[value="allow"]:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ---- Tasks: everything below uses the design system's tokens only. */

/* Quick add */
.quick { display: flex; gap: var(--space-3); }
.quick .input { flex: 1; min-width: 0; height: 40px; font-size: var(--text-md); }
.quick .btn { height: 40px; }
.quick-hint { margin: calc(-1 * var(--space-2)) 0 0; }

/* The task rows */
.tasks { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-2); }
.task { display: flex; align-items: center; gap: var(--space-4); min-height: 48px; padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--line); box-shadow: inset 3px 0 0 transparent; }
.task:first-child { border-top: 0; }
.task.p1 { box-shadow: inset 3px 0 0 var(--down); }
.task.p2 { box-shadow: inset 3px 0 0 var(--near-fg); }
.task.p3 { box-shadow: inset 3px 0 0 var(--accent); }
.task-check { flex: none; display: flex; }
.task-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.task-title { color: var(--text); overflow-wrap: anywhere; }
.task-title:hover { color: var(--accent); }
.task.is-done .task-title, .task-h1.is-done { color: var(--text-3); text-decoration: line-through; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); color: var(--text-2); font-size: var(--text-xs); }
.task-meta .badge { margin-left: 0; }
.task-meta .when, .task-meta .deadline { font-weight: var(--weight-medium); }
.task-meta .late { color: var(--fail-fg); }
.task-meta .where { color: var(--text-2); }
.task-meta .where:hover { color: var(--accent); }
.task-meta .prio { font-weight: var(--weight-strong); }
.task.p1 .prio { color: var(--down); }
.task.p2 .prio { color: var(--near-fg); }
.task.p3 .prio { color: var(--accent); }
.tag { color: var(--accent); font-size: var(--text-xs); }
.icon { font-size: var(--text-xs); }
.task-today { flex: none; opacity: 0; transition: opacity var(--dur-2) var(--ease); }
.task:hover .task-today, .task:focus-within .task-today { opacity: 1; }
@media (hover: none) { .task-today { display: none; } }
.task-thumb { flex: none; display: block; width: 44px; height: 44px; border-radius: var(--radius-1); overflow: hidden; background: var(--surface-2); }
.task-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* The round check */
.tick { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
.tick svg { width: 14px; height: 14px; fill: none; stroke: var(--accent-fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.tick:hover { border-color: var(--accent); }
.tick:hover svg { opacity: .35; stroke: var(--accent); }
.tick.is-checked { background: var(--accent); border-color: var(--accent); }
.tick.is-checked svg { opacity: 1; stroke: var(--accent-fg); }
.task.p1 .tick { border-color: var(--down); }
.task.p2 .tick { border-color: var(--near-fg); }
.task-group + .task-group { margin-top: var(--space-5); }

/* Progress (projects, subtasks) */
progress.progress { appearance: none; width: 100%; max-width: 240px; height: 6px; border: 0; border-radius: var(--radius-pill);
  background: var(--surface-2); overflow: hidden; vertical-align: middle; }
progress.progress::-webkit-progress-bar { background: var(--surface-2); border-radius: var(--radius-pill); }
progress.progress::-webkit-progress-value { background: var(--up); border-radius: var(--radius-pill); }
progress.progress::-moz-progress-bar { background: var(--up); border-radius: var(--radius-pill); }
.progress-row { display: flex; align-items: center; gap: var(--space-4); margin: 0; }

/* Areas and projects */
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-4); }
.area-card { display: grid; gap: var(--space-3); align-content: start; box-shadow: inset 0 3px 0 var(--line-strong); }
.area-card.color-blue { box-shadow: inset 0 3px 0 var(--chart-1); }
.area-card.color-green { box-shadow: inset 0 3px 0 var(--up); }
.area-card.color-amber { box-shadow: inset 0 3px 0 var(--chart-2); }
.area-card.color-red { box-shadow: inset 0 3px 0 var(--down); }
.area-card.color-purple { box-shadow: inset 0 3px 0 #7c5cc4; }
.area-card.color-grey { box-shadow: inset 0 3px 0 var(--text-3); }
.area-name { font-size: var(--text-lg); font-weight: var(--weight-strong); color: var(--text); }
.project-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.project-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.project-list progress.progress { max-width: 90px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); }
.card a { display: grid; gap: var(--space-2); padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-2); color: var(--text); }
.card a:hover { border-color: var(--accent); text-decoration: none; }
.card-title { font-weight: var(--weight-medium); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: 0; }
.tag-cloud .tag { font-size: var(--text-sm); }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-sm); }

/* One task */
.task-form textarea { font-family: var(--font-sans); font-size: var(--text-base); }
.field-check { align-self: end; min-height: 32px; }
.pictures { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-3); }
.pictures li { display: grid; gap: var(--space-2); }
.pictures img { display: block; width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-2); background: var(--surface-2); }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }

@media (max-width: 560px) {
  .task { gap: var(--space-3); padding: var(--space-3); }
  .task-thumb { width: 40px; height: 40px; }
  .quick-hint { display: none; }
}
