/* Math & Date tools: loaded on every tool page of the category (see app/views/pages/tool.php). */

/* scientific calculator: the size of a real calculator, centred */
body[data-tool="scientific-calculator"] .tool-box { max-width: 580px; }
body[data-tool="scientific-calculator"] .sc-screen { background: #0f172a; border-color: #0f172a; }
body[data-tool="scientific-calculator"] .sc-expr, body[data-tool="scientific-calculator"] .sc-expr:focus { border: 0; background: transparent; box-shadow: none; color: #fff; }
body[data-tool="scientific-calculator"] .sc-expr::placeholder { color: #94a3b8; }
body[data-tool="scientific-calculator"] .sc-expr { font-size: 1.5rem; }
body[data-tool="scientific-calculator"] .sc-res { font-size: 1.15rem; font-weight: 700; color: #a5b4fc; }
body[data-tool="scientific-calculator"] .sc-res.sc-err { color: #fca5a5; }

/* stopwatch and countdown: the clock is the page */
body:is([data-tool="stopwatch"], [data-tool="countdown-timer"]) .tool-box { max-width: 680px; }
body:is([data-tool="stopwatch"], [data-tool="countdown-timer"]) .mt-display { padding: 30px 8px; border-color: #0f172a; background: #0f172a; color: #fff; font-size: clamp(2.8rem, 14vw, 5.6rem); }
body:is([data-tool="stopwatch"], [data-tool="countdown-timer"]) .mt-display.mt-done { color: #fca5a5; }
body:is([data-tool="stopwatch"], [data-tool="countdown-timer"]) .mt-actions .btn { min-width: 108px; padding: 13px 22px; font-size: 1.02rem; }
body:is([data-tool="stopwatch"], [data-tool="countdown-timer"]) .mt-actions .btn-primary { min-width: 150px; }

/* one-input checkers (prime, roman numerals, LCM and GCD): a big box, the answer straight under it */
body:is([data-tool="prime-number-checker"], [data-tool="roman-numeral-converter"], [data-tool="lcm-gcd-calculator"]) .tool-in input[type=text] { min-height: 54px; font-size: 1.25rem; }
body:is([data-tool="prime-number-checker"], [data-tool="roman-numeral-converter"], [data-tool="lcm-gcd-calculator"]) .out-row.big .out-v { font-size: 1.7rem; }

/* ---- sibling tabs (assets/js/tools/_life-modes.js): the row sits in space reserved here, so nothing moves when it is added ---- */
.tm-tabs { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; max-width: calc(100% - 28px); padding: 4px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--soft); overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.tm-tabs::-webkit-scrollbar { display: none; }
.tm-tabs a { flex: none; padding: 6px 14px; border-radius: 999px; font: 600 .86rem var(--font); color: var(--muted); }
.tm-tabs a:hover { background: #fff; color: var(--ink); text-decoration: none; }
.tm-tabs a.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
body:is([data-tool="stopwatch"], [data-tool="countdown-timer"], [data-tool="percentage-calculator"], [data-tool="percentage-change-calculator"],
  [data-tool="age-calculator"], [data-tool="date-difference-calculator"], [data-tool="add-days-to-date-calculator"], [data-tool="working-days-calculator"]) .tool-box { position: relative; padding-top: 66px; }
