/* Browser Back Popup Styles */

.bbp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
}

.bbp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.bbp-modal-content {
    position: relative;
    background-color: #ffffff;
    padding: 0;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 2;
    animation: bbpModalSlideIn 0.3s ease-out;
}

@keyframes bbpModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bbp-banner-image {
    width: 100%;
    line-height: 0;
}

.bbp-banner-image img {
    width: 100%;
    height: auto;
    display: block;
}

.bbp-banner-link {
    display: block;
    line-height: 0;
}

.bbp-modal-buttons {
    display: flex;
    gap: 15px;
    padding: 20px;
    background-color: #f8f8f8;
    border-top: 1px solid #e0e0e0;
}

.bbp-button {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.bbp-button-close {
    background-color: #6c757d;
    color: #ffffff;
    order: 1; /* 左側に配置 */
}

.bbp-button-close:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.bbp-button-apply {
    background-color: #ff6b6b;
    color: #ffffff;
    order: 2; /* 右側に配置 */
}

.bbp-button-apply:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

/* レスポンシブデザイン */
@media (max-width: 480px) {
    .bbp-modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
    }
    
    .bbp-modal-buttons {
        padding: 15px;
        gap: 10px;
    }
    
    .bbp-button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* アクセシビリティ向上 */
.bbp-button:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
    .bbp-modal-content {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .bbp-modal-buttons {
        background-color: #2a2a2a;
        border-top-color: #444;
    }
}