.image-editor-dialog {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--rz-base-background-color);
    color: var(--rz-text-color);
}

.image-editor-dialog .editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--rz-border-color);
}

.image-editor-dialog .header-title {
    font-weight: 500;
    font-size: 1rem;
}

.image-editor-dialog .close-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--rz-text-secondary-color);
    border-radius: 4px;
}

.image-editor-dialog .close-btn:hover {
    background: var(--rz-base-200);
    color: var(--rz-text-color);
}

.image-editor-dialog .editor-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.image-editor-dialog .preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
}

.image-editor-dialog .image-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rz-base-200);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.image-editor-dialog .image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-editor-dialog .processing-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: white;
    z-index: 10;
}

.image-editor-dialog .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: image-editor-spin 0.8s linear infinite;
}

@keyframes image-editor-spin {
    to { transform: rotate(360deg); }
}

.image-editor-dialog .variations-strip {
    margin-top: 0.75rem;
}

.image-editor-dialog .strip-label {
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.image-editor-dialog .variations-grid {
    display: flex;
    gap: 0.5rem;
}

.image-editor-dialog .variation-thumb {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.image-editor-dialog .variation-thumb:hover {
    border-color: var(--rz-primary-lighter);
}

.image-editor-dialog .variation-thumb.selected {
    border-color: var(--rz-primary);
}

.image-editor-dialog .variation-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-editor-dialog .tools-section {
    width: 280px;
    border-left: 1px solid var(--rz-border-color);
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.image-editor-dialog .tool-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.image-editor-dialog .group-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rz-text-secondary-color);
}

.image-editor-dialog .tool-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: var(--rz-base-200);
    border: 1px solid var(--rz-border-color);
    border-radius: 6px;
    cursor: pointer;
    color: var(--rz-text-color);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.image-editor-dialog .tool-btn:hover:not(:disabled) {
    background: var(--rz-base-300);
    border-color: var(--rz-primary-lighter);
}

.image-editor-dialog .tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-editor-dialog .tool-btn .material-symbols-outlined {
    font-size: 18px;
}

.image-editor-dialog .prompt-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.image-editor-dialog .prompt-input-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--rz-border-color);
    border-radius: 6px;
    background: var(--rz-input-background-color);
    color: var(--rz-text-color);
    font-family: inherit;
    font-size: 0.875rem;
    resize: none;
}

.image-editor-dialog .prompt-input-group textarea:focus {
    outline: none;
    border-color: var(--rz-primary);
}

.image-editor-dialog .apply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem;
    background: var(--rz-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.image-editor-dialog .apply-btn:hover:not(:disabled) {
    background: var(--rz-primary-dark);
}

.image-editor-dialog .apply-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-editor-dialog .preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.image-editor-dialog .preset-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    background: var(--rz-base-200);
    border: 1px solid var(--rz-border-color);
    border-radius: 20px;
    cursor: pointer;
    color: var(--rz-text-color);
    font-size: 0.75rem;
    transition: all 0.2s;
}

.image-editor-dialog .preset-chip:hover:not(:disabled) {
    background: var(--rz-primary-lighter);
    border-color: var(--rz-primary);
}

.image-editor-dialog .preset-chip:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-editor-dialog .preset-chip .material-symbols-outlined {
    font-size: 14px;
}

.image-editor-dialog .editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--rz-border-color);
    gap: 1rem;
}

.image-editor-dialog .error-msg {
    color: var(--rz-danger);
    font-size: 0.8rem;
}

.image-editor-dialog .footer-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.image-editor-dialog .btn-secondary,
.image-editor-dialog .btn-primary {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.image-editor-dialog .btn-secondary {
    background: var(--rz-base-200);
    color: var(--rz-text-color);
    border: 1px solid var(--rz-border-color);
}

.image-editor-dialog .btn-secondary:hover:not(:disabled) {
    background: var(--rz-base-300);
}

.image-editor-dialog .btn-primary {
    background: var(--rz-primary);
    color: white;
}

.image-editor-dialog .btn-primary:hover:not(:disabled) {
    background: var(--rz-primary-dark);
}

.image-editor-dialog .btn-secondary:disabled,
.image-editor-dialog .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-editor-dialog .btn-secondary .material-symbols-outlined,
.image-editor-dialog .btn-primary .material-symbols-outlined {
    font-size: 16px;
}

@media (max-width: 768px) {
    .image-editor-dialog .editor-body {
        flex-direction: column;
    }

    .image-editor-dialog .tools-section {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--rz-border-color);
        max-height: 250px;
    }
}
