:root {
    --bg: #2F3135;
    --text: #c8c8c8;
    --good-contrast: #fffa;
    --button-bg: #32363a;
    --button-bg-hover: #636B73;
    --button-text: #c8c8c8;
    --faint-contrast: rgba(0, 0, 0, 0);
	--faint-contrast: NOME !important;
	--ghost-contrast-alt: NOME !important;
	--mild-contrast: NOME !important;
	--focus-color: NOME !important;
	--success: #272 !important;
    color-scheme: light;
}

:root .theme-dark {
    --bg: #2F3135;
    --text: #c8c8c8;
    --good-contrast: #fffa;
    --button-bg: #32363a;
    --button-bg-hover: #636B73;
    --button-text: #c8c8c8;
    --faint-contrast: rgba(0, 0, 0, 0);
	--faint-contrast: NOME !important;
	--ghost-contrast-alt: NOME !important;
	--mild-contrast: NOME !important;
	--focus-color: NOME !important;
	--success: #272 !important;
    color-scheme: dark;
}

body {
    background-size: contain;
}

a {
    text-decoration: none;
    color: var(--button-text);
    font-size: 18px;
    vertical-align: middle;
    cursor: pointer;
}

:root .theme-dark a {
    color: var(--button-text);
}

button {
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: .5em 1em;
    text-decoration: none;
    border-radius: .3em;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid var(--faint-contrast);
    text-shadow: 1px 1px 4px rgb(0 0 0 / 70%);
    font-size: 18px;
    font-weight: bold;
    transition: all 0.25s ease;
    white-space: nowrap;
}

button[disabled] {
    background-color: #2F3135 !important;
    color: #666 !important;
    cursor: not-allowed !important;
}

img {
    display: block;
    margin: 0.5em auto;
}

#root {
    max-width: 100%;
    margin: auto;
    min-height: 100vh;
}

#root>div {
    max-width: 100%;
}

.list-wrapper {
    max-width: 100%;
}

* {
  user-select: none;
  cursor: default;
}

button,
a {
  cursor: default !important;
  user-select: none;
}

header {
    background-image: -webkit-linear-gradient(#484e55, #3a3f44 60%, #313539);
    background-image: -o-linear-gradient(#484e55, #3a3f44 60%, #313539);
    background-image: -webkit-gradient(linear, left top, left bottom, from(#484e55), color-stop(60%, #3a3f44), to(#313539));
    background-image: linear-gradient(#484e55, #3a3f44 60%, #313539);
    background-repeat: no-repeat;
    position: sticky;
    top: 0;
    padding: .2em;
    z-index: 1;
    text-shadow: 1px 1px 4px rgb(0 0 0 / 70%);
}

#menu-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

#menu-bar > * {
    max-width: 100%;
    flex-shrink: 1;
}

#menu-bar .label {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#menu-bar button {
    padding: min(2vh, .6em) 0vh;
}

#menu-entry-comment,
#menu-entry-comment * {
  cursor: default !important;
}

#menu-bar button,
#menu-bar a,
.breadcrumb,
#breadcrumb-parent,
#breadcrumb-home {
    cursor: default !important;
}

#menu-bar button[disabled] {
    cursor: not-allowed !important;
}

#menu-bar a:hover,
.breadcrumb:hover {
    text-decoration: none !important;
}

#user-panel {
    gap: 0 !important;
}

.breadcrumb {
    padding: .1em .6em .2em;
    line-height: 1.8em;
    border-radius: .7em;
    background-color: var(--button-bg);
    border: 1px solid var(--faint-contrast);
    margin: 8px 4px 10px;
    display: inline-block;
    min-width: 60px;
    text-align: center;
    text-shadow: 0px 0px 4px rgb(0 0 0 / 40%);
    word-break: break-word;
    transition: all 0.25s ease;
}

ul.dir {
    margin: auto;
    min-width: 95%;
    max-width: 95%;
    text-shadow: 1px 1px 4px rgb(0 0 0 / 70%);
}

ul.dir li input[type=checkbox] {
    margin-right: 1em;
    margin-left: 0.7em;
}

ul.dir li {
    display: flex;
    min-height: 2em;
    list-style-type: none;
    margin: 1px auto;
    padding: .3em .3em .4em;
    border: 1px solid var(--faint-contrast);
    border-radius: 8px;
	align-items: center;
}

ul.dir li a:last-of-type {
    word-break: break-word;
    padding-right: .5em;
    display: inline-flex;
    align-items: center;
}

.dir {
    position: relative;
    z-index: 0;
}

.folder a,
.file a {
    cursor: default !important;
    text-decoration: none !important;
    color: inherit !important;
}

.folder a:hover,
.file a:hover {
    text-decoration: none !important;
    cursor: default !important;
}

@media (min-width: 1200px) {
    #player {
        position: fixed;
        top: auto;
        bottom: 2px;
        left: 2px;
        padding: .5%;
        min-width: calc((100vw - 800px) / 1.2);
        box-sizing: border-box;
        background: #0f11117d;
        border-radius: 8px;
        border: 1px solid var(--faint-contrast);
        z-index: 1;
    }
}

#player-title {
    color: var(--button-text);
    padding: .5em 1em;
    text-decoration: none;
    border-radius: .3em;
    vertical-align: middle;
    text-shadow: 1px 1px 4px rgb(0 0 0 / 70%);
    font-size: 18px;
    font-weight: bold;
}

.dialog {
    position: relative;
    margin: 0 !important;
	flex-wrap: wrap;
	align-content: center;
}

.dialog-backdrop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.dialog-content {
    width: 100%;
    max-width: 100%;
    margin-top: 10%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    overflow: hidden;
    border-bottom: 2px;
    padding-bottom: 10px; 
}

#option-invert-order,
#option-folders-first,
#option-sort-numerics,
#option-english {
  display: inline-block;
  margin: 0 15px;
}

.dialog-icon,
:root .theme-dark .dialog-closer {
    cursor: default;
}

.dialog-icon {
	color: unset !important;
    background-color: #32363a00;
	top: 2px;
}

:root .theme-dark .dialog-closer {
    background: #32363a00;
}

.dialog-title {
    margin-left: 2em;
}

.dialog-type {
    left: 3px;
    top: 2px;
}

.controls[style*="display: flex"] {
    display: block !important;
    gap: 0 !important;
    justify-content: initial !important;
    align-items: initial !important;
}

.submit {
    display: flex;
    justify-content: center;
}

.toasts {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 9999;
    padding: 0 10px;
    max-width: 100%;
    box-sizing: border-box;
}

.toast.toast-info {
  animation: neonGlow 1.1s ease-in-out infinite alternate;
}

[role="alertdialog"] {
  animation: neonGlow 1.1s ease-in-out infinite alternate;
}

@media (max-height: 550px) {
  .dialog-title {
    display: none !important;
  }
}

@media (max-width: 600px) {
    .toasts {
        top: 44% !important;
        left: 53% !important;
        transform: translateX(-50%) !important;
        padding: 0 5px;
    }
}

.toast {
    background-color: #2F3135;
	color: var(--button-text);
    padding: 10px 20px;
    display: inline-block;
    max-width: 90%;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    border-radius: 6px;
    transition: none !important;
    box-sizing: border-box;
}

#menu-entry-open,
.popup-menu-button,
#option-tile-size > div,
.entry-panel {
    display: none !important;
}

#change-password {
    margin-bottom: 1em;
}

label[for="name"] {
    display: none;
}

.tiles-mode {
    --name-lines: initial;
    margin: 0 !important;
}

.tiles-mode ul.dir {
    margin-top: 12px;
}

.tiles-mode ul.dir li input[type=checkbox] {
    margin: 3px;
	position: static;
	-webkit-transform-origin-y: bottom;
}

#filter-bar input[type=checkbox] {
    margin-left: 9px;
}

#search-dialog form {
    margin: 12px;
}

@media (max-width: 600px) {
    .dialog-content div[style*="display: flex"] {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5em;
    }
}

@media (max-width: 768px) {
    #menu-bar .label {
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    #menu-bar .label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    #menu-bar .label {
        font-size: 0.7rem;
    }
}

@media (max-width: 360px) {
    #menu-bar .label {
        font-size: 0.65rem;
    }
}

#root .file-show .bar, #root .file-show .bar>.controls {
    justify-content: center !important;
}

div[style*="display: flex"][style*="gap: 1em"] {
    justify-content: center !important;
    align-items: center !important;
}

div[style*="gap: 1em"] {
    gap: 0 !important;
}

.login-dialog form {
    margin: 12px;
}

input[type="range"],
input[role="slider"],
.meu-range {
  display: block !important;
  margin: 0 auto !important;
  width: 300px !important;
  max-width: 90% !important;
}

input {
  background: #2b2b2b;
  border: 1px solid #555;
  border-radius: 5px;
  color: #fff;
  outline: none;
  transition: 0.1s;
}

#option-sort-by:focus {
    border-color: #fff;
    animation: neonGlow 1.1s ease-in-out infinite alternate;
    outline: none;
}

input:focus {
  border-color: #fff;
  box-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 6px #fff;
  animation: neonGlow 1.1s ease-in-out infinite alternate;
}

@keyframes neonGlow {
  from {
    box-shadow: 0 0 3px #000, 0 0 5px #000, 0 0 6px #000;
  }
  to {
    box-shadow: 0 0 4px #fff, 0 0 6px #fff, 0 0 8px #fff;
  }
}

div[style*="display: flex"][style*="flex-direction: column"] {
    margin: 0px;
}

#menu-bar button:not([disabled]):hover,
.breadcrumb:hover {
    cursor: pointer;
    animation: neonBorder 1s ease-in-out infinite alternate;
}

@keyframes neonBorder {
    from {
        border-color: #fff;
        box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff;
    }
    to {
        border-color: #fff;
        box-shadow: 0 0 8px #fff, 0 0 15px #fff, 0 0 20px #fff;
    }
}
