/* 기본 모달 공통 스타일 */

/* 모달 오버레이 */
.base-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

/* 모달이 활성화될 때 */
.base-modal.active {
    background-color: rgba(0, 0, 0, 0.7);
}

/* 페이드 애니메이션 */
.fade-modal .modal-container {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.fade-modal.active .modal-container {
    opacity: 1;
    transform: scale(1);
}

/* 모달 컨테이너 */
.base-modal .modal-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

/* 모달 콘텐츠 */
.base-modal .modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* 닫기 버튼 */
.base-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.base-modal .modal-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

/* 모달 바디 */
.base-modal .modal-body {
    overflow: auto;
    max-height: calc(90vh - 80px);
}

/* 반응형 - 모바일 */
@media screen and (max-width: 768px) {
    .base-modal .modal-container {
        max-width: 95%;
        max-height: 95%;
    }
    
    .base-modal .modal-content {
        border-radius: 0;
    }
    
    .base-modal .modal-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 12px;
        right: 12px;
    }
    
    .base-modal .modal-body {
        max-height: calc(95vh - 60px);
    }
}

/* 스크롤바 스타일 */
.base-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

.base-modal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.base-modal .modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.base-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}
