/* Phoenix BBCode Editor Styles */

.phoenix-editor {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    margin: 10px 0;
}

/* Toolbar */
.phoenix-toolbar {
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #ddd;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.toolbar-group {
    display: flex;
    gap: 3px;
    align-items: center;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: #ccc;
    margin: 0 5px;
}

.toolbar-btn {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    min-width: 32px;
    height: 32px;
}

.toolbar-btn:hover {
    background: #e9ecef;
    border-color: #999;
}

.toolbar-btn:active {
    background: #dee2e6;
    transform: translateY(1px);
}

.toolbar-select {
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    height: 32px;
}

.toolbar-select:hover {
    border-color: #999;
}

.toolbar-color {
    width: 60px;
    height: 32px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.toolbar-color:hover {
    border-color: #999;
}

/* Editor Area */
.phoenix-editor-wrapper {
    position: relative;
    background: #fff;
}

.phoenix-editor-area {
    width: 100%;
    height: 100%;
    padding: 15px;
    border: none;
    resize: none;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #000;
    background: #fff;
    box-sizing: border-box;
}

.phoenix-editor-area:focus {
    outline: none;
    background: #fffef7;
}

.phoenix-editor-area::placeholder {
    color: #999;
}

/* Preview Area */
.phoenix-preview-wrapper {
    border-top: 1px solid #ddd;
    background: #f8f9fa;
}

.phoenix-preview-label {
    background: #e9ecef;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    border-bottom: 1px solid #ddd;
}

.phoenix-preview-area {
    height: calc(100% - 30px);
    padding: 15px;
    overflow-y: auto;
    background: #fff;
    color: #000;
    line-height: 1.8;
}

/* Preview Content Styles */
.phoenix-preview-area strong {
    font-weight: bold;
}

.phoenix-preview-area em {
    font-style: italic;
}

.phoenix-preview-area u {
    text-decoration: underline;
}

.phoenix-preview-area del {
    text-decoration: line-through;
}

.phoenix-preview-area ul {
    list-style-type: disc;
    margin-left: 20px;
}

.phoenix-preview-area ol {
    list-style-type: decimal;
    margin-left: 20px;
}

.phoenix-preview-area pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 10px 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.phoenix-preview-area pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Code Language Labels */
.phoenix-preview-area pre[data-lang]::before {
    content: attr(data-lang);
    display: block;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    margin: -15px -15px 10px -15px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}

.phoenix-preview-area blockquote {
    background: #f0f0f0;
    border-left: 4px solid #3498db;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.phoenix-preview-area blockquote cite {
    font-weight: bold;
    color: #3498db;
    display: block;
    margin-bottom: 5px;
}

.phoenix-preview-area img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.phoenix-preview-area a {
    color: #3498db;
    text-decoration: none;
}

.phoenix-preview-area a:hover {
    text-decoration: underline;
}

/* Scrollbar Styling */
.phoenix-editor-area::-webkit-scrollbar,
.phoenix-preview-area::-webkit-scrollbar {
    width: 8px;
}

.phoenix-editor-area::-webkit-scrollbar-track,
.phoenix-preview-area::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.phoenix-editor-area::-webkit-scrollbar-thumb,
.phoenix-preview-area::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.phoenix-editor-area::-webkit-scrollbar-thumb:hover,
.phoenix-preview-area::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .phoenix-toolbar {
        padding: 6px;
    }
    
    .toolbar-btn {
        padding: 4px 8px;
        font-size: 12px;
        min-width: 28px;
        height: 28px;
    }
    
    .toolbar-select {
        font-size: 12px;
        height: 28px;
    }
}
