@charset "utf-8";

/* consult-modal — 참고: components/ui/modal/modal.css, components/ui/select/select.css */

.consult-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.consult-modal.is-open {
    display: flex;
}

.consult-modal-dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.consult-modal-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    min-width: 0;
    max-height: 90vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.12);
}

.consult-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.consult-modal-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: left;
    line-height: 1.35;
}

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

.consult-modal-close:hover {
    opacity: 0.65;
}

.consult-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem;
}

.consult-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.consult-modal-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
}

.consult-modal-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
}

.consult-modal-input,
.consult-modal-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 3.125rem;
    padding: 0 0.75rem;
    border: 1px solid #c5ccd4;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.875rem;
    color: #333;
    font-family: inherit;
}

.consult-modal-input::placeholder,
.consult-modal-textarea::placeholder {
    color: #999;
}

.consult-modal-textarea {
    min-height: 6rem;
    padding: 0.75rem;
    resize: vertical;
}

/* 체크박스 (components/ui/checkbox/checkbox.css 패턴 · 스코프: .consult-modal) */
.consult-modal .consult-modal-custom-chk.custom-chk-inp-wrap:not(.consult-modal-privacy-row) {
    display: block;
    width: 100%;
}

.consult-modal .consult-modal-custom-chk.custom-chk-inp-wrap {
    width: 100%;
    margin: 0;
    padding-top: 0.125rem;
}

.consult-modal .consult-modal-custom-chk.consult-modal-privacy-row.custom-chk-inp-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.125rem 0.375rem;
}

.consult-modal .consult-modal-privacy-row .consult-check.chk {
    flex: 1 1 auto;
    min-width: 0;
}

.consult-modal .consult-terms-link {
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.45;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.consult-modal .consult-terms-link:hover {
    text-decoration: underline;
}

.consult-modal .consult-modal-custom-chk .chk {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.consult-modal .consult-modal-custom-chk input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.consult-modal .consult-modal-custom-chk .chkbox {
    display: inline-block;
    flex-shrink: 0;
    margin-top: 0.0625rem;
    width: 1.25rem;
    height: 1.25rem;
    border: 1.5px solid #888;
    border-radius: 0.25rem;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.75rem 0.75rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, opacity 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;
}

.consult-modal .consult-modal-custom-chk .txt,
.consult-modal .consult-modal-custom-chk .chk-label {
    font-size: 0.875rem;
    line-height: 1.45;
    color: #111;
}

.consult-modal .consult-modal-custom-chk input[type="checkbox"]:checked + .chkbox {
    background-color: var(--primary, #000);
    border-color: var(--primary, #000);
    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");
}

.consult-modal-footer {
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    flex-shrink: 0;
    border-top: 1px solid #eee;
    position: sticky;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92), #fff);
}

.consult-modal-submit {
    width: 100%;
    height: 3rem;
    text-align: center;
    border: none;
    border-radius: 0.5rem;
    background: #000;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.consult-modal-submit:hover {
    opacity: 0.92;
}

/* 커스텀 셀렉트 (select 컴포넌트 패턴 · 스코프: .consult-modal) */
.consult-modal .consult-modal-select-root .consult-select {
    position: relative;
    width: 100%;
}

.consult-modal .consult-modal-select-root .consult-select .select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 3.125rem;
    padding: 0 0.75rem;
    border: 1px solid #c5ccd4;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.875rem;
    color: #333;
    cursor: pointer;
    box-sizing: border-box;
}

.consult-modal .consult-modal-select-root .consult-select .select-trigger .arrow {
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: transform 0.25s ease;
}

.consult-modal .consult-modal-select-root .consult-select.active .select-trigger .arrow {
    transform: rotate(180deg);
}

.consult-modal .consult-modal-select-root .consult-select .select-options {
    display: none;
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    width: 100%;
    max-height: 12.5rem;
    overflow-y: auto;
    border: 1px solid #c5ccd4;
    border-radius: 0.5rem;
    background: #fff;
    z-index: 20;
    margin: 0;
    padding: 0;
    list-style: none;
    box-sizing: border-box;
}

.consult-modal .consult-modal-select-root .consult-select .select-options li {
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.consult-modal .consult-modal-select-root .consult-select .select-options li:hover {
    background: #f1f3f5;
}

@media screen and (min-width: 768px) {
    .consult-modal-inner {
        min-width: 520px;
    }
}

@media screen and (max-width: 640px) {
    .consult-modal-inner {
        max-width: 100%;
    }

    .consult-modal-row {
        grid-template-columns: 1fr;
    }
}
