/**
 * 파일명: helpdesk.css
 * 파일위치: /wp-content/plugins/helpdesk/assets/css/helpdesk.css
 * 설명: 헬프데스크 플러그인 스타일시트
 */

/* 기본 리셋 및 설정 */
.helpdesk-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 헬프데스크 전체 레이아웃 */
.helpdesk-main-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px; /* joyn-mypage와 동일한 최대 너비 */
    margin: 0 auto; /* 중앙 정렬 */
    align-items: flex-start; /* 상단 정렬 */
    position: relative;
}

.helpdesk-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: transparent;
    color: #333;
    line-height: 1.6;
    width: 100%;
    clear: both;
    align-self: stretch; /* 전체 너비 사용 */
}

.helpdesk-wrapper .container {
    width: 100%;
    max-width: 900px; /* joyn-mypage와 동일한 최대 너비 */
    margin: 0 auto; /* 중앙 정렬 */
    padding: 20px;
    box-sizing: border-box;
    margin-top: 0; /* 상단 여백 제거 */
}

/* 헤더 스타일 */
.helpdesk-wrapper .header {
    background-color: white;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e7;
    margin-bottom: 30px;
}

/* 탭 컨테이너 - joyn-mypage 스타일 적용 */
.helpdesk-tabs-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0;
    width: 100%;
    max-width: 870px; /* 상단탭 크기 조정 */
    margin-left: auto;
    margin-right: auto;
    clear: both;
    align-self: stretch; /* 전체 너비 사용 */
    position: sticky;
    top: 0;
    z-index: 10;
    overflow: hidden;
    box-sizing: border-box;
}

/* joyn-mypage와 동일한 탭 네비게이션 스타일 */
.helpdesk-tabs-container .board-nav-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    background: transparent;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Webkit 브라우저에서 스크롤바 숨기기 */
.helpdesk-tabs-container .board-nav-tabs::-webkit-scrollbar {
    display: none;
}

.helpdesk-tabs-container .board-nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.65rem 0.5rem; /* 세로 패딩 10% 증가 (1.5 * 1.1) */
    text-decoration: none;
    color: #6b7280;
    border-right: 1px solid #e5e7eb;
    transition: 0.2s ease;
    gap: 0.55rem; /* 아이콘과 텍스트 간격 10% 증가 */
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    font-weight: 400;
    position: relative;
    text-align: center;
    min-width: 120px;
    user-select: none;
    min-height: 88px; /* 최소 높이 10% 증가 (80 * 1.1) */
}

.helpdesk-tabs-container .board-nav-tab:last-child {
    border-right: none;
}

.helpdesk-tabs-container .board-nav-tab:hover {
    background: #f9fafb;
    color: #1f2937;
}

.helpdesk-tabs-container .board-nav-tab.active {
    background: #f9fafb;
    color: #4f46e5;
}

.helpdesk-tabs-container .board-nav-tab i {
    font-size: 1.5rem; /* 아이콘 크기 증가 */
}

.helpdesk-tabs-container .board-nav-tab .tab-label {
    font-size: 0.875rem;
    font-weight: 400;
}

/* 게시판 헤더 */
.helpdesk-wrapper .board-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 15px; /* 하단 여백 줄임 */
}

.helpdesk-wrapper .board-title {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 필터 섹션 */
.helpdesk-wrapper .filter-section {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
}

.helpdesk-wrapper .filter-select {
    padding: 8px 15px;
    border: 1px solid #e5e5e7;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
}

/* 검색 박스 */
.helpdesk-wrapper .search-box {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.helpdesk-wrapper .search-input {
    padding: 8px 15px;
    border: 1px solid #e5e5e7;
    border-radius: 6px;
    width: 250px;
    font-size: 12px;
}

.helpdesk-wrapper .btn-search {
    padding: 8px 20px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.helpdesk-wrapper .btn-search:hover {
    background-color: #0052a3;
}

/* 게시판 테이블 */
.helpdesk-wrapper .board-table {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 900px; /* 상단탭과 동일한 최대 너비 */
    margin: 0 auto; /* 중앙 정렬 */
    box-sizing: border-box;
    min-height: 400px; /* 최소 높이 설정으로 상단 고정 */
}

.helpdesk-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

.helpdesk-wrapper th {
    background-color: #f5f5f7;
    padding: 15px;
    text-align: left;
    font-weight: 500;
    color: #666;
    font-size: 16px;
}

.helpdesk-wrapper td {
    padding: 15px;
    border-top: 1px solid #e5e5e7;
    font-size: 16px;
}

.helpdesk-wrapper tr:hover {
    background-color: #f9f9f9;
}


/* 제목 링크 */
.helpdesk-wrapper .title-link {
    color: #333;
    text-decoration: none !important;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.helpdesk-wrapper .title-link:hover {
    color: #0066cc;
    text-decoration: none !important;
}

.helpdesk-wrapper .title-link:visited {
    text-decoration: none !important;
}

.helpdesk-wrapper .title-link:focus {
    text-decoration: none !important;
}

/* 뱃지 */
.helpdesk-wrapper .badge {
    display: inline-block;
    padding: 2px 8px;
    background-color: #ff3b30;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 8px;
}

.helpdesk-wrapper .badge-new {
    display: inline-block;
    padding: 2px 8px;
    background-color: #ff3b30;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 8px;
}

/* 상태 뱃지 (Q&A) */
.helpdesk-wrapper .status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.helpdesk-wrapper .status-waiting {
    background-color: #fff3cd;
    color: #856404;
}

.helpdesk-wrapper .status-answered {
    background-color: #d4edda;
    color: #155724;
}

.helpdesk-wrapper .status-solved {
    background-color: #cce5ff;
    color: #004085;
}

/* 카테고리 태그 */
.helpdesk-wrapper .category-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e5e5e7;
    color: #666;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

/* 카테고리 뱃지 (정보) */
.helpdesk-wrapper .category-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

.helpdesk-wrapper .cat-guide {
    background-color: #e8f2ff;
    color: #0066cc;
}

.helpdesk-wrapper .cat-tip {
    background-color: #fff3cd;
    color: #856404;
}

.helpdesk-wrapper .cat-news {
    background-color: #d4edda;
    color: #155724;
}

.helpdesk-wrapper .cat-tutorial {
    background-color: #f8d7da;
    color: #721c24;
}

/* 파일 아이콘 (자료실) */
.helpdesk-wrapper .file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.helpdesk-wrapper .file-pdf {
    background-color: #ff3b30;
    color: white;
}

.helpdesk-wrapper .file-doc {
    background-color: #0066cc;
    color: white;
}

.helpdesk-wrapper .file-xls {
    background-color: #34c759;
    color: white;
}

.helpdesk-wrapper .file-zip {
    background-color: #5856d6;
    color: white;
}

.helpdesk-wrapper .file-img {
    background-color: #ff9500;
    color: white;
}

/* 파일 정보 */
.helpdesk-wrapper .file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 15px;
}

.helpdesk-wrapper .file-size {
    padding: 2px 8px;
    background-color: #f5f5f7;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

/* 통계 */
.helpdesk-wrapper .stats {
    display: flex;
    gap: 15px;
    color: #999;
    font-size: 15px;
}

.helpdesk-wrapper .stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 답글 수 */
.helpdesk-wrapper .reply-count {
    color: #0066cc;
    font-weight: 500;
    margin-left: 5px;
    font-size: 16px;
}

/* 다운로드 수 */
.helpdesk-wrapper .download-count {
    color: #0066cc;
    font-weight: 500;
    font-size: 16px;
}

/* 태그 */
.helpdesk-wrapper .tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e8f2ff;
    color: #0066cc;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 8px;
}

.helpdesk-wrapper .tag-hot {
    background-color: #ffe8e8;
    color: #ff3b30;
}

/* 작성자, 날짜 */
.helpdesk-wrapper .author {
    color: #666;
    font-size: 16px;
}

.helpdesk-wrapper .date {
    color: #999;
    font-size: 16px;
}

/* 뷰 토글 (정보) */
.helpdesk-wrapper .view-toggle {
    display: flex;
    gap: 5px;
    margin-right: 15px;
}

.helpdesk-wrapper .view-btn {
    padding: 8px 12px;
    border: 1px solid #e5e5e7;
    background-color: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.helpdesk-wrapper .view-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.helpdesk-wrapper .view-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.helpdesk-wrapper .view-btn.active {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* 글쓰기 버튼 */
.helpdesk-wrapper .btn-write {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,102,204,0.2);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    margin: 20px 0 100px 0; /* 하단 여백 추가 */
}

.helpdesk-wrapper .btn-write:hover {
    background-color: #0052a3;
    box-shadow: 0 6px 16px rgba(0,102,204,0.4);
}

/* 페이지네이션 */
.helpdesk-wrapper .pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
    margin-bottom: 50px; /* 하단 여백 추가 */
}

.helpdesk-wrapper .page-btn {
    padding: 8px 12px;
    border: 1px solid #e5e5e7;
    background-color: white;
    color: #666;
    text-decoration: none !important;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 16px;
}

.helpdesk-wrapper .page-btn.active {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

.helpdesk-wrapper .page-btn:hover:not(.active) {
    background-color: #f5f5f7;
    text-decoration: none !important;
}

.helpdesk-wrapper .page-btn:visited {
    text-decoration: none !important;
}

.helpdesk-wrapper .page-btn:focus {
    text-decoration: none !important;
}

/* 로딩 스피너 */
.helpdesk-wrapper .loading {
    text-align: center;
    padding: 40px;
}

.helpdesk-wrapper .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0066cc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 탭 컨테이너 위치 고정을 위한 추가 스타일 */
.helpdesk-tabs-container {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.helpdesk-wrapper .container {
    padding-top: 0;
}

/* 데스크톱 전용 스타일 - 768px 초과에서만 적용 */
@media (min-width: 769px) {
    .helpdesk-wrapper .mobile-cards {
        display: none !important;
    }
}

/* 모달 스타일 */
.helpdesk-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.helpdesk-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.helpdesk-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
}


.helpdesk-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
}

.helpdesk-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.helpdesk-modal .modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.helpdesk-modal .modal-close:hover {
    background: #e5e5e7;
    color: #333;
}

.helpdesk-modal .modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.helpdesk-modal .form-group {
    margin-bottom: 20px;
}

.helpdesk-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.helpdesk-modal .form-group input,
.helpdesk-modal .form-group select,
.helpdesk-modal .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.helpdesk-modal .form-group input:focus,
.helpdesk-modal .form-group select:focus,
.helpdesk-modal .form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.helpdesk-modal .form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.helpdesk-modal .form-text {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.helpdesk-modal .modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e5e7;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f8f9fa;
}

.helpdesk-modal .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.helpdesk-modal .btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.helpdesk-modal .btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.helpdesk-modal .btn-primary {
    background: #3b82f6;
    color: white;
}

.helpdesk-modal .btn-primary:hover {
    background: #2563eb;
}

.helpdesk-modal .btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* 모바일에서 100% 가로폭 (joyn-mypage 스타일 적용) */
@media (max-width: 900px) {
    .helpdesk-main-container {
        max-width: 100%;
        padding: 0;
    }
    
    .helpdesk-wrapper .container {
        max-width: 100%;
        padding: 0.5rem;
    }
    
    .helpdesk-tabs-container {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
        margin-bottom: 1rem;
    }
    
    .helpdesk-wrapper .board-table {
        max-width: 100%;
        border-radius: 0;
    }
}

/* 모바일에서 상단탭 100% 가로폭 사용 */
@media (max-width: 870px) {
    .helpdesk-tabs-container {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .helpdesk-modal .modal-content {
        width: 95%;
        max-height: calc(100vh - 40px);
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .helpdesk-modal .modal-header,
    .helpdesk-modal .modal-body,
    .helpdesk-modal .modal-footer {
        padding: 16px;
    }
    
    .helpdesk-modal .modal-footer {
        flex-direction: column;
    }
    
    .helpdesk-modal .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* 모바일에서 탭 라벨 숨기기 (joyn-mypage 스타일) */
    .helpdesk-tabs-container .board-nav-tab .tab-label {
        display: none;
    }
    
    .helpdesk-tabs-container .board-nav-tab {
        padding: 1.1rem 0.5rem; /* 모바일 세로 패딩 10% 증가 (1 * 1.1) */
        min-height: 66px; /* 모바일 최소 높이 10% 증가 (60 * 1.1) */
    }
    
    /* 모바일에서 더 꽉차게 */
    .helpdesk-main-container {
        padding: 0;
    }
    
    .helpdesk-wrapper .container {
        padding: 0.25rem;
    }
    
    .helpdesk-tabs-container {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
    }
    
    .helpdesk-wrapper .board-table {
        border-radius: 0;
    }
}

/* 메시지 스타일 */
.helpdesk-message {
    padding: 12px 20px;
    margin: 0 20px 20px;
    border-radius: 8px;
    font-weight: 500;
    animation: messageSlideIn 0.3s ease-out;
}

.helpdesk-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.helpdesk-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 모달 열릴 때 body 스크롤 방지 */
body.modal-open {
    overflow: hidden;
}

/* 글읽기 모달 스타일 */
.helpdesk-modal .modal-content-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
}

.post-read-content {
    padding: 20px;
}

.post-read-content .post-header {
    border-bottom: 1px solid #e5e5e7;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.post-read-content .post-title {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-read-content .post-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.post-read-content .post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-read-content .post-body {
    font-size: 16px;
    line-height: 1.7;
    color: #1d1d1f;
    margin-bottom: 30px;
}

.post-read-content .post-body p {
    margin-bottom: 15px;
}

.post-read-content .post-comments {
    border-top: 1px solid #e5e5e7;
    padding-top: 20px;
}

.post-read-content .post-comments h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1d1d1f;
}

.comment-item {
    background-color: #f5f5f7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.comment-item .comment-author {
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 5px;
}

.comment-item .comment-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.comment-item .comment-content {
    color: #1d1d1f;
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* 빈 게시판 메시지 스타일 */
.helpdesk-wrapper tbody tr td[colspan] {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

/* 빈 게시판일 때 테이블 높이 유지 */

/* 게시판 컨텐츠 영역 */

/* 데스크톱에서 모바일 카드 숨김 */
.helpdesk-wrapper .mobile-cards {
    display: none !important;
}

/* 글읽기 모달 스타일 - 게시판 스타일 */
.helpdesk-modal .modal-content-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.board-post-view {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

/* 게시글 헤더 */
.board-post-view .post-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e7;
    padding: 30px;
}

.board-post-view .post-title {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.board-post-view .post-info {
    display: flex;
    gap: 30px;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.board-post-view .post-info > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-post-view .post-info i {
    font-size: 16px;
    color: #007cba;
}

.board-post-view .post-info span {
    font-weight: 500;
}

/* 게시글 본문 */
.board-post-view .post-content {
    padding: 40px 30px;
    min-height: 200px;
}

.board-post-view .post-body {
    line-height: 1.8;
    font-size: 16px;
    color: #1d1d1f;
}

.board-post-view .post-body p {
    margin-bottom: 20px;
}

.board-post-view .post-body h1,
.board-post-view .post-body h2,
.board-post-view .post-body h3,
.board-post-view .post-body h4,
.board-post-view .post-body h5,
.board-post-view .post-body h6 {
    margin: 30px 0 15px 0;
    font-weight: 600;
    color: #1d1d1f;
}

.board-post-view .post-body h1 {
    font-size: 24px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.board-post-view .post-body h2 {
    font-size: 20px;
}

.board-post-view .post-body h3 {
    font-size: 18px;
}

.board-post-view .post-body ul,
.board-post-view .post-body ol {
    margin: 20px 0;
    padding-left: 25px;
}

.board-post-view .post-body li {
    margin-bottom: 8px;
}

.board-post-view .post-body blockquote {
    margin: 25px 0;
    padding: 20px 25px;
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #555;
}

.board-post-view .post-body code {
    background: #f1f3f4;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    color: #d63384;
}

.board-post-view .post-body pre {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
    border: 1px solid #e5e5e7;
}

.board-post-view .post-body pre code {
    background: none;
    padding: 0;
    color: #1d1d1f;
}

.board-post-view .post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.board-post-view .post-body a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.board-post-view .post-body a:hover {
    text-decoration: underline;
}

.board-post-view .post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    border: 1px solid #e5e5e7;
    border-radius: 8px;
    overflow: hidden;
}

.board-post-view .post-body th,
.board-post-view .post-body td {
    border: 1px solid #e5e5e7;
    padding: 12px 15px;
    text-align: left;
}

.board-post-view .post-body th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1d1d1f;
}

/* 게시글 푸터 */
.board-post-view .post-footer {
    background: #f8f9fa;
    border-top: 1px solid #e5e5e7;
    padding: 20px 30px;
}

.board-post-view .post-actions {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
}

.board-post-view .btn-outline {
    background: white;
    border: 1px solid #e5e5e7;
    color: #666;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-post-view .btn-outline:hover {
    background: #f8f9fa;
    border-color: #007cba;
    color: #007cba;
}

.board-post-view .btn-outline i {
    font-size: 16px;
}

/* 오류 메시지 */
.board-post-view .error {
    text-align: center;
    padding: 60px 30px;
    color: #dc3545;
    font-size: 16px;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin: 20px;
}

/* 권한 없음 스타일 */
.helpdesk-no-access {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.no-access-message {
    max-width: 400px;
    margin: 0 auto;
}

.no-access-message i {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 20px;
}

.no-access-message h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.no-access-message p {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.btn-write.disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-write.disabled:hover {
    background-color: #f5f5f5;
    color: #999;
    box-shadow: none;
}

/* 댓글 섹션 스타일 */
.comments-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.comments-section h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.comments-list {
    margin-bottom: 20px;
}

.comment-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.comment-author {
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.comment-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.comment-content {
    color: #333;
    line-height: 1.5;
}

.comment-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.comment-form h5 {
    margin-bottom: 15px;
    color: #333;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.comment-form .btn {
    margin-top: 10px;
}

.comment-form-disabled {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.comment-disabled-message {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.comment-disabled-message a {
    color: #0073aa;
    text-decoration: none;
}

.comment-disabled-message a:hover {
    text-decoration: underline;
}

.no-comments {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .helpdesk-modal .modal-content-large {
        width: 98%;
        max-height: 95vh;
    }
    
    .board-post-view .post-header {
        padding: 20px;
    }
    
    .board-post-view .post-title {
        font-size: 22px;
    }
    
    .board-post-view .post-info {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .board-post-view .post-content {
        padding: 25px 20px;
    }
    
    .board-post-view .post-footer {
        padding: 15px 20px;
    }
    
    .board-post-view .post-actions {
        justify-content: center;
    }
    
    .comments-section {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .comment-form {
        padding: 15px;
    }
}

/* 검색 결과 스타일 */
.search-results-container {
    margin-top: 20px;
}

.search-result-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-info-header h3 {
    margin: 0 0 5px 0;
    color: #1d1d1f;
    font-size: 18px;
}

.search-count {
    color: #666;
    font-size: 14px;
}

.btn-clear-search {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.btn-clear-search:hover {
    background: #5a6268;
}

.search-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    margin-bottom: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-search-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.no-results-icon {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 20px;
}

.no-search-results h4 {
    color: #1d1d1f;
    margin-bottom: 10px;
}

.no-search-results p {
    color: #666;
    margin-bottom: 20px;
}

.search-suggestions {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.search-suggestions p {
    font-weight: 600;
    margin-bottom: 10px;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-suggestions li {
    padding: 5px 0;
    color: #666;
}

.search-suggestions li:before {
    content: "•";
    color: #0073aa;
    font-weight: bold;
    margin-right: 8px;
}

.search-error {
    text-align: center;
    padding: 60px 20px;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin: 20px 0;
}

.error-icon {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 20px;
}

.search-error h4 {
    color: #dc3545;
    margin-bottom: 10px;
}

.search-error p {
    color: #666;
    margin-bottom: 20px;
}

.btn-retry-search {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.btn-retry-search:hover {
    background: #c82333;
}

.search-highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.search-suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 5px;
}

.search-suggestions-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-suggestions-dropdown li {
    padding: 0;
}

.search-suggestion {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.3s;
}

.search-suggestion:hover {
    background: #f8f9fa;
    text-decoration: none;
}

.search-suggestion:last-child {
    border-bottom: none;
}

/* 모바일 검색 반응형 */
@media (max-width: 768px) {
    .search-result-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .search-suggestions {
        max-width: 100%;
    }
}