/**
 * 離脱防止ポップアップ スタイルシート
 */

/* ========== オーバーレイ ========== */
.exit-intent-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}

/* フレックスボックスで中央配置 */
.exit-intent-overlay {
    display: flex;
}

/* ========== ポップアップ本体 ========== */
.exit-intent-popup {
    position: relative;
    background: transparent;
    max-width: 600px;
    width: auto;
    max-height: 90vh;
    animation: popupSlideIn 0.3s ease-out;
}

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

/* ========== 閉じるボタン ========== */
.exit-intent-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #ffffff;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.exit-intent-close:hover {
    background: rgba(255, 0, 0, 0.9);
    transform: rotate(90deg) scale(1.1);
}

/* ========== バナー画像 ========== */
.exit-intent-banner {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    cursor: default;
}

/* リンクがある場合はカーソルをポインターに */
.exit-intent-banner-link {
    display: block;
    text-decoration: none;
}

.exit-intent-banner-link .exit-intent-banner {
    cursor: pointer;
}

.exit-intent-banner-link:hover .exit-intent-banner,
.exit-intent-banner-link .exit-intent-banner:hover {
    transform: scale(1.02);
}



/* ========== レスポンシブ対応 ========== */
@media (max-width: 768px) {
    .exit-intent-popup {
        max-width: 90%;
    }

    .exit-intent-banner {
        max-width: 90vw;
        max-height: 80vh;
    }

    .exit-intent-close {
        top: -10px;
        right: -10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .exit-intent-popup {
        max-width: 95%;
    }

    .exit-intent-banner {
        max-width: 95vw;
        max-height: 75vh;
        border-radius: 8px;
    }

    .exit-intent-close {
        top: -8px;
        right: -8px;
        width: 36px;
        height: 36px;
        font-size: 18px;
        border-width: 2px;
    }
}


