.editor-container {
    display: flex;
    flex-direction: row;
    height: 100vh;
}

.editor-sidebar {
    width: 260px;
    min-width: 200px;
    max-width: 320px;
    border-right: 1px solid #e0e0e0;
    padding: 1rem;
    overflow-y: auto;
}

.editor-main {
    flex: 1 1 0%;
    padding: 2rem;
    overflow-y: auto;
}

.editor-sidebar button {
    background: none;
    border: none;
    padding: 0.25rem 0;
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.editor-sidebar ul {
    list-style: none;
    padding-left: 1rem;
}

.editor-sidebar li {
    margin-bottom: 0.25rem;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.image-dialog {
    padding: 1rem;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.image-grid {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    overflow-y: auto;
    align-content: flex-start;
}

.image-option {
    flex: 0 0 auto;
    max-width: 180px;
    max-height: 180px;
    cursor: pointer;
    border: 2px solid transparent;
}

.image-option.selected {
    border-color: #007bff;
}

.image-option img {
    max-width: 180px;
    max-height: 180px;
    object-fit: contain;
}

.dialog-actions {
    margin-top: 0.5rem;
    text-align: right;
}

.add-buttons {
    margin-top: 0.5rem;
}

.add-field {
    margin-right: 0.5rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.add-field .icon {
    margin-right: 0.25rem;
}
