/* 離脱時のポップアップスタイル */
.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: visible !important;
}

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

.exit-popup {
    background: white;
    border-radius: 15px;
    padding: 0;
    max-width: 90%;
    width: 400px;
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
    overflow: visible !important;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.exit-popup-header {
    position: relative;
    padding: 10px 15px 0;
}

.exit-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.exit-popup-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.exit-popup-content {
    padding: 15px;
    text-align: center;
}

.exit-popup-content h3 {
    color: #023e71;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 3px;
    line-height: 1.2;
}

.exit-popup-content p {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 10px;
}

.exit-popup-staff {
    text-align: center;
    margin: 8px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.exit-popup-staff .staff-image {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #023e71;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.exit-popup-staff .staff-image:hover {
    transform: scale(1.1);
}



.exit-popup-buttons {
    margin-top: 6px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.exit-popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    position: relative;
    flex: 1;
    max-width: 120px;
}

.exit-popup-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
    border-radius: 8px;
    pointer-events: none;
}

.exit-popup-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.exit-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    color: #ffffff;
}

.exit-popup-btn.line-btn {
    background: #0d5608;
    position: relative;
    overflow: visible;
}

.exit-popup-btn.line-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, transparent 40%, rgba(255,255,255,0.8) 50%, transparent 60%, transparent 100%);
    background-size: 200% 200%;
    background-position: -200% -200%;
    animation: glow 5s ease-in-out infinite;
    pointer-events: none;
}

.exit-popup-btn.line-btn:hover {
    background: #009900;
}

.exit-popup-btn.phone-btn {
    background: #770707;
    position: relative;
    overflow: visible;
}

.exit-popup-btn.phone-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, transparent 40%, rgba(255,255,255,0.8) 50%, transparent 60%, transparent 100%);
    background-size: 200% 200%;
    background-position: -200% -200%;
    animation: glow 5s ease-in-out infinite;
    pointer-events: none;
}

.exit-popup-btn.phone-btn:hover {
    background: #012a4a;
}

@keyframes glow {
    0%, 85%, 100% {
        background: linear-gradient(45deg, transparent 0%, transparent 40%, rgba(255,255,255,0) 50%, transparent 60%, transparent 100%);
        background-size: 200% 200%;
        background-position: -200% -200%;
    }
    92.5% {
        background: linear-gradient(45deg, transparent 0%, transparent 40%, rgba(255,255,255,0.4) 50%, transparent 60%, transparent 100%);
        background-size: 200% 200%;
        background-position: 200% 200%;
    }
}

.exit-popup-note {
    font-size: 0.8rem;
    color: #666;
    margin-top: 15px;
    line-height: 1.4;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .exit-popup {
        width: 95%;
        max-width: 350px;
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        margin: 20px;
    }
    
    .exit-popup-content {
        padding: 12px;
    }
    
    .exit-popup-content h3 {
        font-size: 1.3rem;
    }
    
    .exit-popup-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .exit-popup-btn {
        max-width: none;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* アニメーション */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.exit-popup.show {
    animation: popupFadeIn 0.3s ease forwards;
}

/* ローディング状態 */
.exit-popup-submit.loading {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.exit-popup-submit.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* アクセシビリティ */
.exit-popup:focus {
    outline: 2px solid #023e71;
    outline-offset: 2px;
}

.exit-popup-close:focus {
    outline: 2px solid #023e71;
    outline-offset: 2px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .exit-popup-overlay {
        background-color: rgba(0, 0, 0, 0.9);
    }
    
    .exit-popup {
        border: 2px solid #000;
    }
    
    .exit-popup-form input {
        border: 2px solid #000;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .exit-popup {
        background: #2a2a2a;
        color: #fff;
    }
    
    .exit-popup-content h3 {
        color: #4a9eff;
    }
    
    .exit-popup-content p {
        color: #e0e0e0;
    }
    
    .exit-popup-form input {
        background: #3a3a3a;
        border-color: #555;
        color: #fff;
    }
    
    .exit-popup-form input::placeholder {
        color: #aaa;
    }
    
    .exit-popup-note {
        color: #aaa;
    }
} 