:root {
    --text-color: #000000;
    --secondary-text-color: #888888;
    --accent-color: #5A56E0;
    --shared-color: #2E8B57;
    --destructive-color: #a83c3c;
    --button-color: lightgrey;
    --card-bg-color: #F5F5F5;
    --light-border: #D9DCDF;
}

html {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    background-color: #EDEDED;
    background-image: url("/static/img/background.svg");
    background-size: 100vw 100vh;
    background-repeat: no-repeat;
    /*background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");*/
}

body {
    margin-top: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
}

fieldset {
    padding: 0;
    border: 0 !important;
}

.banner {
    display: none;
    background-color: var(--card-bg-color);
    padding: 10px;
    color: var(--text-color);
    border: 2px solid var(--accent-color) !important;
    z-index: 100;
}

.banner button {
    display: block;
    margin: auto;
}

.auto-width {
    width: auto !important;
}

.note-text {
    font-size: small;
    font-style: italic;
}

.accent-btn {
    background-color: var(--accent-color);
    color: white;
}

.destructive-btn {
    background-color: var(--destructive-color);
    color: white;
}

.success-btn {
    background-color: var(--shared-color);
    color: white;
}

.accent-icon {
    cursor: pointer;
    filter: invert(33%) sepia(57%) saturate(4505%) hue-rotate(232deg) brightness(96%) contrast(95%) !important;
}

.shared-icon {
    cursor: pointer;
    filter: invert(41%) sepia(14%) saturate(5662%) hue-rotate(86deg) brightness(95%) contrast(78%) !important;
}

.secondary-icon {
    cursor: pointer;
    filter: invert(50%) !important;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: initial;
}

.bordered-box {
    border: 1px solid var(--secondary-text-color);
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
}

.accent-hr {
    color: var(--accent-color) !important;
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
}

.selected-link {
    text-decoration: underline;
}

.selected-page {
    border-bottom: 2px solid var(--text-color) !important;
    border-radius: 0 !important;
}

.centered-text {
    text-align: center;
}

.right-aligned-text {
    text-align: right;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.grid-2-col > * {
    padding: .5rem;
}

#upload-content-div, #upload-text-row, #upload-file-row {
    height: 100%;
}

.break-words {
    word-break: break-all;
}

.align-items-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.align-items-right button {
    margin-left: 5px;
}

* {
    color: #000000;
    border-color: #ededed !important;
    border-radius: 5px;
}

.full-width {
    width: 100%;
}

.full-height {
    height: 100%;
}

.display-block {
    display: block;
}

a .disabled {
    pointer-events: none;
    cursor: default;
}

button {
    cursor: pointer;
}

textarea {
    min-height: 50px;
    font-size: medium;
}

progress {
    border-radius: revert !important;
    border-color: revert !important;
    width: 100%;
    accent-color: var(--accent-color);
}

.progress-spinner {
    margin-right: 5px;
    -webkit-transform-origin: 50% 50%;
    -moz-transform-origin: 50% 50%;
    -o-transform-origin: 50% 50%;
    transform-origin: 50% 50%;
    animation-name: spin;
    animation-duration: 1000ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

@-moz-keyframes spin {
    from { -moz-transform: rotate(0deg); }
    to { -moz-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
    from { -webkit-transform: rotate(0deg); }
    to { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
    from {transform:rotate(0deg);}
    to {transform:rotate(360deg);}
}

.small-icon {
    cursor: pointer;
    height: 23px;
    z-index: -10;
    padding-bottom: 2px;
}

.center-container {
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
    width: 100vw;
}

#center-div, #nojs-div {
    width: 85vw;
    max-width: 800px;
    max-height: 87vh;
    overflow-y: auto;
    border-radius: .66rem;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 12px 18px 2px rgba(34,0,51,.04),0 6px 22px 4px rgba(7,48,114,.12),0 6px 10px -4px rgba(14,13,26,.12);
}

dialog {
    min-width: 200px;
    max-width: 450px;
    border: 0;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.25);
}

details {
    cursor: default;
    margin: 10px;
}

h1, h3 {
    margin: 0;
}

details:after {
    content: ' ';
    display: block;
    border: 0.5px dashed;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}

summary {
    cursor: pointer;
    font-weight: bold;
    padding-bottom: 10px;
}

input {
    margin: 5px;
    max-width: 250px;
}

input:is([type="number"], [type="password"], [type="text"]) {
    background-color: transparent;
    border: 1px solid;
    padding: 5px;
    font-size: medium;
}

button, input:is([type="button"], [type="submit"]) {
    background-color: var(--accent-color);
    border: 0;
    padding: 10px;
    font-size: medium;
    color: white;
}

button, input:is([type="button"], [type="reset"]) {
    background-color: var(--button-color);
    border: 0;
    padding: 10px;
    font-size: medium;
    color: black;
}

.red-button {
    background-color: var(--destructive-color);
    color: white;
}

input[type=submit]:disabled,
button:disabled {
    background-color: darkgrey;
    color: #212121;
    cursor: default;
}

input[type='radio'] {
    accent-color: var(--accent-color);
}

div {
    background-color: #ffffff;
}

.secondary-text {
    color: var(--secondary-text-color);
}

.hidden {
    display: none !important;
}

.no-margin {
    margin: 0;
}

.no-top-margin {
    margin-top: 0;
}

.no-left-margin {
    margin-left: 0;
}

.visible {
    display: revert !important;
}

.vert-align-sub {
    vertical-align: sub;
}

.vert-align-bottom {
    vertical-align: bottom;
}

#messages {
    display: none;
}

#messages #error-message {
    color: red;
}

#messages #success-message {
    color: green;
    font-weight: 500;
}

.important-message {
    display: inherit !important;
}

input:disabled+label {
    color: gray;
}

input:disabled, textarea:disabled {
    background-color: lightgrey;
    color: grey;
}

.yeetfile-logo {
    max-width: 200px;
    content: url("/static/img/yeetfile-logo.png");
}

.red-icon {
    cursor: pointer;
    filter: invert(29%) sepia(8%) saturate(5464%) hue-rotate(315deg) brightness(106%) contrast(95%) !important;
}

.flipped-icon {
    cursor: pointer;
    padding-right: 0 !important;
    padding-left: 5px;
    transform: rotate(180deg);
}

.accent-link {
    color: var(--accent-color) !important;
    cursor: pointer;
}

.red-link {
    color: var(--destructive-color) !important;
    text-decoration: none;
    cursor: pointer;
}

.red-text {
    color: var(--destructive-color) !important;
}

.green-text {
    color: var(--shared-color) !important;
}

.no-underline {
    text-decoration: none !important;
}

.slightly-bold-text {
    font-weight: 500;
}

.header * {
    background-color: transparent;
    max-height: 63px;
}

.header {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100vw;
    min-height: 63px;
    background-color: transparent;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 65px;
    width: 100vw;
    min-height: 63px;
    background-color: transparent;
}

.footer-elements {
    display: flex;
    align-items: center;
    background-color: transparent;
    padding-right: 25px;
}

.footer-column {
    flex-direction: column;
}

.footer-row {
    flex-direction: row;
}

.footer-row a {
    margin-left: 20px;
    font-weight: 500;
    text-decoration: none;
}

.footer img {
    width: 50px;
    height: 50px;
}

.small-text {
    font-size: small;
}

.header a {
    margin-right: 20px;
    font-weight: 500;
    text-decoration: none;
}

.left {
    float: left;
}

.right {
    float: right;
}

.hr-light {
    color: var(--light-border);
}

.half-hr {
    width: 50%;
    margin-left: 0;
}

.italic {
    font-style: italic;
}

.padding-top-5 {
    padding-top: 5px;
}

.padding-bottom-5 {
    padding-bottom: 5px;
}

.padding-right-5 {
    padding-right: 5px;
}

.padding-left-3 {
    padding-left: 3px;
}

.padding-left-20 {
    padding-left: 20px;
}

@media (prefers-color-scheme: dark) {
    :root {
        /*--accent-color: #a1a125;*/
        /*--button-color: #171720;*/
        --button-color: #242333;
        --destructive-color: #D04D4D;
        /*--card-bg-color: #171720;*/
        --card-bg-color: #242333;
        --shared-color: #3EB974;
        --text-color: #ffffff;
        --secondary-text-color: #aaaaaa;
    }

    input:disabled {
        background-color: darkgray !important;
    }

    input {
        background-color: #242333 !important;
    }

    html {
        background-color: #242333;
        background-image: url("/static/img/background-dark.svg");
        /*filter: invert(90%);*/
        /*-webkit-filter: invert(90%);*/
    }

    textarea {
        background-color: #242333;
        border: 1px solid #171720 !important;
        color: white;
    }

    textarea:disabled {
        background-color: darkgray;
    }

    select {
        color: #171720;
    }

    dialog {
        background: #312f43;
    }

    dialog::backdrop {
        background-color: rgba(0, 0, 0, 0.45);
    }

    * {
        border-color: #242333 !important;
        color: #ffffff;
    }

    button, input:is([type="button"], [type="submit"]) {
        color: white !important;
        cursor: pointer;
    }

    #center-div {
        /*box-shadow: 0 12px 18px 2px rgba(0,0,0,.04),0 6px 22px 4px rgba(0,0,0,.12),0 6px 10px -4px rgba(0,0,0,.12);*/
        box-shadow: none;
        border: 3px solid;
        background-color: #312F43;
    }

    button, input:is([type="button"], [type="reset"]) {
        color: white;
    }

    div {
        background-color: #312F43;
    }

    .yeetfile-logo {
        filter: invert(100%);
    }

    .selected-page {
        border-bottom: 2px solid white !important;
        border-radius: 0 !important;
    }

    .small-icon {
        filter: invert(100%);
    }
}

@media (orientation: portrait) {
    #center-div {
        width: 95vw !important;
        max-height: 82vh !important;
        margin-top: 0;
    }
}

@media (max-width:768px) {
    .grid-2-col {
        display: block;
    }

    .mobile-only {
        display: initial;
    }

    .desktop-only {
        display: none;
    }

    fieldset {
        padding-left: 0;
        padding-right: 0;
    }

    .yeetfile-logo {
        content: url("/static/img/yeetfile-icon.png");
    }

    #meddlehead-link {
        display: none;
    }
}

@media (max-width:425px) {
    .grid-2-col > * {
        padding-left: 0;
    }
}
