/**
 * 用户行为分析 - 策略展示样式
 */

/* Overlay */
.uba-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.uba-overlay.active {
    opacity: 1;
}

/* Popup Container */
.uba-popup {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Modal Style */
.uba-popup.uba-modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
    width: 90%;
    max-width: 480px;
}

.uba-popup.uba-modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.uba-popup-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.uba-popup-image {
    max-width: 200px;
    max-height: 150px;
    margin-bottom: 16px;
    border-radius: 8px;
}

.uba-popup-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.uba-popup-message {
    margin: 0 0 24px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.uba-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uba-popup-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.uba-popup-btn.uba-btn-primary {
    background: #1890ff;
    color: #fff;
}

.uba-popup-btn.uba-btn-primary:hover {
    background: #40a9ff;
}

.uba-popup-btn.uba-btn-large {
    padding: 16px 48px;
    font-size: 16px;
}

.uba-popup-cancel {
    background: transparent;
    color: #999;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 14px;
}

.uba-popup-cancel:hover {
    color: #666;
}

/* Slide In Style */
.uba-popup.uba-slide-in {
    top: 20px;
    right: 20px;
    width: 320px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.uba-popup.uba-slide-in.active {
    opacity: 1;
    transform: translateX(0);
}

.uba-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.uba-popup-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.uba-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.uba-popup-close:hover {
    color: #333;
}

.uba-popup-body {
    padding: 16px;
}

.uba-popup-body p {
    margin: 12px 0 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.uba-popup-footer {
    padding: 16px;
    border-top: 1px solid #eee;
}

/* Fullscreen Style */
.uba-popup.uba-fullscreen {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.uba-popup.uba-fullscreen.active {
    opacity: 1;
}

.uba-popup.uba-fullscreen .uba-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 32px;
}

.uba-popup.uba-fullscreen .uba-popup-image {
    max-width: 300px;
    margin-bottom: 24px;
}

.uba-popup.uba-fullscreen h2 {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-align: center;
}

.uba-popup.uba-fullscreen p {
    margin: 0 0 32px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    max-width: 400px;
    line-height: 1.6;
}

/* Toast */
.uba-toast {
    position: fixed;
    padding: 12px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    color: #333;
    z-index: 100000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.uba-toast.active {
    opacity: 1;
    transform: translateY(0);
}

/* Toast Positions */
.uba-toast-top-right {
    top: 20px;
    right: 20px;
}

.uba-toast-top-left {
    top: 20px;
    left: 20px;
}

.uba-toast-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.uba-toast-top-center.active {
    transform: translateX(-50%) translateY(0);
}

.uba-toast-bottom-right {
    bottom: 20px;
    right: 20px;
    transform: translateY(20px);
}

.uba-toast-bottom-right.active {
    transform: translateY(0);
}

.uba-toast-bottom-left {
    bottom: 20px;
    left: 20px;
    transform: translateY(20px);
}

.uba-toast-bottom-left.active {
    transform: translateY(0);
}

/* Toast Types */
.uba-toast-info {
    border-left: 4px solid #1890ff;
}

.uba-toast-success {
    border-left: 4px solid #52c41a;
}

.uba-toast-warning {
    border-left: 4px solid #faad14;
}

.uba-toast-error {
    border-left: 4px solid #ff4d4f;
}

/* Responsive */
@media (max-width: 480px) {
    .uba-popup.uba-modal {
        width: 95%;
        padding: 20px;
    }

    .uba-popup.uba-slide-in {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }

    .uba-popup.uba-fullscreen h2 {
        font-size: 22px;
    }
}
