body {
    font-family: Arial, sans-serif;
    margin: 40px auto;
    padding: 20px;
    background-color: #f3f4f6;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

h2 {
    color: #1f2937;
    margin: 0;
}

.btn-new {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-new:hover {
    background-color: #2563eb;
}

.btn-new:active {
    transform: scale(0.98);
}

#werkruimte-lijst {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.editor-row {
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
}

.row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.row-title-input {
    font-size: 1rem;
    font-weight: bold;
    color: #4b5563;
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 8px;
    border-radius: 4px;
    width: 200px;
    transition: border-color 0.2s, background-color 0.2s;
}

.row-title-input:focus, .row-title-input:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
    outline: none;
}

.actions-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-action {
    background-color: transparent;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-left:hover {
    color: white;
    background-color: #e5c947;

}
.btn-clear-left {
    background-color: white;
    color: #e5c947;
    border-color: #e5c947;
}

.btn-clear-right {
    color: #7c3aed;
    background-color: white;
    border-color: #7c3aed;
}
.btn-clear-right:hover {
    background-color: #7c3aed;
    color: white;
}

.btn-clear-both {
    color: #d97706;
    background-color: white;
    border-color: #d97706;
}
.btn-clear-both:hover {
    background-color: #d97706;
    color: white;
}

.btn-delete {
    color: white;
    background-color: #ef4444;
    border-color: #fee2e2;
    display: none;
}
.btn-delete:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}

#werkruimte-lijst.has-multiple .btn-delete {
    display: block;
}

.editor-container {
    display: flex;
    gap: 20px;
    width: 100%;
}

.column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.column h4 {
    color: #4b5563;
    margin-top: 8px;
    margin-bottom: 8px;
}

math-field {
    font-size: 20px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 2px solid #d1d5db;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

math-field:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

/* Zorgt dat de tekst en de kopieerknop netjes naast elkaar staan */
.output-box {
    margin-top: 10px;
    padding: 10px 15px;
    background: #eef2f7;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* De code zelf mag de rest van de ruimte innemen en afbreken indien te lang */
.latex-text {
    word-break: break-all;
    flex: 1;
}

/* De kopieerknop */
.btn-copy {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #4b5563;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap; /* Zorgt dat de tekst altijd op één regel blijft */
}

.btn-copy:hover {
    background-color: #f1f5f9;
    color: #1e293b;
    border-color: #94a3b8;
}

.btn-copy.success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

