:root {
    --primary: #008841;
    --secondary: #464646;
    --highlight-empty: #ffcccb;
    --highlight-duplicate: #ffff99;
    --disabled: #cccccc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--primary);
    color: white;
    padding: 20px;
    position: fixed;
    height: 100%;
}

.sidebar h1 {
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.sidebar ul li {
    list-style: none;
    margin: 15px 0;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    padding: 10px;
    display: block;
    border-radius: 4px;
    transition: background 0.3s;
}

.sidebar ul li a:hover {
    background: var(--secondary);
}

.content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    background: #f5f6fa;
}

.tool-container {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.CodeMirror {
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px 0;
}

button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}

button:disabled {
    background-color: var(--disabled);
    cursor: not-allowed;
}

button:disabled:hover {
    opacity: 1;
}

#lineResults p {
    margin: 10px 0;
    font-size: 16px;
    color: var(--secondary);
}

.result-container {
    max-width: 550px; /* Increased from 550px to accommodate wider side-by-side layout */
    display: none;
    margin-top: 20px;
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.result-container h3 {
    margin-bottom: 15px;
}

.total-lines {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
    color: var(--primary);
}

.total-lines.no-border {
    border-bottom: none;
    padding-bottom: 0;
}

.result-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.result-item {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    margin: 0 5px;
}

.result-label {
    font-weight: bold;
    color: var(--secondary);
}

.result-value {
    font-size: 1.1em;
    color: var(--primary);
}

.action-buttons {
    display: none;
    justify-content: flex-end;
    margin-top: 10px;
    max-width: 550px;
}

.action-button {
    color: black;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.1s;
    font-size: 0.9em;
    width: calc(50% - 5px);
}

.action-button:first-child {
    margin-right: auto;
}

.action-button:hover {
    opacity: 0.8;
}

.action-button:active {
    transform: scale(0.98);
}

#removeEmptyLines {
    background-color: var(--highlight-empty);
}

#removeDuplicates {
    background-color: var(--highlight-duplicate);
}

.cm-empty-line {
    background-color: var(--highlight-empty);
}

.cm-duplicate-line {
    background-color: var(--highlight-duplicate);
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    max-width: 550px;
}

.button-group button {
    flex: 1;
}

#clearButton {
    background-color: #F0F0F0;
    color: black;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

#clearButton:hover {
    background-color: #E0E0E0;
}

.editor-container h3 {
    margin-bottom: 10px;
    color: var(--secondary);
}

#result .CodeMirror {
    height: auto;
    max-height: 400px;
}

.copy-button {
    margin-top: 10px;
    background-color: var(--primary);
}

.result-container {
    display: none;
}

.copy-message {
    display: none;
    color: var(--primary);
    margin-left: 10px;
    font-size: 0.9em;
}

form label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

form input,
form select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

form input[type="number"] {
    width: 100px;
}

/* Styles for Role Comparison */
/* .editors-wrapper {
    display: flex;
    justify-content: space-between;
}

.editor-container {
    width: 48%;
} */

/* Make the .editor-container h3 have a 10px padding top  */
.editor-container h3 {
    padding-top: 15px;
}

@media (max-width: 768px) {
    .editors-wrapper {
        flex-direction: column;
    }
    .editor-container {
        width: 100%;
        margin-bottom: 20px;
    }
}

#comparisonResults h4 {
    margin-top: 15px;
    color: var(--primary);
}

#comparisonResults ul {
    list-style-type: disc;
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    background-color: #F0F0F0;
    color: black;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    padding: 10px;
}

/* Form styling improvements */
.form-group {
    margin-bottom: 15px;
    max-width: 550px;
}

.short-input {
    width: 50px;
    text-align: center;
    padding: 8px;
    font-size: 16px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-label {
    font-weight: normal;
    margin-top: 0;
    cursor: pointer;
}

input[type="checkbox"] {
    margin: 0;
    width: auto;
    cursor: pointer;
}
