/**
 * FAQ 질문하기 — 체크박스·모달 (components/ui 참고, FAQ 전용 복제)
 * 스코프: .faq-ask-page 체크박스 / .ui-modal (질문 페이지 전용 인스턴스)
 */

/* --- Checkbox (components/ui/checkbox) --- */
.faq-ask-page .custom-chk-inp-wrap {
    display: block;
    width: 100%;
    margin: 0;
}

.faq-ask-page .custom-chk-inp-wrap .chk {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.faq-ask-page .custom-chk-inp-wrap input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.faq-ask-page .custom-chk-inp-wrap .chkbox {
    flex: 0 0 auto;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1.5px solid #888;
    border-radius: 4px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.faq-ask-page .custom-chk-inp-wrap .txt,
.faq-ask-page .custom-chk-inp-wrap .chk-label {
    font-size: 0.875rem;
    color: #111;
    line-height: 1.5;
}

.faq-ask-page .custom-chk-inp-wrap .txt em {
    font-style: normal;
    font-weight: 700;
    color: #c0392b;
}

.faq-ask-page .custom-chk-inp-wrap .txt .chk-link,
.faq-ask-page .custom-chk-inp-wrap .chk-label .chk-link {
    margin-left: 0.15em;
    padding: 0;
    border: 0;
    background: none;
    font-size: inherit;
    font-family: inherit;
    text-decoration: underline;
    color: #111;
    cursor: pointer;
}

.faq-ask-page .custom-chk-inp-wrap input:checked + .chkbox {
    background-color: var(--variation-color, rgb(140 121 101 / 96%));
    border-color: var(--variation-color, rgb(140 121 101 / 96%));
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* --- Modal (components/ui/modal) --- */
.faq-ask-page .ui-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.faq-ask-page .ui-modal.is-open {
    display: flex;
}

.faq-ask-page .ui-modal-dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.faq-ask-page .ui-modal-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 48px);
    background: #fff;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.faq-ask-page .ui-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.faq-ask-page .ui-modal-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: left;
    line-height: 1.3;
}

.faq-ask-page .ui-modal-close {
    font-size: 1.75rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq-ask-page .ui-modal-close:hover {
    opacity: 0.65;
}

.faq-ask-page .ui-modal-tabs {
    display: none;
}

.faq-ask-page .ui-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    font-size: 0.875rem;
    color: #444;
    line-height: 1.65;
}

.faq-ask-page .ui-modal-body .faq-ask-privacy-terms {
    margin: 0;
}

.faq-ask-page .ui-modal-body .faq-ask-privacy-terms + .faq-ask-privacy-terms {
    margin-top: 0.75rem;
}

.faq-ask-page .ui-modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.faq-ask-page .ui-modal-footer .btn-confirm {
    width: 100%;
    display: inline-block;
    text-align: center;
    margin: 0 auto;
    height: 48px;
    background: var(--variation-color, rgb(140 121 101 / 96%));
    color: #fff;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
}

.faq-ask-page .ui-modal-footer .btn-confirm:hover {
    opacity: 0.88;
}
