@charset "utf-8";

/* ============================================
   수리나인 BASIC 게시판 뷰 스킨 (이미지 기반 리팩토링)
   
   버전: 4.0.0
   스타일: 모바일 네이티브 앱 스타일
   디자인: 이미지 → 현재페이지정보 → 제목 → 작성자 정보 → 내용글
   작성일: 2025-10-15
   
   핵심 원칙:
   - 화이트 백그라운드 (#ffffff)
   - 보더/그림자 금지 (여백과 타이포그래피로 구분)
   - 모바일 우선 (Mobile First)
   - 글로벌 CSS 활용
   ============================================ */

/* ===========================================
   ⚠️ 필수: CSS 리셋 (완전 초기화)
   
   목적: 브라우저 기본값 제거 + 그누보드 CSS 격리
   명시도: 리셋 11점, 컴포넌트 20점 이상 필수
   =========================================== */

.ai_view_container,
.ai_view_container *,
.ai_view_container *:before,
.ai_view_container *:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===========================================
   기본 스타일 (컨테이너)
   =========================================== */

.ai_view_container {
    font-family: var(--suri-font-primary);
    line-height: var(--suri-line-normal);
    color: #212529;
    background: #ffffff;  /* 화이트 필수 */
    width: 100%;
}

/* ===========================================
   ⚠️ 필수: 기본 요소 리셋 (명시도 11점)
   =========================================== */

.ai_view_container a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.ai_view_container button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.ai_view_container input,
.ai_view_container select,
.ai_view_container textarea {
    font-family: inherit;
    border: none;
    outline: none;
    background: transparent;
}

.ai_view_container ul,
.ai_view_container ol {
    list-style: none;
}

.ai_view_container img {
    max-width: 100%;
    display: block;
}

.ai_view_container svg {
    display: block;
    flex-shrink: 0;
}

/* ===========================================
   대표 이미지 섹션
   
   디자인: 이미지와 동일한 스타일
   특징: 전체 너비, 적절한 높이, 둥근 모서리
   =========================================== */

.ai_view_container .ai_featured_image {
    width: 100%;
    margin-bottom: 24px;
}

.ai_view_container .ai_featured_image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

/* ===========================================
   메인 레이아웃 (단일 컬럼)
   =========================================== */

.ai_view_container .ai_view_layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 16px;
}

/* ===========================================
   메인 컨텐츠 영역
   =========================================== */

.ai_view_container .ai_view_main {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

/* 현재 페이지 정보 (브레드크럼) */
.ai_view_container .ai_page_info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.ai_view_container .ai_breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #868e96;
}

.ai_view_container .ai_admin_menu {
    display: flex;
    gap: 8px;
}

.ai_view_container .ai_admin_btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ai_view_container .ai_admin_btn:first-child {
    background: #ffb366;
    color: #8b4513;
}

.ai_view_container .ai_admin_btn:first-child:hover {
    background: #ff9933;
}

.ai_view_container .ai_admin_btn:last-child {
    background: #e74c3c;
    color: #ffffff;
}

.ai_view_container .ai_admin_btn:last-child:hover {
    background: #c0392b;
}

.ai_view_container .ai_back_link {
    color: #868e96;
}

/* 게시글 신고 버튼 */
.ai_view_container .ai_article_report {
    text-align: right;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f1f3f5;
}

.ai_view_container .ai_report_btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #868e96;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai_view_container .ai_report_btn:hover {
    background: #fff5f5;
    border-color: #e74c3c;
    color: #e74c3c;
}

.ai_view_container .ai_back_link:hover {
    color: #495057;
}

.ai_view_container .ai_breadcrumb_sep {
    color: #adb5bd;
}

.ai_view_container .ai_category_link {
    color: #868e96;
}

.ai_view_container .ai_category_link:hover {
    color: #495057;
}

/* 제목 */
.ai_view_container .ai_article_title {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    line-height: var(--suri-line-tight);
    margin-bottom: 20px;
    word-break: keep-all;
}

/* 작성자 정보 */
.ai_view_container .ai_author_info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f3f5;
}

.ai_view_container .ai_author_profile {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    overflow: hidden;
}

.ai_view_container .ai_author_profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai_view_container .ai_author_details {
    flex: 1;
}

.ai_view_container .ai_author_name {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.ai_view_container .ai_article_meta {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: #868e96;
}

.ai_view_container .ai_article_date {
    color: #868e96;
}

.ai_view_container .ai_article_views {
    color: #868e96;
}

.ai_view_container .ai_article_reports {
    color: #e74c3c;
    font-weight: 500;
}

/* 뒤로가기 버튼 */
.ai_view_container .ai_back_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #868e96;
    cursor: pointer;
    transition: color 0.2s ease;
    text-decoration: none;
}

.ai_view_container .ai_back_btn:hover {
    color: #495057;
}

.ai_view_container .ai_back_btn i {
    font-size: 18px;
}

.ai_view_container .ai_share_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #868e96;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ai_view_container .ai_share_btn:hover {
    color: #495057;
}

.ai_view_container .ai_share_btn i {
    font-size: 18px;
}

/* 수정하기 버튼 (작성자/관리자만 표시) */
.ai_view_container .ai_edit_btn,
.ai_view_container .ai_delete_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #868e96;
    cursor: pointer;
    transition: color 0.2s ease;
    text-decoration: none;
}

.ai_view_container .ai_edit_btn:hover {
    color: #495057;
}

.ai_view_container .ai_delete_btn:hover {
    color: #dc3545;
}

.ai_view_container .ai_edit_btn i,
.ai_view_container .ai_delete_btn i {
    font-size: 18px;
}

/* 유튜브 섹션 */
.ai_view_container .ai_youtube_section {
    margin-bottom: 32px;
}

.ai_view_container .ai_youtube_player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 비율 */
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
}

.ai_view_container .ai_youtube_player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 본문 */
.ai_view_container .ai_article_content {
    margin-bottom: 40px;
    font-size: 16px;
    line-height: var(--suri-line-relaxed);
    color: #212529;
    word-break: keep-all;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    overflow: hidden;
}

.ai_view_container .ai_article_content p {
    margin-bottom: 16px;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.ai_view_container .ai_article_content table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

.ai_view_container .ai_article_content iframe,
.ai_view_container .ai_article_content video {
    max-width: 100%;
    height: auto;
}

.ai_view_container .ai_article_content pre,
.ai_view_container .ai_article_content code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.ai_view_container .ai_article_content h1,
.ai_view_container .ai_article_content h2,
.ai_view_container .ai_article_content h3 {
    margin-top: 32px;
    margin-bottom: 16px;
    font-weight: 700;
    line-height: var(--suri-line-tight);
}

.ai_view_container .ai_article_content h1 {
    font-size: 28px;
}

.ai_view_container .ai_article_content h2 {
    font-size: 24px;
}

.ai_view_container .ai_article_content h3 {
    font-size: 20px;
}

.ai_view_container .ai_article_content img {
    margin: 24px 0;
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* 서명 */
.ai_view_container .ai_signature {
    display: flex;
    gap: 12px;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #f1f3f5;
}

.ai_view_container .ai_signature_icon {
    font-size: 24px;
    color: #868e96;
}

.ai_view_container .ai_signature_text {
    flex: 1;
    font-size: 14px;
    color: #868e96;
    line-height: var(--suri-line-normal);
}

/* 추천/비추천 */
.ai_view_container .ai_vote_section { display: none !important; } /* 추천/비추천 숨김 */
/* .ai_view_container .ai_vote_section {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 40px 0;
}

.ai_view_container .ai_vote_btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 32px;
    background: #ffffff;
    transition: background 0.2s ease;
}

.ai_view_container .ai_vote_btn:hover {
    background: #fafafa;
}

.ai_view_container .ai_vote_btn i {
    font-size: 32px;
}

.ai_view_container .ai_vote_btn.ai_good {
    color: #00ce7d;
}

.ai_view_container .ai_vote_btn.ai_nogood {
    color: #dc3545;
}

.ai_view_container .ai_vote_btn span {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

.ai_view_container .ai_vote_btn strong {
    font-size: 20px;
    font-weight: 700;
}

.ai_view_container .ai_vote_toast {
    display: none;
    text-align: center;
    padding: 16px;
    margin: 16px 0;
    background: #f8f9fa;
    font-size: 15px;
    color: #495057;
}

/* 첨부파일 */
.ai_view_container .ai_files_section {
    margin: 40px 0;
    padding: 24px 0;
    border-top: 1px solid #f1f3f5;
}

.ai_view_container .ai_section_title {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai_view_container .ai_section_title i {
    color: #00ce7d;
}

.ai_view_container .ai_file_list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai_view_container .ai_file_item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 14px;
}

.ai_view_container .ai_file_item i {
    font-size: 18px;
    color: #868e96;
}

.ai_view_container .ai_file_item a {
    flex: 1;
    color: #495057;
}

.ai_view_container .ai_file_item a:hover {
    color: #00ce7d;
}

.ai_view_container .ai_download_count {
    font-size: 13px;
    color: #868e96;
}

/* 이전/다음 글 (사용 안 함) */
.ai_view_container .ai_post_nav {
    display: none;
}

/* ===========================================
   댓글 섹션 (별도 CSS 파일로 분리됨)
   
   댓글 관련 스타일은 view_comment.skin.css에서 관리
   =========================================== */

/* ===========================================
   반응형: 태블릿 (768px ~ 1023px)
   =========================================== */

@media (min-width: 768px) and (max-width: 1023px) {
    
    .ai_view_container .ai_featured_image {
    margin-bottom: 32px;
        max-width: 1024px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .ai_view_container .ai_featured_image img {
        border-radius: 16px;
    }
    
    .ai_view_container .ai_view_layout {
        padding: 0 24px;
        max-width: 1024px;
        margin: 0 auto;
    }
    
    .ai_view_container .ai_article_title {
        font-size: 28px;
    }
    
    .ai_view_container .ai_author_info {
        margin-bottom: 40px;
    }
    
    .ai_view_container .ai_article_content {
        font-size: 17px;
    }
    
    
}

/* ===========================================
   반응형: PC (1024px+)
   =========================================== */

@media (min-width: 1024px) {
    
    .ai_view_container .ai_featured_image {
        margin-bottom: 40px;
        max-width: 1024px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .ai_view_container .ai_featured_image img {
        border-radius: 20px;
        max-height: 500px;
    }
    
    .ai_view_container .ai_view_layout {
        padding: 0 40px;
        max-width: 1024px;
        margin: 0 auto;
    }
    
    .ai_view_container .ai_article_title {
        font-size: 32px;
    }
    
    .ai_view_container .ai_author_info {
        margin-bottom: 48px;
    }
    
    .ai_view_container .ai_author_profile {
        width: 48px;
        height: 48px;
    }
    
    .ai_view_container .ai_author_name {
        font-size: 16px;
    }
    
    .ai_view_container .ai_article_meta {
    font-size: 14px;
    }
    
    /* 뒤로가기 버튼 (태블릿/PC) */
    .ai_view_container .ai_back_btn {
        width: 48px;
        height: 48px;
    }
    
    .ai_view_container .ai_back_btn i {
        font-size: 20px;
    }
    
    .ai_view_container .ai_share_btn {
        width: 48px;
        height: 48px;
    }
    
    .ai_view_container .ai_share_btn i {
        font-size: 20px;
    }
    
    /* 수정하기 버튼 (태블릿/PC) */
    .ai_view_container .ai_edit_btn,
    .ai_view_container .ai_delete_btn {
        width: 48px;
        height: 48px;
    }
    
    .ai_view_container .ai_edit_btn i,
    .ai_view_container .ai_delete_btn i {
        font-size: 20px;
    }
    
    .ai_view_container .ai_article_content {
        font-size: 17px;
        line-height: 1.8;
    }
    
    .ai_view_container .ai_vote_section {
        margin: 60px 0;
    }
    
    .ai_view_container .ai_vote_btn {
        padding: 24px 48px;
    }
    
    
.ai_view_container .ai_guest_info {
        gap: 16px;
}

.ai_view_container .ai_guest_input {
        padding: 14px 18px;
        font-size: 16px;
    }
    
}

/* ===========================================
   반응형: 대형 PC (1200px+)
   =========================================== */

@media (min-width: 1200px) {
    
    .ai_view_container .ai_view_layout {
        max-width: 1024px;
    }
    
    .ai_view_container .ai_article_title {
        font-size: 36px;
    }
    
}

/* ========================================
   신고 모달
   ======================================== */
.ai_report_modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.ai_modal_overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.ai_modal_content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ai_modal_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
}

.ai_modal_header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.ai_modal_close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #868e96;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 18px;
}

.ai_modal_close:hover {
    background: #f8f9fa;
    color: #495057;
}

.ai_modal_body {
    padding: 24px;
}

.ai_report_info {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.ai_report_info p {
    margin: 0;
    font-size: 14px;
    color: #856404;
}

.ai_form_group {
    margin-bottom: 24px;
}

.ai_form_label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
}

.ai_required {
    color: #e74c3c;
}

.ai_radio_group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai_radio_item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai_radio_item:hover {
    background: #ffffff;
    border-color: #adb5bd;
}

.ai_radio_item input[type="radio"] {
    margin: 0;
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ai_radio_item input[type="radio"]:checked + span {
    font-weight: 600;
    color: #e74c3c;
}

.ai_radio_item:has(input[type="radio"]:checked) {
    background: #fff5f5;
    border-color: #e74c3c;
}

.ai_radio_item span {
    font-size: 15px;
    color: #495057;
    transition: all 0.2s ease;
}

.ai_form_textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    resize: vertical;
    transition: all 0.2s ease;
}

.ai_form_textarea:focus {
    border-color: #e74c3c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.ai_modal_footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

.ai_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.ai_btn_secondary {
    background: #ffffff;
    color: #495057;
    border: 1px solid #dee2e6;
}

.ai_btn_secondary:hover {
    background: #e9ecef;
}

.ai_btn_danger {
    background: #e74c3c;
    color: #ffffff;
}

.ai_btn_danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.ai_btn_danger:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 767px) {
    .ai_modal_content {
        width: 95%;
        max-height: 95vh;
    }
    
    .ai_modal_header,
    .ai_modal_body,
    .ai_modal_footer {
        padding: 20px;
    }
    
    .ai_modal_footer {
        flex-direction: column;
    }
    
    .ai_btn {
        width: 100%;
        justify-content: center;
    }
}

/* 신고 모달 버튼 강제 스타일 (우선순위 높임) */
.ai_modal_footer .ai_btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
}

.ai_modal_footer .ai_btn_secondary {
    background: #ffffff !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
}

.ai_modal_footer .ai_btn_secondary:hover {
    background: #e9ecef !important;
}

.ai_modal_footer .ai_btn_danger {
    background: #e74c3c !important;
    color: #ffffff !important;
}

.ai_modal_footer .ai_btn_danger:hover {
    background: #c0392b !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3) !important;
}

.ai_modal_footer .ai_btn_danger:disabled {
    background: #adb5bd !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ========================================
   더보기 메뉴 (유튜브 스타일)
   ======================================== */
.ai_view_container .ai_more_menu {
    position: relative;
}

.ai_view_container .ai_more_btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #868e96;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 18px;
}

.ai_view_container .ai_more_btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #495057;
}

.ai_view_container .ai_more_dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 1000;
    margin-top: 4px;
    overflow: hidden;
}

.ai_view_container .ai_more_dropdown.active {
    display: block;
}

.ai_view_container .ai_dropdown_item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    text-align: left;
}

.ai_view_container .ai_dropdown_item:hover {
    background: #f8f9fa;
    color: #e74c3c;
}

.ai_view_container .ai_dropdown_item i {
        font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 모바일 최적화 */
@media (max-width: 767px) {
    .ai_view_container .ai_more_dropdown {
        right: 0;
        min-width: 140px;
    }
}

