/* Extra styles for the health + everyday tools (namespace "life"). Uses the site's CSS variables. */

/* editable rows: GPA, grades, appliances */
.life-rows { display: grid; gap: 10px; margin-bottom: 12px; }
.life-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end;
  padding: 10px; border: 1px solid var(--line, #e3e6ee); border-radius: var(--radius, 12px); background: var(--soft, #f6f7fb); }
.life-cell { display: grid; gap: 4px; min-width: 0; flex: 1 1 84px; font-size: 0.8rem; color: var(--muted, #667085); }
.life-cell-text { flex: 2 1 160px; }
.life-cell input, .life-cell select { width: 100%; min-width: 0; box-sizing: border-box; padding: 9px 10px; font: inherit; font-size: 1rem; color: var(--ink, #111);
  background: var(--bg, #fff); border: 1px solid var(--line, #d5d9e3); border-radius: 8px; }
.life-row-x { flex: 0 0 38px; width: 38px; height: 38px; border: 1px solid var(--line, #d5d9e3); border-radius: 8px; background: var(--bg, #fff); color: var(--muted, #667085);
  font-size: 1.3rem; line-height: 1; cursor: pointer; }
.life-row-x:hover { color: var(--err, #c0392b); border-color: var(--err, #c0392b); }
@media (max-width: 560px) {
  .life-row .life-cell-text { flex-basis: 100%; }
}

/* big centred result (coin, dice, yes/no, wheel winner, love score) */
.life-big { text-align: center; padding: 18px 8px; }
.life-big b { display: block; font-size: clamp(2rem, 9vw, 3.4rem); line-height: 1.1; color: var(--brand, #4f46e5); word-break: break-word; }
.life-big span { display: block; margin-top: 6px; color: var(--muted, #667085); }

.life-coin { width: 120px; height: 120px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 2.6rem;
  color: #6b4e00; background: radial-gradient(circle at 35% 30%, #ffe89a, #f1b90c 70%); border: 4px solid #d29d00; box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  animation: life-flip .6s ease-out; }
.life-coin.tails { color: #44505f; background: radial-gradient(circle at 35% 30%, #f4f6f9, #b9c1cd 70%); border-color: #98a2b0; }
@keyframes life-flip { from { transform: rotateY(900deg) scale(.6); } to { transform: rotateY(0) scale(1); } }
@keyframes life-pop { from { transform: scale(.6) rotate(-12deg); opacity: .2; } to { transform: none; opacity: 1; } }

.life-dice { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 12px; }
.life-die { min-width: 46px; height: 46px; padding: 0 8px; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; color: var(--ink, #111);
  background: var(--bg, #fff); border: 2px solid var(--brand, #4f46e5); border-radius: 10px; animation: life-pop .35s ease-out; }
.life-die.max { background: var(--brand, #4f46e5); color: #fff; }

/* spin the wheel */
.life-wheel { display: grid; justify-items: center; gap: 12px; }
.life-wheel canvas { width: min(100%, 360px); height: auto; aspect-ratio: 1; touch-action: manipulation; cursor: pointer; }

/* QR codes */
.life-qr { display: grid; justify-items: center; margin: 4px 0 12px; }
.life-qr canvas { width: min(100%, 300px); height: auto; image-rendering: pixelated; border: 1px solid var(--line, #e3e6ee); border-radius: 8px; }

/* password strength meter */
.life-meter { height: 10px; border-radius: 6px; background: var(--line, #e3e6ee); overflow: hidden; margin: 10px 0; }
.life-meter i { display: block; height: 100%; border-radius: 6px; background: var(--err, #c0392b); transition: width .2s; }
.life-meter i.s2 { background: var(--warn, #d98a00); }
.life-meter i.s3, .life-meter i.s4 { background: var(--ok, #1e9e5a); }
.life-checks { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.life-checks li { padding-left: 1.5em; position: relative; }
.life-checks li::before { position: absolute; left: 0; font-weight: 700; }
.life-checks li.ok::before { content: "\2713"; color: var(--ok, #1e9e5a); }
.life-checks li.bad::before { content: "\2717"; color: var(--err, #c0392b); }

/* typing test */
.life-type-text { max-height: 9.5em; overflow: auto; padding: 12px 14px; margin: 12px 0; font-size: 1.1rem; line-height: 1.7; border: 1px solid var(--line, #e3e6ee);
  border-radius: var(--radius, 12px); background: var(--soft, #f6f7fb); color: var(--muted, #667085); user-select: none; -webkit-user-select: none; }
.life-type-text .ok { color: var(--ok, #1e9e5a); }
.life-type-text .bad { color: #fff; background: var(--err, #c0392b); border-radius: 2px; }
.life-type-text .cur { color: var(--ink, #111); border-bottom: 2px solid var(--brand, #4f46e5); }
.life-type-in { width: 100%; box-sizing: border-box; padding: 12px; font: inherit; font-size: 1.05rem; color: var(--ink, #111); background: var(--bg, #fff);
  border: 1px solid var(--line, #d5d9e3); border-radius: var(--radius, 12px); resize: vertical; }

/* pomodoro */
.life-pomo { text-align: center; padding: 6px 0 2px; }
.life-pomo-phase { font-weight: 600; color: var(--muted, #667085); letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; }
.life-pomo-time { font-size: clamp(3rem, 16vw, 5.5rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink, #111); }
.life-pomo.is-break .life-pomo-time { color: var(--ok, #1e9e5a); }
.life-pomo .tool-actions { justify-content: center; }
.life-pomo-count { color: var(--muted, #667085); margin-top: 8px; }
