@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;400&display=swap');

:root {
    --primary-color: #2563EB;
    --secondary-color: #BFDBFE;
    --navbar-color: #1D4ED8;
    --off-white: #F3F4F6;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;

}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0px;
    position: relative;
}

/* dark mode */

.dark-theme {
    color: white;
    background-color: #1F2937;
}

.dark-theme textarea {
    background-color: #1F2937;
    color: white;
}

.dark-theme .link-primary {
    color: white;
}

/* textarea */

textarea {
    display: block;
    height: 10vh;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--primary-color);
    color: black;
    width: 100%;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    border-top-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    font-size: medium;
}

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


#output-translate {
    min-height: 10vh;
    height: 300px;
    max-height: 400px;
    /* font-family: monospace; */
    text-align: center;
    border-top-right-radius: 1rem;
    border-bottom-left-radius: 1rem;
    overflow: auto;
}

/* container */

.container {
    margin: auto;
    padding: 1rem;


}

.container-center {
    max-width: 800px;
    text-align: center;
}


/* lists */

.list-non-bullet {
    list-style: none;
}

.list-item-inline {
    display: inline;
    margin: 0rem .5rem;
}

/* links */

.link {
    text-decoration: none;
}

.link-primary {
    /* background-color: var(--primary-color); */
    border-radius: 5px;
    background-color: transparent;
    padding: 8px 16px;
    color: var(--primary-color);

    width: fit-content;
    margin: 1rem 0 1rem 0;

    border: 1px solid var(--primary-color);
    cursor: pointer;
}

.link-primary+.link-primary {
    margin-left: 1rem;
}

.link-primary:disabled {
    color: grey;
    border: 1px solid grey;
    cursor: default;
}

.link-secondary {
    border-radius: 5px;
    padding: 8px 16px;
    color: var(--primary-color);

    width: fit-content;
    margin: 1rem 1rem 1rem 0rem;

    border: 1px solid var(--primary-color);
    cursor: pointer;
}

/* footer */

.footer {
    text-align: center;
    background-color: var(--navbar-color);
    padding: 4rem 1rem;
    border-top-right-radius: 1rem;
    border-bottom-left-radius: 1rem;
    /* margin-bottom: 0px; */

}

.footer .footer-header {
    font-weight: bolder;
    color: white;
}

.footer .link {
    color: white;
}

.footer ul {
    padding-inline-start: 0px;
}

/* hero */

.hero {
    padding: 1rem;
}

.hero .hero-img {
    max-width: 80%;
    width: 350px;
    display: block;
    margin: auto;
}

.hero .hero-heading {
    text-align: center;
    margin: 1rem 0rem;
}

.hero .heading-inverted {
    color: var(--primary-color);
}

/* icon */

.icon-dm {
    color: white;
    display: inline;
}

.icon-lm {
    color: white;
    display: none;
}

/* spinner */

.spinner-container {
    position: relative;
    display: inline-block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #2563EB;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Model selector */

.model-selection {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 0.5em;
}

.model-selection label {
    margin-right: 3ch;
}

/* Text info */

#text-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;

    margin-top: -0.5em;
    margin-bottom: 0.5em;
}

.info-label {
    font-size: 0.8em;
    color: #555;
    margin-right: 3ch;
}

/* Batch job creator inputs */

.label+.model-selection {
    justify-content: flex-start;
}

.btn-submit {
    margin-left: auto;
    margin-right: auto;
}

.override-input {
    display: flex;
    flex-direction: column;
}

.override-input input {
    width: 100%;
    max-width: 400px;
    margin-bottom: 1.5em;
}

.extra-job-controls {
    width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1em;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 50px;
    background-color: #e9eaec;
    border-radius: .25rem;
}

.extra-job-controls .model-selection {
    margin-bottom: 1em;
}

.override-check {
    margin-bottom: 0.75em;
}


/* Data source input for batch job creator */
#input-data-source {
    /* width: 60%;
    margin-left: auto;
    margin-right: auto; */
    border: 1px solid var(--primary-color);
}


#job-info {
    max-width: 800px;
    margin: auto;
}

.info-msg {
    text-align: center;
}

#job-logs {
    max-height: 500px;
    overflow: auto;
    text-align: left;
}


.hidden {
    display: none !important;
}



#override-prompt-container {
    text-align: left;
}

#prompt-override-text {
    border: 1px solid #999;
}

body>div:last-child {
    margin-bottom: 3rem;
}

#answer-output,
#references-output,
#sources-output {
    display: block;
    text-align: left;
    font-size: medium;
    overflow: auto;
    max-height: 400px;
}

#answer-output,
#references-output {
    border: 1px solid #999;
    padding: 1rem;
}

#answer-output {
    min-height: 8vh;
}

#sources-output {
    font-size: 0.9em;
    color: #999;
    padding-bottom: 4em;
}

#sources-output a+a {
    margin-left: 1ch;
}

/* #search-output-container {
    box-sizing: border-box;
    max-width: 60%;
    margin: auto;
} */

#search-output-container .label {
    display: block;
}

/* Search */

ul.results-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.results-list li {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    font-size: 15px;
    border: 1px solid #999;
    padding: 0.5em 1em;
}

.results-list li span+span {
    margin-left: 1ch;
}

.results-list .pmc-id {
    flex-shrink: 0;
    width: 110px;
}

.results-list .article-type {
    flex-shrink: 0;
    width: 140px;
}


.results-list .article-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-list .file-name {
    /* flex-shrink: 0; */
    /* width: 500px; */
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-list .drive-id {
    flex-shrink: 0;
    width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-list li+li {
    border-top: 0;
}

.results-list-placeholder {
    font-size: 15px;
    border: 1px solid #999;
    padding: 0.5em 1em;

    color: #999;
    font-style: italic;
    text-align: center;
}

#new-batch-list {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    max-height: 600px;
    overflow: auto;

    margin-top: 0;

    border: 1px solid #999;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Form UI classes */

.utils-container {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 50px;
}

.utils-container:first-of-type {
    margin-top: 0;
}

.title {
    font-size: 20px;
    font-weight: 700;
    color: #444;
}

.subtitle {
    color: #666;
    font-style: italic;
}

.title+.subtitle {
    margin-top: -0.5em;
    margin-bottom: 1.5em;
}

.row-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
}

.row-container>* {
    margin-top: 0;
    margin-bottom: 0;
}

.row-container>*+* {
    margin-left: 1ch;
}

.label {
    font-size: 0.85em;
    color: #555;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.text-input {
    display: block;
    line-height: 1.5;
    padding: 0.25em 1ch;
    color: black;
    font-family: 'Montserrat', sans-serif;
    font-size: medium;
    border: 1px solid #999;
    flex-grow: 1;
}

.error-msg {
    width: fit-content;
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;

    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #cf5c6b;
    border-radius: 0.25rem;
}

.pagination {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    flex-grow: 0;
    flex-shrink: 1;
    list-style: none;

    margin: 0;
    margin-top: 1em;
    padding: 0;
}

.page-link {
    display: block;
    background-color: transparent;
    padding: 4px 8px;
    color: var(--primary-color);
    text-decoration: none;

    border: 1px solid var(--primary-color);
    font-size: 12px;
}

.page-item .page-link {
    border-right: 0;
}

.page-item:first-child .page-link {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.page-item:last-child .page-link {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    border-right: 1px solid;
}

.disabled>.page-link {
    color: grey;
    border-color: grey;
    pointer-events: none;
}

/* Success message */
.success-msg {
    width: fit-content;
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;

    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 0.25rem;
}

.error-msg pre,
.success-msg pre {
    color: #555;
    background-color: #e9eaec;
    border: 1px solid #999;
    padding: 8px 16px;
}