* {
    box-sizing: border-box;
}

body {
    font-family: 'Verdana', sans-serif;
    margin: 0;
    padding: 0;
    background: radial-gradient(circle, #97ADC1, #E1E6EB);
    color: #333;
}

.banner {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    padding: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.banner .logo {
    width: 64px;
    height: 64px;
    margin-right: 20px;
}

.banner h1 {
    font-family: 'Verdana', sans-serif;
    font-weight: normal;
    color: #0E2841;
    margin: 0;
}

.jurais {
    color: #0E2841;
}

.ai {
    color: #4E95D9;
}

.main-container {
    display: flex;
    width: 100%;
    height: calc(100vh - 100px); /* Adjust according to the banner height */
}

.column {
    flex: 0 0 auto;
    height: 100%;
    transition: width 0.3s ease;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    row-gap: 20px;
}

.left {
    width: 0;
}

.middle {
    width: 100%;
    padding: 10px;

}

.right {
    width: 0;
}

.left.expanded {}

.middle.expanded {
    width: 75%;
}

.right.expanded {
    width: 25%;
    padding: 10px;
}

/*.container, .results-list-container, .active-result-container {*/
.container {
    background: #f5f5f5;
    padding: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #333;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

.section {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

.section-title {
    flex: 0 0 auto;
    display: block;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: left;
}

.section-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

.section-footer {
    flex: 0 0 auto;
    min-height: 0;
    max-height: 100%;
}

.textarea-wrapper, .related-text-container {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.related-text-container {
    overflow-y: auto;
}

.textarea-wrapper > .highlighted-text {
    overflow-y: auto;
}

#storyInput, .highlighted-text {
    width: 100%;
    height: 100%;
    padding: 10px;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: transparent;
    color: #333;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.5;
    box-sizing: border-box;
    resize: none;
    position: absolute;
    top: 0;
    left: 0;
    text-align: left;
    white-space: pre-wrap;
}

.related-text-container>.highlighted-text {
    background: #f5f5f5;
}

#storyInput {
    z-index: 1;
}

.highlighted-text {
    z-index: 0;
    pointer-events: none;
    /*visibility: hidden;*/
    display: none;
}

.highlighted-text.visible {
    /*visibility: visible;*/
    display: block;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #0E2841;
    color: #f5f5f5;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Verdana', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #4E95D9;
}

#spinner {
    display: none;
    position: fixed;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-top-color: #4E95D9; /* Matches the button hover color */
    border-radius: 50%;
    animation: spin 1s infinite linear;
    z-index: 9999;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#results-list {
    overflow-y: auto;
    max-height: 100%;
}

.result-list-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: -7px;
    width: 100%;

}

.result-list-item-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.lock-icon {
    font-size: xx-small;
    margin-right: 5px;
    visibility: hidden;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-style: normal;
}

.lock-icon::before {
    content: "\f023";
}

.lock-icon.visible {
    visibility: visible;
}

.related-doc-title {
    font-weight: normal;
    font-size: 14px;
    text-align: left;
    margin-bottom: 0;
}

.related-doc-cite-as {
    font-weight: normal;
    font-size: 10px;
    color: slategrey;
    text-align: left;
    margin-top: -1px;
}

.match-strength {
    height: 5px;
    width: 100%;
    border-radius: 4px;
    margin-top: -9px;
}

.match-strength.positive {
    background-color: #4E95D9;
}

.match-strength.negative {
    background-color: #FF0000;
}

.match-strength-score {
    font-weight: normal;
    font-size: 10px;
    text-align: left;
    margin-bottom: -3px;
}

.match-strength-score.positive {
    color: #4E95D9;
}

.match-strength-score.negative {
    color: #FF0000;
}

.result-header {
    display: flex;
}

.result-header > .left {
    width: 90%;
    flex: 1 1 auto;
}

.result-header > .right {
    width: 10%;
    flex: 1 1 auto;
}


/* Beginning the middle result container thing */
.linked-title a {
    text-decoration: none;
    color: darkblue;
    font-size: 16px;
    font-weight: bold;
}

.linked-title a:hover {
    text-decoration: underline; /* Optional: Add underline on hover for better accessibility */
}

.linked-title {
    font-size: 10px;
    font-weight: normal;
}

.cite-as, .as-of, .official {
    font-weight: normal;
    font-size: 10px;
    align-self: flex-end;
}

.cite-as {
    flex-basis: 100%;
}

.false {
    color: darkred;
    text-decoration: line-through;
}

.true {
    color: green;
}

.active-result-container {
    margin-top: 20px;
    display: none;
}

.related-text-container.visible, .active-result-container.visible {
    display: block;
}

.related-text {
    background-color: #fff; /* Make the background opaque */
    z-index: 0; /* Base z-index */
}

.related-text.visible {
    z-index: 1; /* Default z-index for visible items */
}

.slider-container {
    margin-top: auto;
    text-align: center;
}

#highlightSlider {
    width: 80%;
    margin: 0 auto;
    display: block;
}

:root {
    --highlight-cutoff: 75; /* Default cutoff */
    --highlight-multiplier: 1; /* Default multiplier */
    --highlight-color: 255, 255, 0;
    --base-opacity: 100;
}

.highlight {
    transition: opacity 0.3s ease;
    --opacity: calc((25 + (75 * (var(--base-opacity) - var(--highlight-cutoff)) / (100 - var(--highlight-cutoff)))) * ((max(1, var(--base-opacity) / var(--highlight-cutoff)) - 1 ) / ((var(--base-opacity) / var(--highlight-cutoff)) - 1) / 100));
    background: rgba(var(--highlight-color), var(--opacity));
}

#status-indicator {
    position: fixed;
    bottom: 2px;
    left: 10px;
    padding: 3px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 11px;
    font-weight: bold;
    color: white;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.ai-off {
    background-color: #FF4D4D;
}

.ai-yellow {
    background-color: #FFD700;
}

.ai-green {
    background-color: #4CAF50;
}

.hidden {
    display: none;
}