/* =========================================================
   [Common] 모달 공통 스타일
   파일명: modal-common.css
   설명: 모달의 위치, 배경, 헤더 등 기본 프레임 정의.
   ========================================================= */

/* 1. 백드롭 (배경 어둡게 + 블러 처리) */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    /*backdrop-filter: blur(4px);*/ /* 블러 효과 */
    z-index: 9998;              /* 모달 바로 아래 */
    /*display: none;*/              /* 기본은 숨김 (JS로 제어) */
}

/* 2. 모달 윈도우 프레임 */
.modal-window {
    position: fixed;
    z-index: 9999; /* 백드롭보다 위에 위치 */

    /* 기본 디자인 */
    background-color: #fff;
    /*border: 1px solid #ccc;*/
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);

    /* 레이아웃 */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 모달 전체 스크롤 방지 */

    /* 기본 폰트 */
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;

    /* 초기 위치 (화면 중앙) */
    top: 50%;
    left: 50%;

    /* 안전장치: 화면보다 클 경우 */
    max-width: 95vw;
    max-height: 80vh;
}

/* 3. 모달 헤더 (드래그 핸들 영역) */
.modal-header {
    padding: 16px 24px;
    background-color: #f8f9fa;
    /*border-bottom: 1px solid #e0e0e0;*/

    display: flex;
    justify-content: space-between;
    align-items: center;

    user-select: none; /* 드래그 중 텍스트 선택 방지 */
    transition: background-color 0.2s;
}

/* 드래그 활성화 시 커서 변경 */
.modal-header.is-draggable {
    cursor: move;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
	color: #fff;
}

/* 4. 닫기 버튼 */
.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
	color: #fff;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

/* 5. 모달 본문 영역 */
.modal-body {
    background-color: #fff;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 6. 로딩 애니메이션 */
.loader {
    width: 100%; height: 100%;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1rem;
}