/**
 * Markdown 预览面板组件样式
 */

.markdown-preview-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-left: 1px solid #e1e4e8;
}

/* 预览头部 */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f6f8fa;
    border-bottom: 1px solid #e1e4e8;
    flex-shrink: 0;
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #24292e;
}

.preview-title i {
    color: #586069;
}

.preview-actions {
    display: flex;
    gap: 4px;
}

.preview-actions button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #586069;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.preview-actions button:hover {
    background: #e1e4e8;
    color: #24292e;
}

.preview-actions button:active {
    transform: scale(0.95);
}

/* 预览内容区 */
.preview-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.preview-content.markdown-preview {
    overflow-y: auto;
}

/* 预览占位符 */
.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6a737d;
    text-align: center;
}

.preview-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.preview-placeholder p {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
}

.preview-placeholder small {
    font-size: 14px;
    opacity: 0.8;
}

/* 全屏模式 */
.markdown-preview-panel.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-left: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .preview-header {
        padding: 8px 12px;
    }

    .preview-title span {
        display: none;
    }

    .preview-actions button {
        width: 28px;
        height: 28px;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .markdown-preview-panel {
        background: #0d1117;
        border-left-color: #30363d;
    }

    .preview-header {
        background: #161b22;
        border-bottom-color: #30363d;
    }

    .preview-title {
        color: #f0f6fc;
    }

    .preview-title i {
        color: #8b949e;
    }

    .preview-actions button {
        color: #8b949e;
    }

    .preview-actions button:hover {
        background: #30363d;
        color: #f0f6fc;
    }

    .preview-placeholder {
        color: #8b949e;
    }
}