@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css");
@import url("https://unpkg.com/dropzone@5/dist/min/dropzone.min.css");

.bi {
    font-size: 1.5em;
}

body {
    --main-bg-color: #2E3D73;
    --main-text-on-bg-color: #FFFFFF;
    --secondary-text-on-bg-color: #B2B9DC;

    --main-text-color: #5462AC;
    --main-text-size: 1.2em;
    --main-text-weight: 500;
    --main-text-family: 'IBM Plex Sans', sans-serif;

    --secondary-text-color: #2E3D73;
    --secondary-text-size: 1.2em;
    --secondary-text-weight: 800;
    --secondary-text-family: 'IBM Plex Sans', sans-serif;

    --box-shadow: unset;
    --box-shadow-hover: inset 0 0 10px 0 rgba(0, 0, 100, 0.3);
    --box-shadow-label-hover: inset 0 0 5px 0 rgba(0, 0, 100, 0.3);
    --box-color: var(--main-text-color);
    --box-color-hover: var(--secondary-text-color);
    --box-background: transparent;
    --box-background-hover: rgba(72, 255, 0, 0.21);
    --box-border-color: var(--main-text-color);
    --box-border-color-hover: var(--secondary-text-color);
    --box-border-radius: 10px;
    --box-border-width: 2px;
    --box-border-width-hover: 2px;
    --box-border-style: solid;
    --box-border-style-dropzone: dashed;
    background: var(--main-bg-color);
    color: var(--main-text-color);

    --header-and-footer-side-margins: max(2em, 2.5%);
    --header-and-footer-top-margin: 0;
    --header-and-footer-bottom-margin: 0;
}

.main {
    color: var(--main-text-color);
    font-size: var(--main-text-size);
    font-weight: var(--main-text-weight);
    font-family: var(--main-text-family);
}

.secondary {
    color: var(--secondary-text-color);
    font-size: var(--secondary-text-size);
    font-weight: var(--secondary-text-weight);
    font-family: var(--secondary-text-family);
}

.topnav {
    /*margin: 5em 2em 0 5em;*/
    margin: var(--header-and-footer-top-margin) var(--header-and-footer-side-margins) var(--header-and-footer-bottom-margin) var(--header-and-footer-side-margins);
    margin-top: 1em;
    display: inline-flex;
    color: var(--main-text-on-bg-color);
    align-items: center;
    /*overflow: hidden;*/
    /*position: relative;*/
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 875px;
    width: 90%;
    /*width: 875px;*/


    .description {
        font-weight: 800;
        font-size: 1.5em;
        max-width: 20em;
        align-self: flex-start;
        height: 70%;
    }

    h1 {
        display: inline-flex;
        align-self: center;
        min-height: fit-content;
        height: 80%;
        font-size: 3rem;
    }
}

.separator {
    /*border-left: 1em solid #FFFFFF;*/
    /*height: fit-content;*/
    border: .1em solid #FFFFFF;
    width: .1em;
    height: 2.5em;
    position: relative;
    margin: 0 10px;
}

main {
    display: flex;
    justify-content: space-evenly;
    min-height: 70svh;
    color: var(--main-text-color);
    padding: 0 1em;
    align-items: stretch;
    /*min-width: calc(210px * 4.5);*/
}

.rectangle {
    flex-grow: 1;
    margin-left: .5%;
    margin-right: .5%;
    margin-top: 1em;
    width: 20%;
    /*height: 70vh;*/
    min-height: 40svh;
    border-radius: 9px;
    background: #FFF;
    max-width: max(20%, 800px);
    padding: 1em 1em 2em;
}

.number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #B2B9DC;
    word-wrap: break-word

}

footer {
    margin: var(--header-and-footer-top-margin) var(--header-and-footer-side-margins) var(--header-and-footer-bottom-margin) var(--header-and-footer-side-margins);
}


.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 10vh;
    background: var(--main-bg-color);
    color: var(--main-text-on-bg-color);
}

.card-title {
    margin: .5em;
}

.fourth-rectangle-button-no-hover,
.fourth-rectangle-button {
    background: var(--box-background);
    color: var(--box-color);
    border: var(--box-border-width) var(--box-border-style) var(--box-border-color);
    box-shadow: var(--box-shadow);
    border-radius: var(--box-border-radius);

    padding: 2em 2em;
    font-size: var(--main-text-size);
    font-weight: var(--secondary-text-weight);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 15rem;
    width: 15rem;
    margin: auto;

    * {
        margin: .5em 0
    }

    .idle {
        display: block;
    }

    .active {
        display: none;
    }
}


.fourth-rectangle-button:hover {
    /*background: var(--box-background-hover);*/
    color: var(--box-color-hover);
    border: var(--box-border-width-hover) var(--box-border-style) var(--box-border-color-hover);
    box-shadow: var(--box-shadow-hover);
    /*background: radial-gradient(circle at center, transparent 0%, transparent 30%, var(--box-background-hover) 100%);*/
    /*background-image: url("https://www.vhv.rs/dpng/d/485-4857747_easter-duck-knife-plush-cute-yellow-pastel-murder.png");*/
    /*background-position: center;*/
    /*background-size: contain;*/
    /*background-repeat: no-repeat;*/
    /*.idle {*/
    /*    display: none;*/
    /*}*/

    /*.active {*/
    /*    display: block;*/
    /*}*/
}

.fourth-rectangle-button:active {
    background: var(--box-background);
    color: var(--box-color);
    border: var(--box-border-width-hover) var(--box-border-style) var(--box-border-color);
    box-shadow: var(--box-shadow);

    .idle {
        display: block;
    }

    .active {
        display: none;
    }
}

.fourth-rectangle-button-no-hover {
    cursor: not-allowed;
}

.download-link:hover {
    text-decoration: none;
}

.left-hand {
    margin: 0 .03em 0 0;
}

.right-hand {
    margin: 0 0 0 .03em;
}

.mail {
    color: var(--main-text-on-bg-color);
}

.mail:hover,
.actual-mail {
    color: var(--secondary-text-on-bg-color);
}

.pretty-link {
    color: var(--secondary-text-on-bg-color);
    text-decoration: none;
}

.pretty-link:hover {
    color: var(--main-text-on-bg-color);
    text-decoration: underline;
}

.link-light-bg {
    color: var(--secondary-text-color);
    text-decoration: none;
}

.link-light-bg:hover {
    color: var(--secondary-text-color);
}

.switch {
    cursor: pointer;
    color: var(--main-text-color);
    width: fit-content;
    min-height: 2.3em;
    font-size: 1em;
    text-size-adjust: 100%;
    border-radius: 1rem;
    min-width: 100%;
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: transparent;
    border: var(--box-border-width) var(--box-border-style) var(--box-border-color);
    padding: .375rem .75rem;
    line-height: 1.5;
    /*transition: color .01s ease-in-out, background-color .01s ease-in-out, border-color .01s ease-in-out, box-shadow .01s ease-in-out;*/

    input {
        display: none;
    }
}

.switch:hover {
    background: var(--box-background);
    color: var(--box-color-hover);
    border: var(--box-border-width-hover) var(--box-border-style) var(--box-border-color);
    box-shadow: var(--box-shadow-label-hover);
}


.switch:active,
.switch:has(input:checked) {
    background: var(--main-bg-color);
    color: var(--main-text-on-bg-color);
}

.formats-container {
    display: block;
    justify-content: space-evenly;
    align-items: center;
    color: var(--main-text-color);
    margin-left: 2em;
}

.label {
    display: flex;
    justify-content: space-between;
}

.label-and-popover {
    width: 100%;
    display: flex;
    justify-content: space-between;
    /*padding-left: 10%;*/
}

.tooltip-trigger {
    width: 50%
}

.tooltip-content {
    background: #333;
    color: white;
    font-weight: bold;
    padding: 4px 8px;
    font-size: var(--main-text-size);
    border-radius: 4px;
    visibility: hidden;
    max-width: 20em;
    text-align: center;
    position: relative;
    transition: visibility .6s ease-out, opacity .5s ease-out;
    /*display: none;*/
    opacity: 0;
}

.tooltip-content[data-show] {
    visibility: visible;
    z-index: 999;
    /*display: block;*/
    opacity: 1;
}

.arrow,
.arrow::before {
    position: absolute;
    width: 8px;
    height: 8px;
    background: inherit;
}

.arrow {
    visibility: hidden;
}

.arrow::before {
    visibility: visible;
    content: '';
    transform: rotate(45deg);
    transition: visibility .1s ease-out, opacity .5s ease-out;
}

.logo {
    width: calc(var(--secondary-text-size) * 1.2);
    height: calc(var(--secondary-text-size) * 1.2);
}

.content-image {
    /*width: calc(var(--secondary-text-size) * 1.2);*/
    /*height: calc(var(--secondary-text-size) * 1.2);*/
    font-size: 1.9em;
}

.content-image::before {
    display: block;
    padding-top: 0;
}


.tooltip-content[data-popper-placement^='top'] > .arrow {
    bottom: -10px;
}

.tooltip-content[data-popper-placement^='bottom'] > .arrow {
    top: -10px;
}

.tooltip-content[data-popper-placement^='left'] > .arrow {
    right: -10px;
}

.tooltip-content[data-popper-placement^='right'] > .arrow {
    left: -10px;
}

.footer {
    font-size: var(--secondary-text-size);
    font-weight: 600;
    /*margin: 1em;*/
    text-wrap: pretty;
    word-break: keep-all;
    align-self: center;
    justify-content: space-between;
    display: flex;

    * {
        margin: .5em;

        * {
            margin: .2rem;
        }
    }
}

.footer-credits {
    text-align: right;
    display: inline-flex;
}

.dropzone {
    min-height: 30svh;
    max-height: 50svh;
    border: var(--box-border-width) var(--box-border-style-dropzone) var(--box-border-color);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    overflow: hidden;
    overflow-y: auto;

    .dz-message {
        font-size: 1.5em;
        font-weight: 800;
        /*color: rgb(var(--main-text-color) calc(r * .7) calc(g * .7) calc(b * 1.75));*/
        color: var(--main-text-color);
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        min-height: 50%;
    }

    .dz-preview {
        margin: .5em !important;

        .dz-image {
            background: var(--secondary-text-on-bg-color) !important;
            width: 100px !important;
            height: 100px !important;
        }

        .dz-details {
            padding: 1.2em 1em;
            line-height: 200%;
            color: var(--secondary-text-color) !important;

            span {
                color: var(--secondary-text-color) !important;
                /*background-color: rgba(255, 255, 255, 0.1) !important;*/
            }
        }

        /*.dz-success-mark {*/
        /*    opacity: 1;*/
        /*    visibility: visible;*/
        /*    !*transition: none;*!*/
        /*    !*animation: none;*!*/
        /*    svg {*/
        /*        height: 20px;*/
        /*        width: 20px;*/
        /*    }*/
        /*}*/

        /*.dz-error-mark {*/
        /*    opacity: 1;*/
        /*    visibility: visible;*/
        /*    !*transition: none;*!*/
        /*    !*animation: none;*!*/
        /*    svg {*/
        /*        height: 20px;*/
        /*        width: 20px;*/
        /*    }*/
        /*}*/
    }
}

.dropzone:hover {
    border: var(--box-border-width-hover) var(--box-border-style-dropzone) var(--box-border-color-hover);
    color: var(--box-color-hover);
    box-shadow: var(--box-shadow-hover);

}

.dropzone.dz-started {
    border: var(--box-border-width-hover) var(--box-border-style-dropzone) var(--box-border-color-hover);
    color: var(--box-color-hover);
    display: block;
}


.params-button-container {
    padding: 0;
    margin: .5em 0 0 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    vertical-align: middle;
}

.params-button {
    font-size: 2.2em;
    cursor: pointer;
    height: 100%;
    vertical-align: middle;
}

.params-button:active,
.params-button:hover {
    color: var(--secondary-text-color);
}


.modal {
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    overflow: auto;
    background-color: rgb(0, 0, 0); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
    /*flex-wrap: wrap;*/
    /*border: #000 3px solid;*/
    /*border-width: 1px;*/
    /*border-style: double;*/
    /*border-image: linear-gradient(to right, #FFF, #000) 1;*/
}

.modal[open] {
    position: fixed;
    display: flex;
}

.modal-content {
    background: #FFF;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: fit-content;
    max-width: 45%;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-height: 90%;
    overflow-y: scroll;
    overflow-x: hidden;
    text-wrap: auto;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 100%;
    max-width: 100%;
    border-radius: 10px;
}

.see-help {
    margin: .3em 0;
}

.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.help-container {
    display: none;
}

.outils-du-ceres {
    border-radius: 15px;
    vertical-align: center;
    padding: .5em 1em;
    text-decoration: none;
    border: var(--box-border-width-hover) var(--box-border-style) var(--box-border-color-hover);
}

.outils-du-ceres:hover {
    text-decoration: none;
    border: var(--box-border-width-hover) var(--box-border-style) var(--box-border-color);
}


@media screen and (max-width: 901px) {
    .topnav {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        max-width: 100%;

        .description {
            align-self: center;
            height: 70%;
            text-align: center;
        }
    }

    .separator {
        display: none;
    }
}

@media screen and (max-width: 1400px) {
    main {
        flex-wrap: wrap;
    }

    .rectangle {
        min-width: 500px;
    }

    .footer {
        font-size: calc(var(--secondary-text-size) * 0.8);
    }
}

@media screen and (max-width: 1300px) {
    .rectangle {
        min-width: 400px;
    }
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
    animation: spinner-border 1.5s linear infinite;
}

.spinner-border-ceres {
    font-size: 0;
    width: 6rem;
    height: 6rem;
    animation: spinner-border 3s linear infinite;
    background-image: url('/static/logo_ceres.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

.spinner-border-pedro {
    width: 6rem;
    height: 6rem;
    animation: spinner-border 3s linear infinite;
    background-image: url('/static/pedro.png');
    background-size: contain;
}

.restore-modal-buttons-container {
    margin-top: 1em;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    align-items: center;
    gap: 1em;
}
