/* Akio Space: the few styles Tailwind utilities can't express. */
.wordmark { font-family: 'Michroma', ui-sans-serif, system-ui, sans-serif; letter-spacing: .03em; }
.thin-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.thin-scroll::-webkit-scrollbar-thumb { background: #334155; border-radius: 8px; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.dot { animation: blink 1.2s infinite; }
.ctx-active { background: rgb(30 41 59); box-shadow: inset 0 0 0 1px rgb(99 102 241 / .6); }
.drop-target { background: rgb(49 46 129 / .55); box-shadow: inset 0 0 0 1px #818cf8; }

/* Icons: reserve the space while <i data-icon> placeholders are still waiting to be swapped for their SVG. */
[data-icon] { display: inline-block; width: 1rem; height: 1rem; }
.ico { display: inline-block; vertical-align: middle; }

/* Main menu */
.menu-item { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .5rem .9rem; text-align: left; color: rgb(203 213 225); transition: background-color .12s, color .12s; }
.menu-item:hover, .menu-item:focus { background: rgb(30 41 59); color: #fff; outline: none; }
.menu-item.is-active { color: #fff; background: rgb(49 46 129 / .45); box-shadow: inset 2px 0 0 #6366f1; }
.menu-item.is-active svg { color: #a5b4fc; }

/* Misc Tools: card icon = the tool's icon.svg used as a mask, so the app colours it (see backend/misc_tools/README.md) */
.misc-ico { display: block; width: 1.75rem; height: 1.75rem; background-color: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.misc-card:hover .misc-tile, .misc-card:focus-visible .misc-tile { color: #a5b4fc; background-color: rgb(99 102 241 / .2); }

/* Misc Tools: a tool marked [data-misc-full] fills the whole page area (see misc.js fitHost) */
.misc-host-full { width: 100%; height: 100%; }
.misc-host-full > [data-tool-root] { height: 100%; }

/* Code editor: while a scrollbar is being dragged keep the arrow cursor, even when the pointer leaves the scrollbar (codecore.js) */
.ce-sb-drag, .ce-sb-drag * { cursor: default !important; }
.ce-input.ce-sb-hover { cursor: default; }

/* Vault list */
.v-row { display: flex; align-items: center; gap: .75rem; padding: .35rem .5rem; border-radius: .5rem; font-size: .8125rem; }
.v-row:hover, .v-row.is-selected { background: rgb(30 41 59 / .7); }
.v-row.is-selected { box-shadow: inset 0 0 0 1px rgb(99 102 241 / .35); }
.v-head { position: sticky; top: 0; z-index: 1; background: rgb(2 6 23); font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: rgb(100 116 139); }
.v-act { opacity: 0; transition: opacity .12s; }
.v-row:hover .v-act, .v-row:focus-within .v-act { opacity: 1; }
@media (hover: none) { .v-act { opacity: 1; } }
.v-ibtn { padding: .3rem; border-radius: .375rem; color: rgb(148 163 184); }
.v-ibtn:hover { background: rgb(51 65 85); color: #fff; }
.v-ibtn.danger:hover { background: rgb(127 29 29 / .6); color: rgb(254 202 202); }

/* Vault: toolbar, view modes (details / list / icons), search, upload progress */
.v-row { cursor: default; }
.v-row.v-compact { padding-top: .15rem; padding-bottom: .15rem; }
.v-grid { display: grid; gap: .5rem; padding: .25rem 0; grid-template-columns: repeat(auto-fill, minmax(var(--v-tile, 120px), 1fr)); }
.v-tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: .6rem .4rem .5rem; border-radius: .75rem; border: 1px solid transparent; font-size: .75rem; color: rgb(226 232 240); cursor: default; min-width: 0; }
.v-tile:hover, .v-tile.is-selected { background: rgb(30 41 59 / .7); }
.v-tile.is-selected { border-color: rgb(99 102 241 / .5); }
.v-thumb { display: flex; align-items: center; justify-content: center; width: 100%; height: var(--v-thumb, 64px); border-radius: .5rem; overflow: hidden; background: rgb(15 23 42); color: rgb(148 163 184); }
.v-thumb img { width: 100%; height: 100%; object-fit: cover; }
.v-tile .v-name { width: 100%; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.v-tile .v-meta { font-size: .65rem; color: rgb(100 116 139); }
.v-tile .v-check { position: absolute; top: .45rem; left: .45rem; opacity: 0; transition: opacity .12s; }
.v-tile:hover .v-check, .v-tile.is-selected .v-check, .v-tile:focus-within .v-check { opacity: 1; }
.v-tile .v-tact { position: absolute; top: .35rem; right: .35rem; display: flex; gap: .1rem; opacity: 0; transition: opacity .12s; background: rgb(15 23 42 / .85); border-radius: .4rem; }
.v-tile:hover .v-tact, .v-tile:focus-within .v-tact { opacity: 1; }
@media (hover: none) { .v-tile .v-tact, .v-tile .v-check { opacity: 1; } }
.v-path { font-size: .65rem; color: rgb(100 116 139); }
.v-bar { height: .375rem; border-radius: 9999px; background: rgb(30 41 59); overflow: hidden; }
.v-bar > i { display: block; height: 100%; width: 0; background: rgb(99 102 241); border-radius: inherit; transition: width .12s linear; }
.v-bar.busy > i { background-image: linear-gradient(90deg, rgb(99 102 241), rgb(165 180 252), rgb(99 102 241)); background-size: 200% 100%; animation: v-shift 1s linear infinite; }
@keyframes v-shift { to { background-position: -200% 0; } }

/* Code editor (codecore.js): textarea over a highlighted <pre> */
.ce-root { --ce-fs: 13px; --ce-tab: 2; --ce-sbw: 0px; --ce-sbh: 0px;
  --tok-comment: #6b7280; --tok-keyword: #c084fc; --tok-string: #34d399; --tok-number: #fb923c; --tok-boolean: #f472b6; --tok-function: #60a5fa;
  --tok-tag: #f87171; --tok-attr: #fbbf24; --tok-property: #38bdf8; --tok-operator: #94a3b8; --tok-heading: #818cf8; --tok-code: #2dd4bf;
  position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; background: rgb(2 6 23); color: #e2e8f0; }
.ce-pane { flex: 1; display: flex; min-height: 0; min-width: 0; overflow: hidden; position: relative; }
.ce-gutter { flex-shrink: 0; padding: 12px 10px 12px 0; text-align: right; overflow: hidden; user-select: none; white-space: pre;
  font: var(--ce-fs)/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; color: #475569; border-right: 1px solid #1e293b; background: rgb(2 6 23); }
.ce-wrap { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.ce-layer { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 12px 14px; border: 0; box-sizing: border-box;
  font: var(--ce-fs)/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; letter-spacing: 0; font-variant-ligatures: none;
  tab-size: var(--ce-tab); -moz-tab-size: var(--ce-tab); white-space: pre; overflow-wrap: normal; word-break: normal; }
.ce-wrap-on .ce-layer { white-space: pre-wrap; overflow-wrap: break-word; }
.ce-hl, .ce-marks { pointer-events: none; overflow: hidden; padding-right: calc(14px + var(--ce-sbw)); padding-bottom: calc(12px + var(--ce-sbh)); }
.ce-hl { z-index: 2; color: #e2e8f0; background: transparent; }
.ce-marks { z-index: 1; color: transparent; }
.ce-hl code, .ce-marks code { font: inherit; display: block; min-height: 100%; }
.ce-marks mark { background: rgb(250 204 21 / .22); color: transparent; border-radius: 2px; }
.ce-marks mark.cur { background: rgb(250 204 21 / .5); box-shadow: 0 0 0 1px rgb(250 204 21 / .8); }
.ce-input { z-index: 3; resize: none; outline: none; background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: #f8fafc; overflow: auto; }
.ce-input::selection { background: rgb(99 102 241 / .4); color: transparent; -webkit-text-fill-color: transparent; }
.ce-mirror { visibility: hidden; pointer-events: none; z-index: 0; position: absolute; left: 14px; top: 0; right: auto; bottom: auto; height: auto; padding: 0; overflow: visible; white-space: pre-wrap; overflow-wrap: break-word; }
.ce-root .tok-comment { color: var(--tok-comment); font-style: italic; }
.ce-root .tok-keyword { color: var(--tok-keyword); }
.ce-root .tok-string { color: var(--tok-string); }
.ce-root .tok-number { color: var(--tok-number); }
.ce-root .tok-boolean { color: var(--tok-boolean); }
.ce-root .tok-function { color: var(--tok-function); }
.ce-root .tok-tag { color: var(--tok-tag); }
.ce-root .tok-attr { color: var(--tok-attr); }
.ce-root .tok-property { color: var(--tok-property); }
.ce-root .tok-operator { color: var(--tok-operator); }
.ce-root .tok-heading { color: var(--tok-heading); font-weight: 700; }
.ce-root .tok-code { color: var(--tok-code); }
.ce-root .tok-bold { font-weight: 700; }
.ce-root .tok-italic { font-style: italic; }
.ce-find { display: flex; flex-direction: column; gap: .35rem; padding: .4rem .6rem; background: rgb(15 23 42); border-bottom: 1px solid #1e293b; flex-shrink: 0; }
.ce-find-row { display: flex; align-items: center; gap: .35rem; }
.ce-find input[type="text"] { flex: 1; min-width: 0; background: rgb(2 6 23); border: 1px solid #334155; border-radius: .4rem; padding: .25rem .5rem; font-size: .75rem; color: #e2e8f0; }
.ce-find input[type="text"]:focus { outline: none; border-color: #6366f1; }
.ce-find input.ce-bad { border-color: #ef4444; }
.ce-find .ce-btn, .ce-find .ce-tgl { display: inline-flex; align-items: center; justify-content: center; padding: .25rem .45rem; font-size: .7rem; border-radius: .4rem; border: 1px solid #334155; background: #1e293b; color: #cbd5e1; cursor: pointer; }
.ce-find .ce-btn:hover, .ce-find .ce-tgl:hover { background: #334155; }
.ce-find .ce-tgl.on { background: rgb(99 102 241 / .25); border-color: #6366f1; color: #c7d2fe; }
.ce-count { min-width: 4.5rem; text-align: right; font-size: .7rem; color: #64748b; white-space: nowrap; }
.ce-readonly .ce-input { caret-color: transparent; }
