/*
 * Copyright © 2026 Krzysztof Kasprowicz
 * Licensed under the GNU Affero General Public License, Version 3. See LICENSE in the project root for license information.
 * Project repository: https://github.com/fathomise/MailFathom
 */

html, body { margin: 0; padding: 0; background: oklch(0.982 0.003 262); min-height: 100%; }
html:has([data-theme="dark"]), body:has([data-theme="dark"]) { background: oklch(0.183 0.016 262); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea:placeholder-shown { white-space: nowrap; overflow: hidden !important; }
textarea::placeholder { text-overflow: ellipsis; }
[data-rail]::-webkit-scrollbar { width: 0; height: 0; }
[data-rail] { scrollbar-width: none; }
a { color: var(--accent); }
a:hover { color: var(--accent-2); }
input { font-family: inherit; }
/* A field typed into with no edge of its own sits inside the box that reads as the field, so that box takes the ring.
   Matched on the style the runtime writes out, which spells a `border:none` as its longhands.
   Inset, because several of those boxes are rows of a clipped pane. */
:where(:has(> input[style*="border-style: none"]:focus-visible)) { outline: 2px solid var(--accent); outline-offset: -2px; }
/* The composer's fields are rows of one sheet rather than boxes, so a focused row marks its bottom edge instead, and the
   body the edge it starts on. Important, because each edge is the element's own inline border. */
[data-compose-fields] :has(> input[style*="border-style: none"]:focus-visible) { outline: none; border-bottom-color: var(--accent) !important; }
[data-compose-fields] [contenteditable]:focus-visible { border-left-color: var(--accent) !important; }

/* A rail tile's status dot. `pulse` — work under way there — sends a ring out of the dot and lets it fade; `dot` —
   something waits to be read — stands still. Under reduced motion the ring never travels and the dot alone remains. */
@keyframes mf-rail-ring { 0% { box-shadow: 0 0 0 0 var(--err) } 70%, 100% { box-shadow: 0 0 0 5px transparent } }
[data-rail-dot="pulse"] { animation: mf-rail-ring 1.6s var(--ease-out, ease-out) infinite; }

@keyframes mfmsgin{ from { opacity: 0; transform: translateY(6px) } }
/* A file on its way up: a block of the bar travels the card's foot and back, since how far the upload has got is not
   known - the client's own bar for an operation that cannot say how far it has got. */
@keyframes mfupload { 0% { margin-left: 0 } 50% { margin-left: 62% } 100% { margin-left: 0 } }
@keyframes mfblkin { from { opacity: 0; transform: translateY(7px) } }
@keyframes mfdot { 0%, 78%, 100% { opacity: 0.25; transform: translateY(0) } 38% { opacity: 1; transform: translateY(-3px) } }
@keyframes mfrowin { from { opacity: 0; max-height: 0; transform: translateY(-7px) } to { opacity: 1; max-height: 260px; transform: none } }
@keyframes mfrowout { from { opacity: 1; max-height: 260px; transform: none } to { opacity: 0; max-height: 0; transform: translateX(-22px) } }
@keyframes mfrowdel { 0% { box-shadow: inset 3px 0 0 transparent, inset 0 0 0 0 var(--err-soft) } 28% { box-shadow: inset 3px 0 0 var(--err), inset 0 0 0 40px var(--err-soft) } 100% { box-shadow: inset 3px 0 0 var(--err), inset 0 0 0 40px var(--err-soft) } }
@keyframes mfrowarc { 0% { box-shadow: inset 3px 0 0 transparent, inset 0 0 0 0 var(--warn-soft) } 28% { box-shadow: inset 3px 0 0 var(--warn), inset 0 0 0 40px var(--warn-soft) } 100% { box-shadow: inset 3px 0 0 var(--warn), inset 0 0 0 40px var(--warn-soft) } }
@keyframes mfrowmoved { 0% { box-shadow: inset 3px 0 0 transparent, inset 0 0 0 0 var(--warn-soft) } 14% { box-shadow: inset 3px 0 0 var(--warn), inset 0 0 0 40px var(--warn-soft) } 62% { box-shadow: inset 3px 0 0 var(--warn), inset 0 0 0 40px var(--warn-soft) } 100% { box-shadow: inset 3px 0 0 transparent, inset 0 0 0 0 var(--warn-soft) } }
@keyframes mfrowedit { 0% { box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 40px var(--accent-soft) } 55% { box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 40px var(--accent-soft) } 100% { box-shadow: inset 3px 0 0 transparent, inset 0 0 0 40px transparent } }
