/* ポップアップ用スタイル */
.rvt-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.rvt-popup-overlay.active {
    display: flex;
}

.rvt-popup-container {
    width: 90%;
    max-width: 600px;
    margin: auto;
}

.rvt-popup-content {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 0 19px rgba(100, 150, 255, 0.3);
    overflow: hidden;
}

.rvt-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.rvt-popup-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.rvt-popup-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.rvt-popup-close:hover {
    color: #333;
}

.rvt-popup-body {
    padding: 20px;
}

.rvt-popup-footer {
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .rvt-popup-container {
        width: 95%;
    }
    
    .rvt-popup-header h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .rvt-popup-body {
        padding: 15px;
    }
    
    .rvt-popup-footer {
        padding: 10px 15px;
    }
}

/* ポップアップアニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.rvt-popup-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rvt-popup-overlay.active {
    animation: fadeIn 0.3s ease forwards;
}

.rvt-popup-container {
    transform: scale(0.9);
    opacity: 0;
}

.rvt-popup-overlay.active .rvt-popup-container {
    animation: scaleIn 0.3s ease-out 0.1s forwards;
}

/* 閉じるアニメーション */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes scaleOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.9);
        opacity: 0;
    }
}

.rvt-popup-overlay {
    opacity: 0;
    transition: none;
    display: none;
}

.rvt-popup-overlay.active {
    opacity: 1;
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.rvt-popup-overlay.closing {
    opacity: 1;
    display: flex;
    animation: fadeOut 0.3s ease forwards;
    pointer-events: none; /* アニメーション中のクリックを防止 */
}

.rvt-popup-container {
    transform: scale(0.9);
    opacity: 0;
}

.rvt-popup-overlay.active .rvt-popup-container {
    animation: scaleIn 0.3s ease-out 0.1s forwards;
}

.rvt-popup-overlay.closing .rvt-popup-container {
    transform: scale(1);
    opacity: 1;
    animation: scaleOut 0.25s ease forwards;
}