/* 마크다운 에디터 기본 스타일 */
.markdown-editor-tool textarea {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    line-height: 1.7;
    tab-size: 4;
}

.markdown-editor-tool textarea:focus {
    box-shadow: none;
}

/* 전체 화면 모드 */
.md-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #fff;
    margin: 0 !important;
    padding: 15px;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.md-fullscreen .container-xl {
    max-width: 100% !important;
    padding: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.md-fullscreen .text-center.mb-4 {
    display: none;
}

.md-fullscreen #editorRow {
    flex: 1;
    min-height: 0;
}

.md-fullscreen #editorRow > .col-lg-6 {
    display: flex;
}

.md-fullscreen #editorRow > .col-lg-6 > .card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.md-fullscreen #editorRow > .col-lg-6 > .card > .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.md-fullscreen #mdInput {
    flex: 1;
    resize: none;
}

.md-fullscreen #mdPreview {
    flex: 1;
    height: auto !important;
}

.md-fullscreen .card.mt-3:has(#charCount),
.md-fullscreen .card.mt-5 {
    display: none;
}

/* 미리보기 영역 기본 스타일 */
.md-preview-output {
    background-color: #fff;
    border: 1px solid #e9ecef;
    line-height: 1.8;
    font-size: 0.95rem;
    color: #333;
    word-wrap: break-word;
}

/* 미리보기 제목 */
.md-preview-output h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.8em 0 0.4em;
    padding-bottom: 0.3em;
    border-bottom: 2px solid #e9ecef;
}

.md-preview-output h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.8em 0 0.4em;
    padding-bottom: 0.25em;
    border-bottom: 1px solid #e9ecef;
}

.md-preview-output h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.7em 0 0.3em;
}

.md-preview-output h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.6em 0 0.3em;
}

.md-preview-output h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5em 0 0.2em;
}

.md-preview-output h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.5em 0 0.2em;
    color: #6c757d;
}

/* 미리보기 단락 */
.md-preview-output p {
    margin: 0.6em 0;
}

/* 미리보기 인라인 코드 */
.md-preview-output .md-inline-code {
    background-color: #f1f3f5;
    color: #d63384;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.88em;
}

/* 미리보기 코드 블록 */
.md-preview-output .md-code-block {
    background-color: #1e1e2e;
    color: #cdd6f4;
    padding: 1em 1.2em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.8em 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.88em;
    line-height: 1.6;
}

.md-preview-output .md-code-block code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* 미리보기 인용문 */
.md-preview-output blockquote {
    border-left: 4px solid #6c63ff;
    padding: 0.5em 1em;
    margin: 0.8em 0;
    background-color: #f8f9fa;
    color: #555;
    border-radius: 0 6px 6px 0;
}

/* 미리보기 목록 */
.md-preview-output ul,
.md-preview-output ol {
    padding-left: 1.8em;
    margin: 0.5em 0;
}

.md-preview-output li {
    margin: 0.25em 0;
}

/* 미리보기 구분선 */
.md-preview-output hr {
    border: none;
    border-top: 2px solid #e9ecef;
    margin: 1.5em 0;
}

/* 미리보기 표 */
.md-preview-output .md-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.8em 0;
    font-size: 0.92em;
}

.md-preview-output .md-table th,
.md-preview-output .md-table td {
    border: 1px solid #dee2e6;
    padding: 0.5em 0.75em;
}

.md-preview-output .md-table th {
    background-color: #f1f3f5;
    font-weight: 600;
}

.md-preview-output .md-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* 미리보기 이미지 */
.md-preview-output .md-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0.5em 0;
}

/* 미리보기 링크 */
.md-preview-output a {
    color: #6c63ff;
    text-decoration: none;
}

.md-preview-output a:hover {
    text-decoration: underline;
}

/* 미리보기 강조 */
.md-preview-output strong {
    font-weight: 700;
}

.md-preview-output del {
    color: #999;
}

/* 아코디언 스타일 */
.markdown-editor-tool .accordion-button:not(.collapsed) {
    background-color: var(--bs-light);
    box-shadow: none;
}

.markdown-editor-tool .accordion-button:focus {
    box-shadow: none;
}

/* 툴바 버튼 스타일 */
.md-toolbar-btn {
    min-width: 34px;
    padding: 0.25rem 0.4rem;
}
