/**
 * KAICE Material Plugin Styles
 */

/* 교재 편집 페이지 레이아웃 */
.kaice-material-edit-form .kaice-document-container {
    display: flex;
    gap: 20px;
}

.kaice-material-edit-form .main-contents {
    flex: 1;
    min-width: 0;
}

/* 메인 콘텐츠 영역 */
.kaice-material-edit-form .single.kaice-board-content {
    background: #fff;
    border-radius: var(--theme-card-radius);
    border: solid 1px var(--theme-item-border);
    padding: 30px;
}


/* 싱글 페이지 스타일 */
.kaice-material-info .program-info,
.kaice-material-info .program-toc {
    margin-bottom: 30px;
}

.kaice-material-info .program-info:last-child,
.kaice-material-info .program-toc:last-child {
    margin-bottom: 0;
}

/* 목차 테이블 */
.kaice-material-toc table {
    width: 100%;
}

.kaice-material-toc .toc-order {
    width: 60px;
    text-align: center;
}

.kaice-material-toc .toc-title a {
    color: var(--theme-text-color);
    text-decoration: none;
}

.kaice-material-toc .toc-title a:hover {
    color: var(--theme-main-color);
}

.material .kaice-material-toc .curriculum-details a {
    font-size: var(--theme-font-size-button);
    color: var(--theme-info-text);
    line-height: 1.5;
    margin-bottom: 4px;
    margin-left: 5px;
    position: relative;
    padding-left: 0;
    display: block;
}

.material .kaice-material-toc .curriculum-details a:hover {
    color: var(--theme-main-color);
}

/* 아카이브 페이지 - archive-list-card-styles.css 사용 */

/* 토스트 스타일은 테마(alert-styles.css) 사용 */

/* ===========================================
   에러 페이지 스타일
   =========================================== */

.kaice-error-page {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.kaice-error-page h2 {
    font-family: var(--theme-font-bold, sans-serif);
    font-size: var(--theme-font-size-title, 24px);
    color: var(--theme-text-color, #333);
    margin-bottom: 16px;
}

.kaice-error-page p {
    font-size: var(--theme-font-size-body, 14px);
    color: var(--theme-info-text, #666);
    margin-bottom: 32px;
    line-height: 1.6;
}

.kaice-error-page .error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.kaice-error-page .error-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--theme-button-radius, 6px);
    font-size: var(--theme-font-size-button, 14px);
    font-family: var(--theme-font-bold, sans-serif);
    text-decoration: none;
    transition: all 0.2s ease;
}

.kaice-error-page .btn-primary {
    background: var(--theme-main-color, #0073aa);
    color: #fff;
    border: 1px solid var(--theme-main-color, #0073aa);
}

.kaice-error-page .btn-primary:hover {
    background: var(--theme-main-hover, #005177);
    border-color: var(--theme-main-hover, #005177);
}

.kaice-error-page .btn-secondary {
    background: var(--theme-table-bg, #f5f5f5);
    color: var(--theme-text-color, #333);
    border: 1px solid var(--theme-item-border, #ddd);
}

.kaice-error-page .btn-secondary:hover {
    background: var(--theme-item-border, #ddd);
}

.kaice-error-page .btn-outline {
    background: transparent;
    color: var(--theme-info-text, #666);
    border: 1px solid var(--theme-item-border, #ddd);
}

.kaice-error-page .btn-outline:hover {
    background: var(--theme-table-bg, #f5f5f5);
    color: var(--theme-text-color, #333);
}

/* 반응형 */
@media (max-width: 768px) {
    .kaice-material-edit-form .kaice-document-container {
        flex-direction: column;
    }

    .kaice-toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .kaice-toast {
        min-width: auto;
        max-width: none;
    }

    .kaice-error-page {
        padding: 40px 16px;
    }

    .kaice-error-page .error-actions {
        flex-direction: column;
    }

    .kaice-error-page .error-actions a {
        width: 100%;
    }
}
