@charset "UTF-8";

/* 離脱防止ポップアップのスタイル */
#exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#exit-popup-overlay.show {
    opacity: 1;
}

#exit-popup-container {
    position: relative;
    max-width: 500px;
    width: 90%;
    background: transparent;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

#exit-popup-overlay.show #exit-popup-container {
    transform: scale(1);
}

#exit-popup-image-wrapper {
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#exit-popup-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

#exit-popup-close:hover {
    background-color: #f44336;
    color: #fff;
    transform: rotate(90deg);
}

#exit-popup-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

#exit-popup-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* 詳しく見るボタンのスタイル */
.exit-popup-button {
    display: inline-block;
    padding: 15px 40px;
    margin: 20px 0;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.exit-popup-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* レスポンシブデザイン - スマートフォン */
@media (max-width: 768px) {
    #exit-popup-container {
        max-width: 400px;
        width: 85%;
    }
    
    #exit-popup-close {
        top: -15px;
        right: -15px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .exit-popup-button {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* より小さい画面 */
@media (max-width: 480px) {
    #exit-popup-container {
        max-width: 350px;
        width: 90%;
    }
    
    .exit-popup-button {
        padding: 10px 25px;
        font-size: 13px;
    }
}

/* アクセシビリティ対応 */
#exit-popup-close:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* アニメーション追加 */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

#exit-popup-overlay.show #exit-popup-container {
    animation: bounceIn 0.6s ease;
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
    #exit-popup-close {
        background-color: #333;
        color: #fff;
    }
    
    #exit-popup-close:hover {
        background-color: #f44336;
    }
}

/* z-indexの競合を防ぐ */
body.exit-popup-open {
    overflow: hidden;
}