/* ===== 문의 페이지 ===== */
.inquiry-wrap {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 16px;
}
.inquiry-wrap h1 {
    font-size: 24px;
    margin: 0 0 24px;
    color: #111827;
}

/* 문의 작성/상세 카드 */
.inquiry-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* 폼 */
.inquiry-form .form-group {
    margin-bottom: 20px;
}
.inquiry-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}
.inquiry-form .required {
    color: #dc2626;
}
.inquiry-form select,
.inquiry-form input[type="text"],
.inquiry-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.inquiry-form select:focus,
.inquiry-form input[type="text"]:focus,
.inquiry-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.inquiry-form textarea {
    min-height: 200px;
    resize: vertical;
    line-height: 1.6;
}
.inquiry-form .form-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 4px;
}
.inquiry-form .form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* 목록 */
.inquiry-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.inquiry-table {
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    border-collapse: collapse;
    overflow: hidden;
}
.inquiry-table th,
.inquiry-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    text-align: left;
}
.inquiry-table th {
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    font-size: 13px;
}
.inquiry-table tr:last-child td { border-bottom: none; }
.inquiry-table tr:hover td { background: #f9fafb; }
.inquiry-table a { color: #1f2937; text-decoration: none; }
.inquiry-table a:hover { color: #3b82f6; }

/* 상세 */
.inquiry-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}
.inquiry-content {
    line-height: 1.7;
    color: #1f2937;
    white-space: pre-wrap;
    margin-bottom: 24px;
}
.inquiry-reply {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}
.inquiry-reply h4 {
    margin: 0 0 12px;
    color: #1e40af;
    font-size: 14px;
}
.inquiry-reply .reply-content {
    line-height: 1.7;
    color: #1f2937;
}
.inquiry-reply .reply-date {
    color: #6b7280;
    font-size: 12px;
    margin-top: 12px;
}
.inquiry-empty-reply {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    padding: 24px;
    text-align: center;
    color: #6b7280;
    margin-top: 20px;
}

/* 빈 목록 */
.inquiry-empty {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    color: #9ca3af;
}

/* 버튼 */
.inquiry-wrap .btn {
    display: inline-block;
    padding: 9px 18px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}
.inquiry-wrap .btn:hover { background: #f9fafb; }
.inquiry-wrap .btn-primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}
.inquiry-wrap .btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* 상태 배지 (목록·상세 공용) */
.inquiry-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.inquiry-badge.open { background: #fee2e2; color: #991b1b; }
.inquiry-badge.answered { background: #dcfce7; color: #166534; }
.inquiry-badge.closed { background: #f3f4f6; color: #6b7280; }


.inquiry-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.inquiry-notice h4 {
    margin: 0 0 8px;
    color: #1e40af;
    font-size: 14px;
}
.inquiry-notice ul {
    margin: 0;
    padding-left: 20px;
    color: #1f2937;
    font-size: 13px;
    line-height: 1.7;
}
.inquiry-notice strong { color: #1e40af; }

/* 첨부 영역 */
.inquiry-attachments {
    margin: 20px 0;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}
.inquiry-attachments h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #374151;
}
.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.15s;
}
.attachment-item:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}
.attachment-image {
    flex-direction: column;
    padding: 8px;
    width: 140px;
    text-align: center;
}
.attachment-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}
.attachment-image .attachment-name {
    font-size: 12px;
    word-break: break-all;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    width: 100%;
}
.attachment-file small { color: #9ca3af; }


/* Toast UI Viewer — 관리자 답변 줄간격 */
#admin-reply-viewer .toastui-editor-contents { line-height: 1.6 !important; }
#admin-reply-viewer .toastui-editor-contents p { margin: 0.5em 0 !important; }
#admin-reply-viewer .toastui-editor-contents > *:first-child { margin-top: 0 !important; }
#admin-reply-viewer .toastui-editor-contents > *:last-child { margin-bottom: 0 !important; }

#admin-reply-viewer .toastui-editor-contents p { white-space: normal !important; }
