﻿/* 모던 팝업 스타일 */
:root {
    --popup-primary: #3b82f6;
    --popup-primary-hover: #2563eb;
    --popup-text: #1e293b;
    --popup-text-light: #64748b;
    --popup-border: #e2e8f0;
    --popup-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --popup-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --popup-radius: 12px;
    --popup-animation-duration: 0.3s;
}

/* 팝업 오버레이 */
.modern-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    overflow: auto;
    padding: 20px;
    max-height: 100vh;
    transition: opacity var(--popup-animation-duration) ease-in-out, visibility var(--popup-animation-duration) ease-in-out;
}

.popup-visible {
    opacity: 1;
    visibility: visible;
}

.popup-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 팝업 컨테이너 */
.modern-popup-container {
    background: white;
    border-radius: var(--popup-radius);
    box-shadow: var(--popup-shadow);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    transform: translate(-50%, -50%);
    z-index: 1051;
    opacity: 1;
    transition: transform var(--popup-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1), opacity var(--popup-animation-duration) ease, box-shadow var(--popup-animation-duration) ease;
}

.popup-visible .modern-popup-container {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: popup-enter var(--popup-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-hidden .modern-popup-container {
    opacity: 0;
}

@keyframes popup-enter {
    from {
        transform: translate(-50%, calc(-50% + 30px)) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* 팝업 헤더 */
.modern-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--popup-border);
    background-color: #f8fafc;
    cursor: move;
}

.popup-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--popup-text);
}

.popup-title-icon {
    margin-right: 8px;
    color: var(--popup-primary);
    font-size: 18px;
}

.modern-close-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--popup-text-light);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .modern-close-btn:hover {
        background-color: rgba(0, 0, 0, 0.05);
        color: #ef4444;
    }

    .modern-close-btn i {
        font-size: 14px;
    }

/* 팝업 바디 */
.modern-popup-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    color: var(--popup-text);
}

/* 팝업 푸터 */
.modern-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--popup-border);
    background-color: #f8fafc;
}

/* 버튼 스타일 */
.popup-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.popup-btn-primary {
    background-color: var(--popup-primary);
    color: white;
}

    .popup-btn-primary:hover {
        background-color: var(--popup-primary-hover);
    }

.popup-btn-secondary {
    background-color: white;
    color: var(--popup-text);
    border: 1px solid var(--popup-border);
}

    .popup-btn-secondary:hover {
        background-color: #f1f5f9;
    }

.popup-btn-danger {
    background-color: #ef4444;
    color: white;
}

    .popup-btn-danger:hover {
        background-color: #dc2626;
    }

/* 반응형 디자인 */
@media (max-width: 768px) {
    .modern-popup-container {
        width: 90vw !important;
        min-width: unset !important;
        max-width: 90vw !important;
        border-radius: 10px;
    }

    .modern-popup-header {
        padding: 14px 16px;
    }

    .modern-popup-body {
        padding: 16px;
    }

    .modern-popup-footer {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .modern-popup-overlay {
        padding: 10px;
    }

    .modern-popup-container {
        width: 95vw !important;
        max-width: 95vw !important;
    }

    .popup-title {
        font-size: 15px;
    }

    .modern-popup-header,
    .modern-popup-body,
    .modern-popup-footer {
        padding: 12px;
    }
}
