/* krasosu theme on top of the stock dufs index.css, colours and type taken from krasosu.de */

@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/jetbrains-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/jetbrains-mono-700.woff2') format('woff2'); }

:root {
  --canvas: #0a0e15;
  --surface: #131a26;
  --surface-2: #1b2433;
  --rule: #2b3545;
  --rule-soft: #202836;
  --text: #eef2f6;
  --text-dim: #93a4b6;
  --text-faint: #5b6b7c;
  --accent: #4fd197;
  --accent-2: #ff6b55;
  color-scheme: dark;
  font-synthesis: none;
}

/* always dark, like krasosu.de; these also beat the stock prefers-color-scheme rules */
html {
  background: var(--canvas);
  color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
}

html body {
  min-width: 0;
  min-height: 100vh;
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
}

::selection { background: var(--accent); color: #07160f; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.backdrop::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(640px 420px at 22% 8%, rgba(79, 209, 151, .08), transparent 60%),
    radial-gradient(520px 420px at 82% 78%, rgba(255, 107, 85, .06), transparent 60%);
}
.backdrop::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(232, 233, 244, .05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}

.page { max-width: 1100px; margin: 0 auto; padding: 40px 20px 48px; }

.window {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .04);
}

/* toolbar = the window's top bar */
html .head {
  gap: 8px 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--rule);
  border-radius: 14px 14px 0 0;
  background: var(--surface);
  z-index: 5;
}

.mark { display: flex; border: none; }
.mark svg { display: block; width: 20px; height: 20px; }

html .breadcrumb { font-size: 13.5px; padding-right: 0; }
html .breadcrumb > a { color: var(--text-dim); }
html .breadcrumb > a:hover { color: var(--accent); text-decoration: none; }
html .breadcrumb > b { color: var(--text); font-weight: 500; }
html .breadcrumb > .separator { color: var(--text-faint); }
html .breadcrumb svg { fill: var(--text-dim); vertical-align: -2px; }
html .breadcrumb > a:hover svg { fill: var(--accent); }

.toolbox { margin-right: 0; gap: 2px; }
html svg, html .toolbox svg, html .toolbox-right svg { fill: var(--text-dim); }
html .toolbox .control:hover svg,
html .login-btn:hover svg,
html .logout-btn:hover svg,
html .action-btn:hover svg { fill: var(--accent); }
.save-btn svg path { fill: currentColor; }
.save-btn { color: var(--text-dim); }
.save-btn:hover { color: var(--accent); }

html .searchbar {
  background: var(--canvas);
  border: 1px solid var(--rule);
  border-radius: 8px;
  height: 26px;
  width: 220px;
  margin-bottom: 0;
}
html .searchbar:focus-within { border-color: var(--accent); }
html .searchbar svg { fill: var(--text-faint); }
html .searchbar #search { color: var(--text); font-family: inherit; font-size: 13px; padding: 1px 4px; }

.toolbox-right { margin-right: 0; color: var(--text-dim); font-size: 12.5px; }
.logout-btn:hover { color: var(--accent); }

/* listing */
html .main { padding: 10px 20px 18px; }
html .empty-folder { color: var(--text-faint); padding: 8px 0; }

.paths-table, .uploaders-table { width: 100%; border-collapse: collapse; }
html .paths-table th, html .uploaders-table th {
  color: var(--text-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 6px 4px 8px;
}
html .paths-table thead a:hover { color: var(--accent); }
html .paths-table td, html .uploaders-table td {
  padding: 5px 4px;
  border-top: 1px solid var(--rule-soft);
}
html .paths-table tbody tr { transition: background .12s ease; }
html .paths-table tbody tr:hover { background: var(--surface-2); }
html .path svg { fill: var(--accent); }
html .path a { color: var(--text); }
html .path a:hover { color: var(--accent); text-decoration: none; }
html .paths-table .cell-mtime, html .paths-table .cell-size { color: var(--text-dim); font-size: 12.5px; }
/* stock dufs makes this cell a flexbox, which stops the table from spanning the full width */
html .paths-table .cell-actions { display: table-cell; width: 96px; white-space: nowrap; padding-left: 12px; }
html .paths-table .cell-actions .action-btn { display: inline-block; vertical-align: middle; }
html .action-btn svg { display: block; }
html .paths-table .cell-mtime { width: 150px; }
html .paths-table .cell-size { width: 80px; }
.cell-status { color: var(--accent); font-size: 12.5px; }
.retry-btn { color: var(--accent-2); }

html .editor {
  background: var(--canvas);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-family: inherit;
}
.not-editable { color: var(--text-faint); }

/* upload dialog (index.html) in the style of the krasosu.de cards */
html .visibility-dialog {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
}
html .visibility-dialog::backdrop { background: rgba(5, 8, 12, .6); backdrop-filter: blur(2px); }
.visibility-dialog .visibility-title { color: var(--accent); font-size: 12.5px; letter-spacing: .04em; }
.visibility-dialog label { color: var(--text-dim); font-size: 13.5px; }
.visibility-dialog input[type=checkbox] { accent-color: var(--accent); margin-top: 4px; }
.visibility-dialog button {
  font-family: inherit; font-size: 13px; padding: 7px 14px; cursor: pointer; border-radius: 7px;
  border: 1px solid var(--rule); background: var(--surface); color: var(--text);
  transition: border-color .15s ease, transform .1s ease;
}
.visibility-dialog button:hover { border-color: var(--accent); }
.visibility-dialog button:active { transform: scale(.97); }
.visibility-dialog .visibility-upload { background: var(--accent); border-color: var(--accent); color: #04141a; font-weight: 700; }

footer {
  max-width: 1100px; margin: 24px auto 0; padding: 0 28px;
  display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between;
  color: var(--text-faint); font-size: 12px;
}
footer a { color: var(--text-faint); text-decoration: none; border-bottom: 1px solid var(--rule); transition: color .15s ease, border-color .15s ease; }
footer a:hover { color: var(--accent); border-color: rgba(79, 209, 151, .5); }
footer .legal { display: flex; gap: 16px; }

@media (max-width: 640px) {
  .page { padding: 16px 10px 32px; }
  html .head, html .main { padding-left: 12px; padding-right: 12px; }
  html .searchbar { width: 100%; order: 10; }
  html .paths-table .cell-mtime { display: none; }
  html .paths-table .cell-actions { width: auto; padding-left: 6px; }
  html .action-btn { padding-right: 0.15em; }
  html .path a { max-width: calc(100vw - 190px); min-width: 0; }
}
