.editor-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.6;
    box-sizing: border-box;
    background-color: transparent;
    color: inherit;
    outline: none;
    box-shadow: none;
    margin-bottom: 0;
    overflow: visible;
    position: relative;
}

@media (max-width: 1024px) {
    .editor-container {
        width: 100%;
        padding: 0;
    }
}

.editor-container * {
    max-width: 100%;
    word-wrap: break-word;
}

.dark .editor-container {
    background-color: transparent;
    color: inherit;
    box-shadow: none;
}

.editor-container h1 {
    font-size: 2em;
    font-weight: bold;
    text-align: left;
    text-transform: none;
    margin-bottom: 0.75em;
    margin-top: 0;
    color: inherit;
}

.editor-container h2 {
    font-size: 1.5em;
    font-weight: bold;
    text-align: left;
    text-transform: none;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    color: inherit;
}

.editor-container h3 {
    font-size: 1.25em;
    font-weight: bold;
    text-align: left;
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: inherit;
}

.editor-container p {
    margin-bottom: 1em;
    text-align: justify;
    line-height: 1.5;
}

.editor-container ol,
.editor-container ul {
    margin-bottom: 1em !important;
    margin-top: 0.5em !important;
    padding-left: 2.5em !important;
    list-style-position: outside !important;
    color: inherit;
}

.editor-container ol {
    list-style-type: decimal !important;
}

.editor-container ul {
    list-style-type: disc !important;
}

.editor-container ol li,
.editor-container ul li {
    margin-bottom: 0.5em;
    line-height: 1.5;
    text-align: justify;
    display: list-item !important;
    padding-left: 0.5em;
    color: inherit;
}

.editor-container ol li::marker,
.editor-container ul li::marker {
    color: currentColor;
}

.editor-container strong {
    font-weight: bold;
}

.editor-container em {
    font-style: italic;
}

.editor-container code {
    font-family: 'Courier New', Courier, monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    color: inherit;
}

.dark .editor-container code {
    background-color: rgba(255, 255, 255, 0.1);
}

.editor-container pre {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1em;
    overflow-x: auto;
    border-left: 3px solid currentColor;
    color: inherit;
}

.dark .editor-container pre {
    background-color: rgba(255, 255, 255, 0.05);
}

.editor-container pre code {
    background-color: transparent !important;
    padding: 0;
    font-size: 0.85em;
    line-height: 1.4;
}

.editor-container table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    color: black;
    border: 1px solid currentColor;
}

.dark .editor-container table {
    color: white;
}

.editor-container thead tr {
    border-bottom: 2px solid currentColor;
}

.editor-container tbody tr {
    border-bottom: 1px solid currentColor;
}

.editor-container th,
.editor-container td {
    padding: 0.75em;
    text-align: left;
    border-right: 1px solid currentColor;
}

.editor-container th:last-child,
.editor-container td:last-child {
    border-right: none;
}

.editor-container th {
    font-weight: bold;
}

@media print {
    .editor-container {
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        width: 100% !important;
        min-height: auto !important;
        box-shadow: none !important;
    }
}

.toolbar-btn {
    height: 2rem;
    width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    border: 0.5px solid transparent;
    border-radius: 0.25rem;
    background-color: transparent;
    transition: all 0.1s;
}

.toolbar-btn:hover {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
}

.toolbar-btn.active {
    background-color: #e5e7eb;
    color: #000;
    border-color: #d1d5db;
}

.dark .toolbar-btn {
    color: #cbd5e1;
}

.dark .toolbar-btn:hover {
    background-color: #1e293b;
    border-color: #334155;
}

.dark .toolbar-btn.active {
    background-color: #334155;
    color: #fff;
    border-color: #475569;
}

.toolbar-select {
    height: 2rem;
    font-size: 0.8125rem;
    border: 0.5px solid #e5e7eb;
    border-radius: 0.25rem;
    background-color: white;
    color: #374151;
    padding-left: 0.5rem;
    padding-right: 1.5rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e");
    background-position: right 0.25rem center;
    background-repeat: no-repeat;
    background-size: 1rem 1rem;
    cursor: pointer;
}

.toolbar-select:hover {
    border-color: #d1d5db;
}

.toolbar-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}

.dark .toolbar-select {
    background-color: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23cbd5e1'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e");
}

.dark .toolbar-select:hover {
    border-color: #475569;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-right: 0.5rem;
    border-right: 1px solid #e5e7eb;
}

.dark .toolbar-group {
    border-color: #1e293b;
}

.toolbar-group:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.input-clean {
    border: 0.5px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.5rem;
    font-size: 0.875rem;
    background-color: white;
    color: #1f2937;
    width: 100%;
}

.dark .input-clean {
    border-color: #334155;
    background-color: #0f172a;
    color: white;
}