/* MAIN */
:root {
    --bg-color: #212121;
    --secondary-bg-color: #292929;
    --tertiary-bg-color: #191919;
    --font-color: #fff;
    --highlight-color: #5cb85c;
    --secondary-highlight-color: #52a552;
    --scroll-bar-color: #555;
    --error-color: #b73232;
}

.white-mode {
    --bg-color: #ffffff;
    --secondary-bg-color: #eaeaea;
    --tertiary-bg-color: #dcdcdc;
    --font-color: #3c3c3c;
    --scroll-bar-color: #dcdcdc;
}

body {
    background-color: var(--bg-color);
    color: var(--font-color);
    overflow: hidden;
}

select {
    background-color: var(--secondary-bg-color) !important;
    border-color: var(--secondary-bg-color) !important;
    color: var(--font-color) !important;
}

.btn-highlight {
    background-color: var(--highlight-color) !important;
    color: var(--font-color) !important;
}

.btn-highlight:hover:not(:disabled) {
    background-color: var(--secondary-highlight-color) !important;
}

/* TOASTS */
.toast-header {
    border-bottom: none;
    color: var(--font-color);
    background-color: var(--tertiary-bg-color);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.toast-body > button {
    background-color: var(--secondary-bg-color);
    color: var(--font-color);
}

.toast-body > button:hover {
    color: var(--font-color);
}

.toast-body > #install-btn, .toast-body > #tasklist-btn {
    background-color: var(--highlight-color);
}

.toast-body > button:last-child {
    margin-left: 1rem;
}

.toast .close {
    color: var(--font-color);
}

.toast {
    position: fixed;
    bottom: 142px;
    left: 10px;
    visibility: hidden;
}

.toast-body {
    background-color: var(--bg-color)
}

.toast i {
    font-size: 20px;
}

/* NAVBAR */
.windowbar {
    background-color: var(--bg-color) !important;
}

.windowbar.fixed {
    top: 0 !important;
    width: 100% !important;
    user-select: none;
    height: 40px;
    box-shadow: 0 1px 10px var(--tertiary-bg-color);
}

.windowbar.wb-win .windowbar-minimize, .windowbar.wb-win .windowbar-maximize, .windowbar.wb-win .windowbar-close {
    height: 34px !important;
}

.windowbar-title {
    color: var(--font-color) !important;
    font-size: 13px !important;
    line-height: 14px;
    margin-top: 4px;
}

.windowbar-controls {
    margin-top: 3px;
}

.windowbar-icon {
    position: fixed;
    max-width: 25px;
    margin-left: 10px;
    margin-top: 8px;
}

.windowbar.wb-mac {
    border-color: var(--secondary-bg-color) !important;
    background: var(--secondary-bg-color) !important;
    border-width: 0px !important;
    height: 36px !important;
}

/* URL FORM */
.url-input {
    margin-top: calc(40px + 1.5rem); /* Compensate the fixed navbar */
    margin-bottom: 1.5rem;
}

.url-input .btn {
    background-color: var(--secondary-bg-color) !important;
    border-color: var(--secondary-bg-color) !important;
    color: var(--font-color) !important;
    font-size: 24px;
    font-weight: 600;
    line-height: 0.5;
    border-top-right-radius: 3px !important;
    border-bottom-right-radius: 3px !important;
}

.url-input .btn > i::before {
    transform: scale(1.5);
}

#settingsBtn {
    margin-left: 1rem;
}

#version {
    margin-right: auto;
}

#settingsBtn > i::before {
    transform: scale(.8) !important;
}

/* QUEUE AREA */

.empty {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    text-align: center;
    width: 100%;
    color: var(--font-color);
}

.template {
    display: none;
    visibility: hidden;
}

.empty > .title {
    font-size: 30px;
    font-weight: bold;
}

.empty > .header {
    font-size: 120px;
}

.empty > .undertitle {
    font-size: 15px;
    font-weight: 600;
}

.queue {
    /*border: 1px solid var(--tertiary-bg-color);
    border-radius: .25rem;*/
    padding: 10px;
    width: 100%;
    height: calc(100vh - 268px);
    background-color: var(--secondary-bg-color);
    /*box-shadow: inset 0 0 4px 2px var(--tertiary-bg-color);*/
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.video-card {
    position: relative;
    max-width: 700px;
    min-height: 140px;
    max-height: 155px;
    margin: 1em 1em 0 1em;
    background-color: var(--bg-color);
    padding: 0.75em 0 0.75em 0.75em;
    border-radius: 3px;
    box-shadow: 0 0.1em 0.15em var(--tertiary-bg-color);
}

.video-card .handle {
    position: absolute;
    left: 0.25rem;
    top: calc(50% + 2rem);
    margin: -2rem 0;
    padding: 2rem 0;
    transform: translateY(-50%) scale(1.5);
    filter: brightness(55%);
    cursor: move;
    z-index: 100;
}

.video-card p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    max-width: 360px;
}

@media only screen and (max-width: 1483px) {
    .video-cards {
        justify-content: center !important;
    }
}

.video-card .custom-select {
    height: unset;
    line-height: 1.3;
    width: 160px;
    margin-bottom: 1em;
}

.video-card i {
    font-size: 20px;
}

.bi-card-text-strike {
    display: block;
    background: url(img/card-text-strike.svg);
    height: 1em;
    width: 1em;
    margin-top: 0.2em ;
    margin-bottom: 0.3em !important;
}

.controls .bi-card-text-strike {
    margin-top: 0.25em !important;
    margin-bottom: 0.25em !important;
}

.video-card .metadata .info a {
    text-decoration: underline;
}

.video-card .metadata {
    margin-top: 0.25em;
}

.video-card a {
    cursor: pointer;
    transition: 150ms color;
    color: var(--font-color);
}

.video-card i:hover :not(.bi-grip-vertical) {
    transition: 150ms color;
    filter: brightness(55%);
}

.video-card a.disabled:hover, .video-card a.disabled, .video-card i.disabled, .video-card i.disabled:hover {
    cursor: default;
    pointer-events: none;
}

.video-card i.disabled {
    filter: brightness(25%);
}

.video-card i::before {
    vertical-align: unset !important;
}

.video-card .metadata {
    margin-bottom: 0 !important;
}

.video-card img {
    border-radius: 3px;
    object-fit: cover;
    width: 100%;
    max-height: 130px;
    background-color: var(--secondary-bg-color);
}

.video-card img:before {
    content: ' ';
    display: block;
    position: absolute;
    max-height: 130px;
    width: 100%;
    object-fit: cover;
    background-image: url("img/plain-placeholder.png");
}

.video-card .progress {
    height: 31px;
    line-height: 1.1;
    margin-right: 10px;
    display: none;
    position: relative;
    background-color: var(--secondary-bg-color);
}

.video-card .open {
    display: none;
}

.video-card .open .btn, .video-card .error .btn {
    line-height: 1.2;
    font-size: 95%;
}

.video-card .progress small {
    color: var(--font-color);
    position: absolute;
    text-align: center;
    line-height: 31px; /* line-height should be equal to bar height */
    overflow: hidden;
    font-size: 12px;
    right: 0;
    left: 0;
    top: 0;
}

.progress-bar {
    background-color: var(--highlight-color);
}

.metadata .btn-dark {
    margin-bottom: 0.15em;
    line-height: 0.8;
}

.metadata i:before {
    animation: rotation 1500ms infinite linear;
    vertical-align: text-bottom !important;
    line-height: 1.18;
}

.buttons {
    margin-top: 1.5rem;
}

option.audio {
    display: none;
}


/* CONTROLS */
.controls {
    bottom: 0;
    position: absolute;
    padding-bottom: 1.5rem;
    padding-top: 1.5rem;
    background: var(--bg-color);
}

.openAuth {
    text-decoration: underline;
    cursor: pointer;
}

.controls .progress small {
    color: var(--font-color);
    position: absolute;
    text-align: center;
    line-height: 32px; /* line-height should be equal to bar height */
    overflow: hidden;
    font-size: 12px;
    right: 0;
    left: 0;
    top: 0;
}

.controls .btn-dark {
    background-color: var(--secondary-bg-color) !important;
    border-color: var(--secondary-bg-color) !important;
    color: var(--font-color) !important;
    height: 100%;
}

.controls .progress {
    height: 32px;
    width: 100%;
    max-width: 700px;
    position: relative;
    background-color: var(--secondary-bg-color);
}

.controls .buttons * {
    margin: 0 5px;
}

.controls .buttons i:before {
    line-height: 1.1;
    transform: scale(1.2);
}

.controls .spacer {
    width: 2px;
    margin: 0 10px;
    background: var(--secondary-bg-color);
}

/* MODAL */
.modal-content, .modal-content textarea, .modal-content li, .modal-content ul {
    background-color: var(--bg-color);
    color: var(--font-color);
}

.modal-title {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.modal .btn-dark {
    background-color: var(--secondary-bg-color) !important;
    border-color: var(--secondary-bg-color) !important;
    color: var(--font-color) !important;
}

.modal .close {
    color: var(--font-color);
}

/* SETTINGS MODAL */
#settingsModal .form-range {
    margin-bottom: .5rem;
}

#settingsModal .modal-body {
    height: 61vh;
    max-height: 571px;
    overflow-y: auto;
}

#settingsModal hr {
    border-color: var(--tertiary-bg-color);
    margin: 1rem -1rem 1rem;
}

#settingsModal h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

#settingsModal .help-button i {
    font-size: 18px;
    color: var(--font-color);
}

#settingsModal .help-button i:before {
    vertical-align: -.33em;
}

#settingsModal .help-button {
    margin-left: 1rem;
    filter: brightness(0.6);
    cursor: pointer;
    transition: 200ms;
}

#settingsModal .help-button:hover {
    filter: brightness(0.4);
    transition: 200ms;
}

#nameFormatCustom {
    width: 80%;
}

/* AUTH MODAL */
#fileInput {
    cursor: pointer;
}

#authModal a {
    display: block;
    margin-top: 1rem;
}

@media screen and (min-width: 992px) {
    #authModal .custom-file {
        max-width: 50%;
    }
}

/* LOG MODAL */
#logModal {
    padding: 0 5rem;
}

#logModal .modal-dialog {
    max-width: 1200px;
    margin: 1.75rem auto !important;
}

#logModal .log {
    overflow-y: auto;
    max-height: 550px;
    border-color: var(--tertiary-bg-color);
    background-color: var(--secondary-bg-color);
}

#logModal .log p {
    margin-bottom: 0.5rem;
}

/* INFO MODAL */
#info-description {
    resize: none;
    border-color: var(--tertiary-bg-color);
    border-radius: 3px;
    width: 100%;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.3);
    padding: 0.3rem 1rem;
}

.bi-save:before {
  padding-bottom: 2px !important;
}

.info-img {
    width: 100%;
    max-height: 10rem;
    object-fit: cover;
    cursor: pointer;
}

.info-img:before {
    content: ' ';
    display: block;
    position: absolute;
    max-height: 110px;
    width: 100%;
    object-fit: cover;
    background-image: url(img/plain-placeholder.png);
}

i.img-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-60%);
    font-size: 3rem;
    opacity: 0;
    text-shadow: 2px 2px 3px rgba(0,0,0,.6);
    transition: 200ms;
    cursor: pointer;
}

.list-group-item {
    padding-left: 0;
}

.modal-header, .modal-footer {
    border-color: var(--tertiary-bg-color);
}

.darken {
    filter: brightness(.5);
    transition: 200ms;
}

i.img-overlay:hover, img.info-img:hover ~ i.img-overlay  {
    opacity: 1;
}

/* POPOVER */
.popover {
    box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.2);
}

.popover-body {
    background: var(--bg-color);
    color: var(--font-color);
}

.arrow:after {
    border-bottom-color: var(--bg-color) !important;
}

.remove-btn:focus {
    outline: none !important;
}

/* SELECT2 OVERRIDES */

.select2-dropdown {
    background-color: var(--secondary-bg-color) !important;
    border: 1px solid var(--tertiary-bg-color) !important;
    border-radius: 3px !important;
}

.select2-container--default .select2-results__option--selected {
    background-color: var(--tertiary-bg-color) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: var(--bg-color) !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border: none !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    border-right: none !important;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
    background-color: var(--secondary-bg-color) !important;
}

.select2-search__field {
    height: 1.5rem !important;
    margin-left: .5rem !important;
    line-height: 1.5rem !important;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji" !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--bg-color) !important;
    border: 1px solid var(--tertiary-bg-color) !important;
    margin-left: 0.5rem !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: var(--bg-color) !important;
    color: var(--font-color) !important;
}

.select2-container--default .select2-selection--multiple {
    background-color: var(--secondary-bg-color) !important;
    border-radius: 3px !important;
    border: none !important;
}

/* FILESIZE SPINNER */
.lds-dual-ring {
    display: inline-block;
    width: 16px;
    height: 16px;
}
.lds-dual-ring:after {
    content: " ";
    display: block;
    width: 16px;
    height: 16px;
    margin: 3px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    border-color: #fff transparent #fff transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* WHITE MODE CLASSES */
.invert {
    filter: invert(1);
}

.desaturate:disabled {
    filter: saturate(.1);
}

.light-icon.bi-card-text-strike {
    background: url("img/card-text-strike-light.svg");
}

/* WHEN DONE DROPDOWN */
.dropdown-menu {
    background-color: var(--secondary-bg-color);
    border: solid 1px var(--tertiary-bg-color);
}

.dropdown-item {
    color: var(--font-color);
    padding: .25rem 0 !important;
}

.dropdown-item:hover, .dropdown-item:active {
    background-color: var(--secondary-bg-color) !important;
    color: var(--font-color) !important;
}

.dropdown-menu {
    padding: 2px !important;
}

.dropdown-divider {
    border-color: var(--tertiary-bg-color);
    margin: 2px 0 !important;
}

.dropdown-selected:after {
    margin-left: 1.5rem;
    content: "✓";
    color: var(--font-color);
}

.dropdown-toggle:focus, .dropdown-toggle:hover, .dropdown-toggle:active  {
    background-color: var(--secondary-bg-color) !important;
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    background-color: transparent;
}

::-webkit-scrollbar {
    width: 12px;
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
    background-color: var(--scroll-bar-color);
}

