﻿body {
}
/* =========================================================
   CKEditor 출력 공통 스타일 (Front + Admin 공용)
   - reset.css 충돌로 깨지는 table/figure/oembed 복구
   ========================================================= */

/* 기본 텍스트 */
.ck-content {
    line-height: 1.7;
    color: inherit;
}

    .ck-content p {
        margin: 0 0 14px;
    }

    .ck-content h1, .ck-content h2, .ck-content h3 {
        margin: 22px 0 12px;
        line-height: 1.3;
    }

    /* 이미지/미디어 */
    .ck-content img {
        max-width: 100%;
        height: auto;
        display: block;
        border-radius: 12px;
    }

    .ck-content figure {
        margin: 18px 0;
    }

        .ck-content figure.media {
            margin: 24px 0;
        }

    .ck-content iframe {
        width: 100%;
        aspect-ratio: 16 / 9;
        border: 0;
        display: block;
        border-radius: 12px;
    }

    /* =========================================================
   1) table 깨짐 복구 (display 강제)
   ========================================================= */
    .ck-content table {
        display: table !important;
        width: 100% !important;
        border-collapse: separate !important; /* radius 위해 */
        border-spacing: 0 !important;
        margin: 24px 0 !important;
    }

    .ck-content thead {
        display: table-header-group !important;
    }

    .ck-content tbody {
        display: table-row-group !important;
    }

    .ck-content tr {
        display: table-row !important;
    }

    .ck-content th,
    .ck-content td {
        display: table-cell !important;
        padding: 14px 16px !important;
        vertical-align: top !important;
        border-right: 1px solid #e5e7eb !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    /* 마지막 col/row 라인 정리 */
    .ck-content tr > th:last-child,
    .ck-content tr > td:last-child {
        border-right: 0 !important;
    }

    .ck-content tbody tr:last-child > td {
        border-bottom: 0 !important;
    }

    /* 박스 디자인 */
    .ck-content table {
        border: 1px solid #e5e7eb !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        background: #fff !important;
    }

    .ck-content thead th {
        background: #f8fafc !important;
        font-weight: 600;
    }

    .ck-content tbody tr:nth-child(even) td {
        background: #fcfcfd;
    }

    /* 모바일 가로 스크롤(테이블 자동 래핑 JS랑 같이 쓰면 완벽) */
    .ck-content .table-wrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 24px 0;
    }

        .ck-content .table-wrap table {
            min-width: 640px;
        }
