@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:focus,
.consult-modal-textarea:focus {
    outline: none;
    border-color: #c9a8d6 !important;
    box-shadow: 0 0 0 3px rgba(119, 53, 148, 0.16);
}

.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;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    margin: 0;
    border: none;
    border-radius: 4px;
    background: #eee;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.45;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.consult-modal .consult-terms-link:hover {
    background: #e4e4e4;
    text-decoration: none;
}

.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: var(--primary, #773594);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

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

/* 사고대차 전용: 차바로 폼 레이아웃 · 타봄 퍼플 팔레트 */
.accident-consult-modal .consult-modal-form {
    gap: 16px;
}

.accident-consult-field {
    position: relative;
}

.accident-consult-field input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    color: #111;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.accident-consult-field--req input {
    padding-right: 36px;
}

.accident-consult-field input::placeholder {
    color: #888;
    opacity: 1;
}

.accident-consult-field input:focus {
    outline: none;
    border-color: #c9a8d6 !important;
    box-shadow: 0 0 0 3px rgba(119, 53, 148, 0.16);
}

.accident-consult-field input.validation-error {
    border-color: #c00;
}

.accident-consult-star {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #e60023;
    font-size: 16px;
    pointer-events: none;
}

/* 지역 선택 셀렉트 (components/ui/select 마크업 구조 · 사고대차 모달 전용 스코프) */
.accident-select-root .custom-select {
    position: relative;
    width: 100%;
}

.accident-select-root .custom-select .select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    font-family: inherit;
    color: #111;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

.accident-select-root .custom-select .select-trigger__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accident-select-root .custom-select .select-trigger__text.is-placeholder {
    color: #888;
}

.accident-select-root .custom-select .select-trigger .arrow {
    flex-shrink: 0;
    color: #888;
    transition: transform 0.25s ease;
}

.accident-select-root .custom-select.active .select-trigger {
    border-color: #c9a8d6;
    box-shadow: 0 0 0 3px rgba(119, 53, 148, 0.16);
}

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

.accident-select-root .custom-select .select-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-height: 200px;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    list-style: none;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    z-index: 10;
    box-sizing: border-box;
}

.accident-select-root .custom-select .select-options li {
    padding: 12px 16px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
}

.accident-select-root .custom-select .select-options li:hover {
    background: #f5f5f5;
}

.accident-select-root .custom-select .select-options li.is-selected {
    background: rgba(119, 53, 148, 0.1);
    color: var(--primary, #773594);
    font-weight: 600;
}

.accident-consult-way {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.accident-consult-way__title {
    display: block;
    padding: 0;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.accident-consult-way__options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.accident-consult-way__options label {
    display: block;
    cursor: pointer;
}

.accident-consult-way__options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.accident-consult-way__options span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 8px;
    background: #f5f5f5;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.accident-consult-way__options input:checked + span {
    background: rgba(119, 53, 148, 0.14);
    color: var(--primary, #773594);
}

.accident-consult-modal .consult-modal-custom-chk {
    margin-top: 10px;
}

.accident-consult-modal .consult-modal-footer {
    margin-top: 12px;
    padding-top: 0;
    border-top: 0;
    background: none;
}

.accident-consult-modal .consult-modal-submit {
    height: 56px;
    border-radius: 10px;
    background: var(--primary, #773594);
    font-size: 17px;
    font-weight: 700;
}

/* 커스텀 셀렉트 (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;
    }
}
