@font-face {
    font-family: "Montserrat";
    src: url("fonts/Montserrat-VariableFont_wght.ttf") format("truetype supports variations"),
        url("fonts/Montserrat-VariableFont_wght.ttf") format("truetype-variations"),
        url("fonts/Montserrat-Italic-VariableFont_wght.ttf") format("truetype supports variations"),
        url("fonts/Montserrat-Italic-VariableFont_wght.ttf") format("truetype-variations");
    font-weight: 100 1000;
}

:root {
    --bg-color: #ffffff;
    --shadow-color: #ccc;
    --border-color: lightgray;
    --dark-color: #333333;
    --light-color: #efefef;
    --light-hover-color: #dfdfdf;
    --warning-color: #ffa50015;
}

/* To prevent a flash of unstyled content (FOUC), it's often a good practice to add the x-cloak directive.
This ensures that any element with the x-cloak keyword (directive) doesn't flicker on initial page load
before Alpine.js takes effect.
 */
[x-cloak] {
    display: none !important;
}

body {
    font-family: "Montserrat", sans-serif;
    margin: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    color: var(--dark-color);
    background-color: var(--bg-color);
}

#root {
    height: 100%;
    width: 100%;
    box-sizing: content-box;
}

#main {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
    margin: 0 auto;
    box-sizing: content-box;
}


.card {
    border-radius: 8px;
    box-shadow: 0 0 4px var(--shadow-color);
    padding: 16px;
    margin-bottom: 1rem;
    width: 100%;
    display: block;
    box-sizing: border-box;
    overflow: scroll;
    background-color: white;
}

.card.warning {
    background-color: var(--warning-color);
}

.tabs-sidebar h3,
#menu h3 {
    margin: 0;
}

#menu::-webkit-scrollbar,
#formview::-webkit-scrollbar,
.tabs-sidebar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
#menu,
#formview,
.tabs-sidebar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

#menu {
    flex: 1 1 30%;
    padding: 16px;
    border-left: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
}

#info-box {
    overflow: auto;
    flex: 0 1 min-content;
}

.tabs-sidebar {
    position: relative;
    flex: 1 1 25%;
    border-right: 1px solid var(--border-color);
    padding: 0 16px;
    overflow: scroll;
}

.tabs-sidebar p {
    margin: 8px 0;
    color: gray;
    font-size: small;
}

.sidebar-top {
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    padding-top: 16px;
    padding-bottom: 4px;
    z-index: 2;
}

.doi-input button {
    width: 100%;
    margin-bottom: 4px;
}

#formview-container {
    position: relative;
    flex: 1 1 45%;
    margin: 0 16px;
    transform: scale(1);
    height: 100vh;
}

#formview {
    height: 100%;
    overflow: scroll;
    padding: 4px;
}

#formview h2 {
    margin: none;
}

.progressbar-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% + 32px);
    margin-left: -16px;
    height: 4px;
    background-color: lightgray;
    z-index: 1;
}

.progressbar-content {
    height: 100%;
    background-color: var(--dark-color);
    transition: ease-in-out 0.3s;
}

#add-container {
    position: sticky;
    bottom: 0;
    margin-top: 16px;
    padding-top: 16px;
    padding-bottom: 16px;
    text-align: left;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

input[type=text],
input[type=number],
select,
.textbox {
    display: block;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.5rem;
    width: 100%;
    font-size: large;
    box-sizing: border-box;
    background-color: white;
}

label {
    display: block;
    margin-right: 8px;
    margin-bottom: 8px;
}

#formview table {
    width: 100%;
    border-collapse: collapse;
}

#formview table th {
    border-bottom: none;
    padding: 0.25rem 0.5rem;
    text-wrap: nowrap;
}

#formview table tr {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0.5rem;
}

#formview table tr:last-child {
    border-bottom: none;
}

#formview table tbody tr:hover {
    background-color: var(--light-color);
}

#formview table tr td {
    padding: 8px 0;
    text-align: center;
    position: relative;
}

#formview table tr td .tabular-option-info {
    position: absolute;
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    top: -20px;
    text-wrap: nowrap;
    display: none;
}

#formview table tr td input[type=radio]:hover + .tabular-option-info {
    display: block;
}

#formview table tr td:first-child {
    font-weight: bold;
    text-align: left;
}

.indicator-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 4px;
    border-radius: 8px;
}

.indicator-container.selected {
    background-color: #00000010;
}

.indent {
    margin-left: 20px;
    width: 2px;
    background-color: var(--border-color);
    align-self: stretch;
    flex-grow: 0;
    flex-shrink: 0;
}

.indent:nth-child(2) {
    margin-left: 10px;
}

.indent + .indicator-subcontainer {
    margin-left: 10px;
}

.indicator-subcontainer {
    flex-grow: 1;
    position: relative;
}

.indicator-container .indicator-subcontainer div {
    position: relative;
}

.indicator-container .indicator-subcontainer div p {
    align-items: center;
}

.comment-box {
    background-color: var(--dark-color);
}

.comment-box p, .comment-box input {
    margin: 0;
}

.comment-box p {
    color: var(--light-color);
    margin-bottom: 1rem;
}

.comment-box input {
    color: var(--light-color);
    background-color: transparent;
    border: 1px solid var(--light-color);
    border-radius: 8px;
}

.warning-indicator {
    display: inline-block;
    border-radius: 99px;
    width: 12px;
    height: 12px;
    background-color: #ffa500;
}

.warning-text {
    background-color: #fff8ea;
    border: 1px solid #ffa500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-top: 0;
    margin-bottom: 16px;
    transition: 200ms;
    cursor: pointer;
}

.warning-text:hover {
    scale: 1.02;
}

form {
    margin-bottom: 10rem;
}

.top {
    display: flex;
    justify-content: column;
    flex-direction: column; 
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;

}

button {
    font-size: 10pt;
    background-color: var(--light-color);
    border-radius: 4px;
    border: none;
    padding: 0.2rem 0.2rem;
    cursor: pointer;
    font-weight: bold;
    margin: 3px 0px;
    transition: 150ms;
    border: 1px solid #ccc;
}

button:hover {
    background-color: var(--light-hover-color);
}



.title {
    margin-bottom: 8px;
    font-weight: bold;
}

.alignment-horizontal {
    display: flex;
    flex-direction: row;
}

.textbox-container {
    position: relative;
}

.wordcount {
    color: gray;
    border-radius: 99px;
    font-size: 10pt;
    margin: 0;
    text-align: right;
}

.wordcount-ok {}

.wordcount-warning {
    color: darkred;
    font-weight: bold;
}

.tab,
.add-button {
    font-size: 11pt;
    background-color: var(--light-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 10px;
    cursor: pointer;
    border: 1px solid #ccc;
}

.tab:hover:not(.active),
.add-button {
    background-color: var(--light-hover-color);
}

.tab.active {
    background-color: var(--dark-color);
    color: var(--light-color);
}

.tab.selected {
    background-color: var(--dark-color);
    color: var(--light-color);
}

.tab span {
    pointer-events: none;
}

.tab-delete-menu {
    position: absolute;
    right: 6px;
    top: 6px;
}

.tab-delete-button {
    border-radius: 99px;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    text-align: center;
    line-height: 24px;
    background-color: var(--light-color);
    cursor: pointer;
    transition-duration: 150ms;
    font-weight: bold;
}

.tab-progress-indicator {
    border-radius: 100%;
    width: 8px;
    height: 8px;
    position: absolute;
    bottom: 6px;
    right: 6px;
}

.tab-delete-button:hover {
    transform: scale(1.1);
    background-color: firebrick;
    color: var(--light-color);
}

header {
    border-bottom: 1px solid var(--border-color);
}

#item-info {
    color: gray;
    margin: 0;
}

#item-background-details,
#tip-external-details {
    color: gray;
    margin-top: 1rem;
}

.scoring-details {
    margin-bottom: 0;
}

.scoring-details summary {
    margin-bottom: 0;
}

summary {
    margin-bottom: 8px;
    cursor: pointer;
}

details {
    margin-bottom: 1rem;
}

summary:hover {
    color: var(--dark-color);
}

#menu-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    margin-bottom: 8px;
    color: gray;
}

#menu-tabs span {
    margin: 0 4px;
    cursor: pointer;
}

#menu-tabs span:hover {
    text-decoration: underline;
}

#menu-tabs span.selected {
    font-weight: bold;
}

#warning-box {
    max-height: 40%;
}

#score-box {
    top: 0;
    position: sticky;
    flex-shrink: 0.2;
    max-height: 60%;
}

#score-box .sub {
    margin: 0;
    font-style: normal;
    text-align: center;
}

#score-box p {
    margin-bottom: 0;
}

#score-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

#current-score-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

#overall-score {
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--border-color);
}

#overall-score-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

#score-minmax {
    text-align: center;
    color: gray;
    font-weight: bold;
    margin: 0;
}

#score-percentage,
#overall-score-percentage {
    margin: 0;
    text-align: center;
    font-weight: bold;
    font-size: 24pt;
}

#score-dot {
    margin: 0 0.5rem;
    font-weight: bold;
    font-size: 16pt;
    color: gray;
}

#no-score {
    margin-top: 4px;
    text-align: center;
}

.sub {
    color: gray;
    font-style: italic;
    font-size: 10pt;
    vertical-align: middle;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
}

.tag {
    color: #000000a0;
    font-size: small;
    font-weight: bold;
    background-color: #0000000d;
    padding: 0.125rem 0.5rem;
    border-radius: 99px;
    margin-left: 8px;
    text-align: center;
}

#ro-count-container {
    text-align: center;
    margin-top: 16px;
    margin-bottom: 16px;
}

/* Modal */

/* The Modal (background) */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 2;
    /* Sit on top */
    padding-top: 100px;
    /* Location of the box */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: #33333399;
    backdrop-filter: blur(5px);
}

/* Modal Content */
.modal-content {
    position: relative;
    background-color: white;
    margin: auto;
    padding: 16px;
    padding-top: 0px;
    width: 740px;
    border-radius: 8px;
    box-shadow: 0 0 8px var(--shadow-color);
    max-height: 70vh;
    overflow: auto;
}

#add-modal-continue {
    position: absolute;
    top: 16px;
    right: 16px;
}

.doi-info {
    color: gray;
    margin-bottom: 1rem;
}

.doi-info p {
    text-align: left;
}

.menu-bottom {
    text-align: center;
}

.github-link {
    color: gray;
}

.github-link:hover {
    color: var(--dark-color);
}

.highlight {
    animation: highlight 1s;
    background-color: yellow;
}

dialog {
    border-radius: 8px;
    border: none;
    padding: 16px;
    box-shadow: 0 0 2px var(--shadow-color);
    max-width: 460px;

    position: fixed;
    left: 0;
    right: 0;
    margin: 0 auto;
    top: 25vh;
}

dialog h3 {
    margin: 0;
}

dialog .buttons {
    text-align: center;
}

button.critical {
    background-color: firebrick;
    color: #efefef;
}

button.critical:hover {
    background-color: firebrick;
    color: #efefef;

    /* transform: scale(1.03); */
    box-shadow: 0 0 8px firebrick;
}

@keyframes highlight {
    50% {
        background-color: white;
    }
}

#saving {
    position: fixed;
    top: 1rem;
    right: 0;
    margin-left: auto;
    width: fit-content;
    color: var(--dark-color);
    background-color: var(--light-color);
    border-radius: 8px;
    padding: 8px 16px;
    z-index: 2;
}

.fakelink {
    text-decoration: underline;
    color: gray;
    cursor: pointer;
}

.fakelink:hover {
    color: var(--dark-color);
}

.animate.pop {
    animation: pop 200ms;
}

@keyframes pop {
    0% {
        opacity: 0;
        transform: scale(0.5, 0.5);
    }

    100% {
        opacity: 1;
        transform: scale(1, 1);
    }
}

#mobile {
    display: none;
}

@media (max-width: 840px) {
    #main {
        display: none;
    }

    #info-modal {
        width: 0;
        height: 0;
        display: none;
    }

    #mobile {
        display: block;
        width: 90%;
        margin: 1rem auto;
    }
}

table {
    margin-bottom: 0.5rem;
}

#store-box canvas {
    display: block;
    width: 150px !important;
    height: 150px !important;
}

#legend-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    margin-right: 18px;
  }
  
  .legend-color {
    width: 8px;
    height: 8px;
    display: inline-block;
    margin-right: 5px;
  }
  
  .legend-label {
    font-size: 12px;
  }

.list-item:last-child {
    margin-bottom: 0;
}