@charset "UTF-8";

#editInEditor {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    display: none;
}

#editInEditor:hover {
    background-color: #45a049;
}

.button-group {
    display: flex;
    gap: 10px;
}

/* Editor Panel Styles */
.editor-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80vh;
    background: var(--card-background);
    box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1), 0 -2px 4px -2px rgb(0 0 0 / 0.1);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-color);
    will-change: transform;
}

.editor-panel.show {
    transform: translateY(0);
}

.editor-panel-header {
    padding: var(--spacing-sm);
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-panel-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.editor-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-sm);
    background: var(--card-background);
}

.editor-panel .controls {
    padding: var(--spacing-sm);
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.editor-panel .button-group {
    display: flex;
    gap: var(--spacing-sm);
}

.editor-panel button:not(.close-panel):not(.ce-inline-tool) {
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.editor-panel button:not(.close-panel):not(.ce-inline-tool):hover {
    background-color: var(--primary-hover);
}

.editor-panel button:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

.editor-panel button.close-panel {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: var(--spacing-xs);
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
}

.editor-panel button.close-panel:hover {
    color: var(--text-primary);
    background-color: var(--background);
}

.editor-panel button.close-panel:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.editor-panel #editorjs {
    height: 100%;
    overflow-y: auto;
}

/* Editor overlay background */
.editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    backdrop-filter: blur(2px);
}

.editor-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Status message styling */
.editor-panel #status {
    color: var(--text-secondary);
    padding: var(--spacing-sm);
    text-align: center;
    font-size: 0.875rem;
}

/* EditorJS custom styling */
.codex-editor {
    border-radius: var(--border-radius);
    background: var(--card-background);
}

.codex-editor .ce-block .ce-header {
    padding: 0em;
}

.ce-block__content {
    max-width: 800px;
    margin: 0 auto;
}

.ce-toolbar__content {
    max-width: 800px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .editor-panel {
        height: 90vh;
    }
    
    .editor-panel-content {
        padding: var(--spacing-md);
    }
    
    .editor-panel .controls {
        flex-direction: column;
    }
    
    .editor-panel .button-group {
        width: 100%;
    }
    
    .editor-panel button:not(.close-panel) {
        width: 100%;
    }
}