@charset "utf-8";

/* ========================================
   view.skin.php & view_detail.php 공통 스타일
   ======================================== */

/* 루트 변수 */
:root {
    --primary-color: #333;
    --border-color: #ddd;
    --text-color: #333;
    --light-text: #666;
}


/* 컨테이너 */
.view-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
}

.view-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    background: white;
}

/* 액션 버튼 그룹 - 컬러 배경 버튼 */
.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px 0px;
}

.action-buttons .btn-group-left,
.action-buttons .btn-group-right {
    display: flex;
    gap: 8px;
}

.action-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    border: none;
    color: #fff !important;
}

.action-buttons a i {
    font-size: 18px;
}

.action-buttons a.btn-list {
    background: #6c757d;
}

.action-buttons a.btn-list:hover {
    background: #5a6268;
}

.action-buttons a.btn-edit {
    background: #28a745;
}

.action-buttons a.btn-edit:hover {
    background: #218838;
}

.action-buttons a.btn-delete {
    background: #dc3545;
}

.action-buttons a.btn-delete:hover {
    background: #c82333;
}

.action-buttons a.btn-reply {
    background: #17a2b8;
}

.action-buttons a.btn-reply:hover {
    background: #138496;
}

/* 헤더 */
.post-header {
    padding: 10px 0px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 10px;
    background: #fff;
}

.view-header {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

/* 접수번호 */
.receipt-number {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.receipt-number span {
    font-family: monospace;
    font-weight: 600;
    color: #666;
}

.receipt-info_style {
    margin-bottom: 8px;
}

.receipt-label_style {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.receipt-value_style {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    font-family: monospace;
}

/* 제목 영역 */
.view-title-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.view-title-wrap_style {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.post-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.5;
    word-break: keep-all;
}

.view-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    flex: 1;
    margin: 0;
}

.title-text_style {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    flex: 1;
}

/* 카테고리 */
.post-category {
    display: inline-block;
    padding: 4px 2px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 13px;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 10px;
}

.category-text_style {
    font-size: 14px;
    color: #666;
}

/* 라벨 배지 */
.label-badge {
    display: inline-block;
    padding: 5px 12px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
   
    border: 1px solid rgba(255,255,255,0.3); border-radius: 6px
}

/* 메타 정보 */
.view-meta {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    font-size: 13px;
    color: #666;
}

.view-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 관리자 라벨 패널 */
.admin-label-panel {
    margin: 20px;
    padding: 20px;
    background: #fff;
    border: 2px solid var(--border-color);
}

.admin-label-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-label-controls span {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

.admin-label-controls select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    background: #fff;
    cursor: pointer;
}

.admin-label-controls select:focus {
    outline: none;
    border-color: var(--text-color);
}

.admin-label-controls button {
    padding: 8px 16px;
    background: var(--text-color);
    color: white;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.admin-label-controls button:hover {
    background: #000;
}

#label_preview {
    padding: 6px 12px;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

/* 관리자 라벨 선택 (view_detail.php용) */
.label-selector-area_style {
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f8ff;
    border: 2px solid #007bff;
    border-radius: 8px;
}

.label-selector-controls_style {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.label-selector-text_style {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.label-selector-select_style {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.label-selector-btn_style {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.label-selector-preview_style {
    display: none;
    padding: 6px 12px;
    color: white;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

/* 파일 & 링크 섹션 */
.file-section {
    margin: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--text-color);
    background: #fff;
}

.file-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.file-section strong {
    display: block;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.file-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
}

.file-item a:hover {
    text-decoration: underline;
}

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.file-list li {
    margin-bottom: 10px;
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.file-list a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.file-list a:hover {
    color: #007bff;
}

/* 첨부파일 섹션 (view.skin.php용) */
.attachments-section_style {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.attachments-title_style {
    margin: 0 0 0px 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.file-list-ul_style {
    margin: 0;
    padding: 0;
    list-style: none;
}

.file-list-item_style {
    margin-bottom: 10px;
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.2s;
}

.file-link_style {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.file-icon_style {
    margin-right: 12px;
    font-size: 22px;
    color: #007bff;
}

.file-info_style {
    flex: 1;
}

.file-name_style {
    display: block;
    color: #007bff;
    font-size: 14px;
    margin-bottom: 4px;
}

.file-desc_style {
    font-size: 12px;
    color: #666;
}

.file-size_style {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    margin-left: 10px;
}

/* 본문 영역 */
.content-section {
    margin: 0;
    padding: 10px 0px;
    background: #fff;
}

.view-content {
    margin-top: 30px;
}

.content-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* 상태 라벨 */
.label-status {
    display: inline-block;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin: 8px 0;
}

.label-status-apply  { background-color: #007bff; }
.label-status-reject { background-color: #dc3545; }
.label-status-wait   { background-color: #ffc107; color: #333; }
.label-status-use    { background-color: #28a745; }
.label-status-stop   { background-color: #6c757d; }
.label-status-end    { background-color: #343a40; }
.label-status-default { background-color: #999; }

/* 테이블 스타일 */
.tbl, .field-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.tbl th, .field-table th {
    background: #f9f9f9;
    color: var(--text-color);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--border-color);
    width: 200px;
}

.tbl td, .field-table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    line-height: 1.6;
    background: #fff;
}

.field-table th {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.field-table td {
    border: 1px solid #dee2e6;
}

/* 자녀 정보 */
.child-types {
    margin: 16px 0;
    padding: 12px;
    border: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
}

.child-info-view {
    padding: 15px;
    background: #fff;
    margin: 15px 0;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--text-color);
}

.child-info-view strong {
    display: block;
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 10px;
}

.child-info-view br {
    display: block;
    margin: 4px 0;
}

.child-empty_style {
    padding: 16px;
    color: #666;
}

/* 상담시간 테이블 */
.checkcombo4-view-wrap {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.counseling-time-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.checkcombo4-view {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    border: 1px solid #ddd;
}

.checkcombo4-view th,
.checkcombo4-view td {
    border: 1px solid #ddd;
    padding: 10px 8px;
    text-align: center;
    font-size: 13px;
}

.checkcombo4-view th {
    background: #f9f9f9;
    color: #333;
    font-weight: 600;
    border: 1px solid #ddd;
}

.checkcombo4-view td {
    color: #333;
    font-weight: 600;
    font-size: 16px;
    background: #fff;
    border: 1px solid #ddd;
}

/* 안내사항 */
.notice-box {
  
    padding: 20px;
    border: 1px solid var(--border-color);
    border-left: 3px solid #ffc107;
    background: #fff;
}

.notice-box h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 15px 0;
}

.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.notice-list li:last-child {
    border-bottom: none;
}

.notice-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-color);
    cursor: default;
}

.notice-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: default;
}

/* 이미지 */
#bo_v_img {
    margin: 20px 0;
}

#bo_v_img img {
    max-width: 100%;
    height: auto;
}

/* 팝업 버튼 (view_detail.php용) */
.popup-action-buttons_style {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.print-btn {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.print-btn:hover {
    background: #5a6268;
}

.edit-btn {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.edit-btn:hover {
    background: #218838;
}

.close-btn {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.close-btn:hover {
    background: #c82333;
}

/* 인쇄용 스타일 */
@media print {
    /* 버튼 숨기기 */
    .print-btn, .edit-btn, .close-btn,
    .action-buttons {
        display: none !important;
    }
    
    /* 여백 최적화 */
    body {
        background: white;
    }
    
    .view-detail-container {
        max-width: 100%;
        padding: 20px;
    }
    
    /* 불필요한 요소 숨기기 */
    .label-selector-area,
    .label-selector-area_style,
    .admin-label-panel {
        display: none !important;
    }
}

/* 반응형 */
@media (max-width: 768px) {
    .post-title,
    .view-title {
        font-size: 20px;
    }
    
    .tbl th,
    .field-table th {
        width: 100px;
        font-size: 13px;
        padding: 10px;
    }
    
    .tbl td,
    .field-table td {
        font-size: 13px;
        padding: 10px;
    }
    
    .content-section {
        padding: 20px 15px;
    }
    
    .action-buttons {
        padding: 12px 15px;
        flex-wrap: wrap;
    }
    
    .action-buttons a {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .admin-label-controls,
    .label-selector-controls_style {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-label-controls select,
    .admin-label-controls button,
    .label-selector-select_style,
    .label-selector-btn_style {
        width: 100%;
    }
}

/* 아이콘 마진 */
.icon-mr_style {
    margin-right: 6px;
}

/* ========================================
   첨부파일 섹션 (view_simple 스타일 공통)
   ======================================== */
.view-simple-attachments {
    padding: 16px 24px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.view-simple-attachments-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-simple-file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.view-simple-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-simple-file-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.2s;
    flex: 1;
}

.view-simple-file-item a:hover {
    background: #f0f7ff;
    border-color: #1976d2;
    color: #1976d2;
}

.view-simple-file-icon {
    font-size: 18px;
    color: #666;
}

.view-simple-file-name {
    flex: 1;
    word-break: break-all;
}

.view-simple-file-size {
    font-size: 12px;
    color: #999;
}

/* ========================================
   textarea/html 타입 여분필드 박스
======================================== */
.view-textarea-box {
    display: block;
    padding: 0;
    background: none;
    margin-top: 30px;
    line-height: 1.8;
    overflow: hidden;
    clear: both;
    width: 100%;
    box-sizing: border-box;
}

.view-textarea-box + .view-textarea-box {
    margin-top: 30px;
}

.view-textarea-box ul {
    margin: 0;
    padding-left: 20px;
    list-style-position: inside;
}

.view-textarea-box li {
    margin-bottom: 8px;
}

.view-textarea-box > * {
    max-width: 100%;
}

.view-textarea-box table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 15px 0 !important;
    border: 1px solid #ddd !important;
}

.view-textarea-box table th,
.view-textarea-box table td {
    border: 1px solid #ddd !important;
    padding: 10px 12px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.view-textarea-box table th {
    background: #f5f5f5 !important;
    font-weight: 600 !important;
    color: #333 !important;
}

.view-textarea-box table td {
    background: #fff !important;
}

.view-textarea-box table tr:nth-child(even) td {
    background: #fafafa !important;
}

/* COM_li 리스트 스타일 - 기존 스타일 보완 (::before는 기존 CSS에서 처리) */
.view-textarea-box .COM_li ul {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.view-textarea-box .COM_li li {
    list-style: none !important;
}
