/**
 * 홈페이지 팝업 스타일
 * 플라이주차대행
 */

/* 팝업 오버레이 */
.home-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-popup-overlay.show {
    display: flex;
    opacity: 1;
}

/* 팝업 컨테이너 */
.home-popup-container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* 팝업 헤더 */
.home-popup-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #f8f9fa;
    flex-shrink: 0;
    position: relative;
}

.home-popup-title {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
    margin: 0;
    flex: 1;
}

/* 팝업 내용 */
.home-popup-content {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* 이미지 팝업 */
.home-popup-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.home-popup-image-link {
    display: block;
    text-decoration: none;
}

.home-popup-image-link:hover {
    opacity: 0.95;
}

/* 텍스트 팝업 */
.home-popup-text {
    font-size: 16px;
    line-height: 1.7;
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.home-popup-text h1,
.home-popup-text h2,
.home-popup-text h3,
.home-popup-text h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #212529;
}

.home-popup-text p {
    margin-bottom: 15px;
}

.home-popup-text p:last-child {
    margin-bottom: 0;
}

/* HTML 팝업 */
.home-popup-html {
    font-size: 16px;
    line-height: 1.7;
    color: #495057;
}

/* 팝업 푸터 */
.home-popup-footer {
    padding: 15px 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    flex-shrink: 0;
}

.home-popup-dont-show {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #6c757d;
}

.home-popup-dont-show input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0284c7;
}

.home-popup-dont-show:hover {
    color: #495057;
}

.home-popup-close-btn {
    background: #6c757d;
    border: none;
    color: #fff;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.home-popup-close-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.home-popup-close-btn:active {
    transform: translateY(0);
}

/* 링크 버튼 */
.home-popup-link-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.home-popup-link-btn:hover {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    color: #fff;
}

/* 반응형 */
@media (max-width: 768px) {
    .home-popup-container {
        border-radius: 12px;
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .home-popup-header {
        padding: 15px 20px;
    }
    
    .home-popup-title {
        font-size: 18px;
    }
    
    .home-popup-close {
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
    
    .home-popup-content {
        padding: 20px;
    }
    
    .home-popup-footer {
        padding: 12px 20px;
        flex-direction: row;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
    }
    
    .home-popup-dont-show {
        flex: 1;
    }
    
    .home-popup-close-btn {
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* 로딩 상태 */
.home-popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #6c757d;
    font-size: 16px;
}

.home-popup-loading::before {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #0284c7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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