/* Light and dark mode colors */
:root { 
    --diff-background: #fdd;
    --word-diff-highlight-bg: rgba(255,255,0,0.5);
    --selected-word-diff-bg: rgb(255,165,0);
    --highlight-word: rgba(255,165,0,0.5);
    --active-border-color: red;
}
.dark-mode { 
    --diff-background: #3d1117;
    --word-diff-highlight-bg: rgba(255,255,0,0.4);
    --selected-word-diff-bg: rgba(255,180,0,0.8);
    --highlight-word: rgba(255,165,0,0.5);
    --active-border-color: red;
}   

.btn {
    justify-content: center;
    font-size: 0.85rem; 
}

.btn-rounded-top {
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

.btn-rounded-bottom {
    border-radius: 0 0 0.5rem 0.5rem !important;
}

.btn-group {
    display: flex;
    overflow: hidden;
}

#compression-settings-col {
    background-color: var(--accent-200);
    border-radius: 10px;
}

textarea {
    height: 270px;
}

.unpadded-container {
    padding-left: 0;
    padding-right: 0;
}

.diff-checker {
    margin-top: 1rem;
}

.diff {
    background-color: var(--diff-background); /* Light red background for lines with differences */
    border-radius: 5px;
    margin-bottom: 1px;
    transition: transform 200ms ease-in-out;
}


.diff-input {
    resize: none;
    white-space: pre-wrap; 
    word-wrap: break-word; 
}

/* Container to hold both text displays side by side */
.comparison-container {
    display: flex;
    justify-content: space-between;
}


#result {
    min-height: 80vh;
    margin-bottom: 2rem;
    font-family: monospace;
}

/* Highlight added text */
.added {
    background-color: #d4fcbc;
}

/* Highlight removed text */
.removed {
    background-color: #fbb6c2;
}

.lines-container {
    border: 1px solid #ccc;
    padding: 10px;
    max-height: 600px;
    overflow-y: scroll;
    color: var(--text);
}

.line {
    display: flex;
    padding: 5px 0;
}

.chunk1, .chunk2 {
    width: 45%;
    padding: 0 5px;
}

.line1, .line2{
    width: 45%;
    padding: 0 5px;
    display: inline-block;
    word-wrap:break-word;
}

.line-number{
    width: 10%;
    padding: 0 5px;
}
.chunk1-header, .chunk2-header {
    font-weight: bold;
    width: 45%;
    padding: 0 5px;
}

.line-number-header {
    font-weight: bold;
    width: 10%;
    padding: 0 5px;

}

.detail-container {
    margin-top: 20px;
    overflow-x: auto;
    padding-bottom: 2rem; /* Add padding at the bottom */
}

.detail-line {
    /* display: flex; */
    /* flex-wrap: wrap; */
    display: inline-block;
    align-items: center;
    white-space: nowrap;
}

.highlight {
    background-color: var(--highlight-word);
}

.detail-line span {
    display: inline-block; /* Ensure spans are treated as inline blocks */
    text-align: center;    /* Align numbers properly */
    width: 3ch;            /* Set width for consistent alignment (adjust based on number size) */
    font-family: monospace; /* Use a fixed-width font */
}

.index-span {
    font-weight: bold;
    width: 3ch; /* Ensure consistent width with the number spans */
    text-align: center;
}

.word-diff-highlight {
    background-color: var(--word-diff-highlight-bg);
}

.selected-word-diff {
    background-color: var(--selected-word-diff-bg);
}

.line.diff.active {
    border-style: solid;
    border-color: var(--active-border-color);
}

.active-word {
    border-style: solid;
    border-color: var(--selected-word-diff-bg);
}

.diff-container {
    border: 1px solid var(--text);
    border-radius: 10px;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    overflow-wrap: break-word;
    margin-bottom: 2rem;
}

.ace-editor {
    color: var(--text);
    background-color: var(--background-50);
    border-radius: 10px;
    height: 270px;
}

.ace-editor .ace_cursor {
    color: var(--text);
}

.ace-editor:not(:focus-within) .ace_cursor {
    opacity: 0 !important;
}

.ace-editor .ace_placeholder {
    color: gray;
}

.nav-container {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.butn, .nav-button{
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    transition: all 200ms ease-in-out;
    box-shadow: none;
    border: none;
    margin-top: 4px;
}

.butn:hover, .nav-button:hover {
    transform: translateY(-1px);
}

.file-input input[type="file"] {
    display:none;
}

.diff-container-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.diff-warning {
    background-color: rgb(255, 245, 205);
    border-style: solid;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    color: black;
}