/* Imixs Markdown Editor Styles */

/* Editor Container */
.editor-container {
    position: relative;
    min-height: 400px;
}

/* Editor Header */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    position: relative;
    z-index: 10;
}

.editor-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Toolbar Styles */
.editor-toolbar {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 0px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: none;
}

.toolbar-icon {
    padding: 8px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 12px;
    color: #6c757d;
    border-radius: 3px;
    margin: 1px;
}

.toolbar-icon:hover {
    background: #e9ecef;
    color: #495057;
}

.toolbar-icon.active {
    background: #dedede;
    color: white;
}

.toolbar-separator {
    width: 1px;
    background: #dee2e6;
    margin: 4px 2px;
}

.toolbar-icon i {
    font-size: 12px;
}

/* Editor Area */
.markdown-editor {
    padding: 0px 10px 10px 10px;
    min-height: 400px;
    line-height: 1.6;
    display: block;

}


/* Textarea (Source Mode) */
textarea[data-id="markdown_data"] {
    width: 100%;
    height: 400px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    display: none;
}



/* Content Styling within Editor */
.markdown-editor table, .help-tooltip-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
}

.markdown-editor table td, .help-tooltip-content table td {
   padding: 8px;
   border-bottom: 1px solid #ccc;
}

.markdown-editor table th, .help-tooltip-content table th {
  font-weight: bold;
  color: #333;
  border-bottom: 1px solid #333;
}

.markdown-editor pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 16px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
}

.markdown-editor code {
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-editor pre code {
    background-color: transparent;
    padding: 0;
}

.markdown-editor blockquote {
    border-left: 4px solid #007bff;
    margin: 16px 0;
    padding: 0 16px;
    color: #666;
    font-style: italic;
}

/* Legacy Action Controls (if needed) */
.action-controls {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-button {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.action-button:hover {
    background: #f5f5f5;
}

.action-button.primary {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.action-button.primary:hover {
    background: #218838;
}

.action-button.secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.action-button.secondary:hover {
    background: #5a6268;
}

/* Info Box */
.info-box {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Help tooltip */
.help-tooltip {
    position: relative;
}

.help-tooltip-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
    font-size: 12px;
    z-index: 1000;
    display: none;
}