/* css/hsj-inquiry.css */

/* h2 같은 태그 선택자는 반드시 .hsj-부모로 네임스페이스 처리 */

/* 공통 레이아웃 */
/* .hsj-inquiry-list-wrap,
.hsj-form-wrap,
.hsj-view-wrap,
.hsj-edit-wrap,
.hsj-reply-wrap {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    font-family: 'Noto Sans KR', sans-serif;
    color: #333;
}

.hsj-inquiry-list-wrap h2,
.hsj-form-wrap h2,
.hsj-view-wrap h2,
.hsj-edit-wrap h2,
.hsj-reply-wrap h2 {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
} */

/* 테이블 스타일 */
.hsj-inquiry-list-wrap .hsj-inquiry-table {
    font-size: 16px;
    color: #1F2328;
    border-color: #E8EAED !important;
}

.hsj-inquiry-table>thead th:nth-child(2),
.hsj-inquiry-table>tbody td:nth-child(2) {
    text-align: left;
}

.hsj-inquiry-table>thead th,
.hsj-inquiry-table>tbody td {
    text-align: center;
}

.hsj-inquiry-table>thead th {
    font-weight: 600;
    background-color: #F6F7F8;
    border-color: #AFB6C0;
}

.hsj-inquiry-table>tbody td {
    font-weight: 400;
    border-color: #E8EAED;
}

.hsj-inquiry-table>tbody tr:first-child td {
    border-bottom-color: #E8EAED;
    border-top-color: #AFB6C0;
}

.hsj-inquiry-table>tbody tr {
    color: #1F2328 !important;
}

.hsj-inquiry-table>tbody tr:hover {
    color: #1771F8 !important;
}

/*간격*/
.hsj-inquiry-table>thead th:first-child {
    width: 10%;
}

.hsj-inquiry-table>thead th:nth-child(2) {
    width: 70%;
}

.hsj-inquiry-table>thead th:nth-child(3) {
    width: 7%;
}

.hsj-inquiry-list-wrap .hsj-inquiry-table th,
.hsj-inquiry-list-wrap .hsj-inquiry-table td {
    text-align: center;
}

.hsj-inquiry-list-wrap .hsj-inquiry-table th {
    background: #f0f0f0;
    font-weight: 600;
}

.hsj-inquiry-list-wrap .hsj-inquiry-table tr:nth-child(even) {
    background: #ffffff;
}

.hsj-inquiry-list-wrap .hsj-inquiry-table tr:nth-child(odd) {
    background: #fafafa;
}

.hsj-inquiry-list-wrap .hsj-inquiry-table a {
    color: #0073aa;
    text-decoration: none;
}

.hsj-inquiry-list-wrap .hsj-inquiry-table a:hover {
    text-decoration: underline;
}

/* 상태 배지 */
.hsj-inquiry-list-wrap .hsj-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.hsj-inquiry-list-wrap .hsj-status.answered {
    background: #d4edda;
    color: #155724;
}

.hsj-inquiry-list-wrap .hsj-status.pending {
    background: #fff3cd;
    color: #856404;
}

/* 버튼 */
.hsj-write-button .button,
.hsj-form-wrap .button,
.hsj-view-wrap .button,
.hsj-edit-wrap .button,
.hsj-reply-wrap .button {
    display: inline-block;
    padding: 12px 80px;
    background: #1771F8;
    color: #fff !important;
    text-decoration: none;
    border: solid 1px #1771F8;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
    line-height: 24px;
}

.hsj-write-button .button:hover,
.hsj-form-wrap .button:hover,
.hsj-view-wrap .button:hover,
.hsj-edit-wrap .button:hover,
.hsj-reply-wrap .button:hover {
    opacity: 0.8;
    background: #1771F8;
    border: solid 1px #1771F8;
}

/* 폼 요소 */

.hsj-form-wrap {
    font-size: 16px;
    line-height: 24px;
    color: #1F2328
}

.hsj-form-wrap form>div {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
    border-bottom: 1px solid #E8EAED;
}

.hsj-form-wrap form label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    width: 220px;
}

.hsj-form-wrap form .wp-editor-wrap {
    width: 100%;
    box-sizing: border-box;
}

.hsj-form-wrap .hjs-input {
    border: 1px solid #CCD0D7;
    border-radius: 0px;
    background-color: white;
    font-size: 16px !important;
    width: 30%;
    font-weight: 400;
    line-height: 24px !important;
    padding: 12px 16px;
    margin-bottom: 20px !important;
    color: #1F2328;
}

.hsj-form-wrap .hjs-input::placeholder {
    color: #768293;
    opacity: 1;
}

#hsj_captcha_input {
    width: 405px;
}

.hsj-form-wrap form .wp-editor-wrap {
    margin-top: 5px;
}

#hsj-editor iframe {
    height: 300px !important;
}

#hsj-editor {
    width: 80%;
    margin-bottom: 20px;
}

.warning-text {
    display: flex;
    align-items: center;
    gap: 20px;
}

.warning-text p {
    display: flex;
    align-items: center;
}

.warning-text p b {
    background: black;
    color: white;
    padding: 2px 11px;
    border-radius: 50px;
    margin-right: 8px;
    font-size: 21px;
}

.warning-text p span {
    font-size: 14px;
    line-height: 22px;
    font-weight: 500;
}


/* 보안문자 */
.hsj-form-wrap .hsj-captcha-code {
    display: inline-block;
    padding: 6px 12px;
    background: #333;
    color: #fff;
    font-family: monospace;
    font-size: 16px;
    border-radius: 0px;
    margin-bottom: 5px;
}

/* 라디오 버튼 */
.hsj-form-wrap form input[type="radio"] {
    margin-right: 5px;
}

.hsj-agree {
    display: flex;
    flex-direction: column;
}

.hsj-agree-actions {
    display: flex;
    gap: 20px;
    justify-content: start;
    margin: 20px 0px 32px 0px;
}

.hsj-agree-actions div {
    display: flex;
}

.hsj-agree label {
    width: 70px !important;
}

/* 페이징 */
.hsj-pagination {
    text-align: center;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hsj-pagination ul {
    list-style: none;
    padding: 0;
    display: flex;
}

.hsj-pagination li {
    display: flex;
    margin: 4px;
}

.hsj-pagination a.page-numbers,
.hsj-pagination span.page-numbers {
    display: inline-block;
    text-decoration: none;
    color: #1F2328;
    font-size: 14px;
    font-weight: 500;
    padding: 0px 20px;
    border: solid 1px #E8EAED;
}

.hsj-pagination .current {
    background-color: #1F2328;
    color: #fff !important;
    border-color: #1F2328 !important;
}

.hsj-write-button {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
}

.hsj-write-button a {
    border-radius: 0 !important;
    text-align: center;
    padding: 12px 80px !important;
}

.hsj-write-button a:hover {
    background-color: #1771F8 !important;
    color: white !important;
    opacity: 0.9;
}

/* 관리자 답변 */
.hsj-view-wrap .hsj-admin-reply {
    margin-top: 30px;
    padding: 15px;
    background: #f7faff;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.hsj-view-wrap .hsj-admin-reply strong {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}

/* 액션 버튼 그룹 */
.hsj-view-wrap .hsj-actions {
    margin-top: 20px;
    text-align: right;
}

.hsj-view-wrap .hsj-actions .button {
    margin-left: 10px;
}

.faq-form-actions {
    display: flex;
    gap: 12px;
    border-bottom: 0 !important;
    justify-content: center;
    margin-top: 60px;
}

#faq-back-list {
    border: solid 1px #CCD0D7;
    background-color: #ffffff !important;
    color: #1F2328 !important;
}

.hsj-reply-wrap .button:hover {
    opacity: 0.8;
    background: #fff;
    border: solid 1px #1771F8;
}


/* view.php 전용 스타일 (하단에 추가) */
.hsj-view-wrap {
    margin: 0 auto;
    background-color: #fff;
}

.hsj-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hsj-meta {
    font-size: 14px;
    color: #768293;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
}

.hsj-replied {
    background-color: #e0e7ff;
    color: #4338ca;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.hsj-divider {
    border-top: 1px solid #E8EAED;
    margin: 24px 0;
}

.hsj-content {
    line-height: 1.8;
    color: #1F2328;
}

.hsj-admin-reply {
    background-color: #f6f7f8;
    padding: 20px;
    border-radius: 4px;
    color: #1F2328;
}

.hsj-admin-reply h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
}

/* 비밀번호 입력 폼 */
.hsj-password-form,
.hsj-actions form {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hsj-input,
.hsj-input-inline {
    padding: 10px;
    border: 1px solid #CCD0D7;
    border-radius: 4px;
    font-size: 14px;
}

.hsj-label {
    margin-right: 8px;
}

.hsj-password-note {
    font-size: 12px;
    color: #768293;
}

/* 버튼 스타일 */
.hsj-actions button {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
}

.hsj-btn-primary {
    background-color: #1771F8;
    color: #fff;
    border: none;
}

.hsj-btn-outline {
    background-color: transparent;
    color: #1F2328;
    border: 1px solid #CCD0D7;
}

.hsj-btn-confirm {
    background-color: #1771F8;
    color: #fff;
    border: none;
}

/* 반응형 */
@media (max-width: 1024px) {

    .warning-text {
        flex-direction: column;
        gap: 0px;
        align-items: start;
    }

    #hsj_captcha_input {
        margin-bottom: 10px !important;
    }
}

@media (max-width: 768px) {

    .hsj-write-button a {
        width: 100%;
    }

    .hsj-form-wrap form>div {
        flex-direction: column;
        align-items: start;
    }

    .hsj-form-wrap .hjs-input,
    #hsj-editor,
    #hsj_captcha_input,
    .faq-form-actions .button,
    .hsj-secret {
        width: 100%;
    }

    .hsj-agree-actions {
        flex-direction: column;
        gap: 10px;
        margin: 0px 0 32px 0;
    }

    .faq-form-actions {
        margin-top: 40px;
    }

    .hsj-view-wrap {
        padding: 20px 10px;
    }

    .hsj-actions {
        flex-wrap: wrap;
        gap: 4px;
    }
}