/**
 * 모달 공통 스타일
 * payment-modal과 update-info-modal에서 공통으로 사용하는 스타일
 */

/* 모달 기본 구조 */
.modal-base {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    font-family: 'Pretendard', 'Malgun Gothic', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.modal-container {
    position: relative;
    width: 70rem;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 0.8rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: 5vh auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: linear-gradient(135deg, var(--Mint_300, #43b3d9) 0%, var(--Mint_400, #0b8cb7) 100%);
    color: #fff;
    padding: 2.4rem;
    text-align: center;
    position: relative;
}

.modal-header h3 {
    margin: 0 0 0.4rem 0;
    font-size: 2.4rem;
    font-weight: 700;
    color: white;
}

.modal-header p {
    margin: 0;
    font-size: 1.4rem;
    opacity: 0.9;
    color: white;
}

.modal-close {
    position: absolute;
    top: 1.6rem;
    right: 1.6rem;
    background: none;
    border: none;
    font-size: 2.4rem;
    cursor: pointer;
    color: white;
    width: 3.2rem;
    height: 3.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    flex: 1;
    padding: 1.2rem;
    overflow-y: auto;
    max-height: calc(90vh - 20rem);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.modal-body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.modal-footer {
    height: 1.2rem;
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 1.2rem;
    width: 100%;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--Black, #111);
    font-size: 1.4rem;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 0.2rem;
}

.form-group input {
    width: 100%;
    padding: 1.6rem;
    border: 1px solid var(--Line_Default, #DEDEDE);
    border-radius: 0.8rem;
    font-size: 1.6rem;
    line-height: 2.2rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: white;
}

.form-group select {
    width: 100%;
    padding: 1.6rem;
    padding-right: 4rem;
    border: 1px solid var(--Line_Default, #DEDEDE);
    border-radius: 0.8rem;
    font-size: 1.6rem;
    line-height: 2.2rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.6rem center;
    background-size: 1.2rem;
    color: var(--Black, #111);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--Blue_400, #046EB7);
    box-shadow: 0 0 0 2px rgba(4, 110, 183, 0.1);
}

/* 주민등록번호 입력 행 */
.jumin-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.jumin-row input {
    flex: 1;
    margin: 0;
}

.jumin-separator {
    font-size: 1.6rem;
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
}

/* 주소 입력 행 */
.address-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.address-row input {
    flex: 1;
    margin: 0;
}

/* 버튼 스타일 */
.btn {
    padding: 1.2rem 2rem;
    border: none;
    border-radius: 0.6rem;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.btn-gray {
    background: var(--btn_bg, #e7ecef);
    color: var(--Black, #111);
    border: 1px solid var(--Line_Default, #DEDEDE);
}

.btn-gray:hover {
    background: #d0d7dc;
}

.btn-blue {
    background: var(--Blue_400, #046EB7);
    color: white;
}

.btn-blue:hover {
    background: var(--Blue_300, #409ddc);
}

.btn.outline {
    background: white;
    color: var(--Blue_400, #046EB7);
    border: 1px solid var(--Blue_400, #046EB7);
}

.btn.outline:hover {
    background: var(--Blue_400, #046EB7);
    color: white;
}

/* 도움말 텍스트 */
.help-text {
    font-size: 1.3rem;
    color: #666;
    margin-top: 0.6rem;
    line-height: 1.5;
}

.help-text.important {
    color: var(--Blue_400, #046EB7);
    font-weight: 500;
}

/* 로딩 스피너 */
.loading-spinner {
    width: 2.4rem;
    height: 2.4rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--Blue_400, #046EB7);
    border-radius: 50%;
    animation: modal-spin 1s linear infinite;
}

@keyframes modal-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 유틸리티 클래스 */
.c-green {
    color: #28a745;
}

.c-red {
    color: #dc3545;
}

.fs24 {
    font-size: 2.4rem;
}

.fs16 {
    font-size: 1.6rem;
}

.fw600 {
    font-weight: 600;
}

.mb16 {
    margin-bottom: 1.6rem;
}

.mb32 {
    margin-bottom: 3.2rem;
}

.xl48 {
    padding: 1.2rem 2.4rem;
    font-size: 1.6rem;
    height: 4.8rem;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.gap16 {
    gap: 1.6rem;
}

.jc-c {
    justify-content: center;
}

