/**
 * 增强型Toast样式 - 愿百应CMS
 * 基于配色方案规范：linear-gradient(135deg, #667eea 0%, #764ba2 100%)
 * 
 * 设计特性：
 * - 现代化渐变背景
 * - 优雅动画效果
 * - 响应式设计
 * - 多种提示类型支持
 */

/* Toast容器 */
.enhanced-toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
    width: 100%;
    max-width: 480px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Toast基础样式 */
.enhanced-toast {
    position: relative;
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.enhanced-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.enhanced-toast.removing {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
    transition: all 0.3s ease-in;
}

/* Toast内容区域 */
.enhanced-toast-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    position: relative;
    z-index: 2;
}

/* 图标样式 */
.enhanced-toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    margin-right: 15px;
    font-size: 18px;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 消息文本 */
.enhanced-toast-message {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    margin-right: 15px;
}

/* 操作按钮区域 */
.enhanced-toast-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 关闭按钮 */
.enhanced-toast-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.enhanced-toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 登录按钮 */
.enhanced-toast-login-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.enhanced-toast-login-btn:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 进度条 */
.enhanced-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    transform-origin: left;
    animation: toastProgress linear forwards;
}

@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* 不同类型的Toast样式 */

/* 成功类型 */
.enhanced-toast-success {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

.enhanced-toast-success .enhanced-toast-icon {
    background: rgba(255, 255, 255, 0.25);
}

/* 错误类型 */
.enhanced-toast-error {
    background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
}

.enhanced-toast-error .enhanced-toast-icon {
    background: rgba(255, 255, 255, 0.25);
}

/* 警告类型 */
.enhanced-toast-warning {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
}

.enhanced-toast-warning .enhanced-toast-icon {
    background: rgba(255, 255, 255, 0.25);
}

/* 信息类型 */
.enhanced-toast-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.enhanced-toast-info .enhanced-toast-icon {
    background: rgba(255, 255, 255, 0.25);
}

/* 登录类型 */
.enhanced-toast-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.enhanced-toast-login .enhanced-toast-icon {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.enhanced-toast-login .enhanced-toast-message {
    font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .enhanced-toast-container {
        top: 60px;
        padding: 0 15px;
        max-width: 100%;
    }

    .enhanced-toast {
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .enhanced-toast-content {
        padding: 14px 16px;
    }

    .enhanced-toast-icon {
        width: 36px;
        height: 36px;
        margin-right: 12px;
        font-size: 16px;
    }

    .enhanced-toast-message {
        font-size: 14px;
        margin-right: 12px;
    }

    .enhanced-toast-login-btn {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 16px;
    }

    .enhanced-toast-close {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* 极小屏幕适配 */
@media (max-width: 480px) {
    .enhanced-toast-container {
        top: 50px;
        padding: 0 10px;
    }

    .enhanced-toast {
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .enhanced-toast-content {
        padding: 12px 14px;
    }

    .enhanced-toast-icon {
        width: 32px;
        height: 32px;
        margin-right: 10px;
        font-size: 14px;
    }

    .enhanced-toast-message {
        font-size: 13px;
        margin-right: 10px;
    }

    .enhanced-toast-login-btn {
        padding: 5px 10px;
        font-size: 11px;
        gap: 4px;
    }

    .enhanced-toast-close {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
    .enhanced-toast {
        border-width: 2px;
        border-color: rgba(255, 255, 255, 0.5);
    }

    .enhanced-toast-message {
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    }
}

/* 减少动画支持 */
@media (prefers-reduced-motion: reduce) {
    .enhanced-toast {
        transition: opacity 0.2s ease;
    }

    .enhanced-toast.show {
        transform: none;
    }

    .enhanced-toast.removing {
        transform: none;
    }

    .enhanced-toast-progress {
        animation: none;
    }
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .enhanced-toast-login-btn {
        background: rgba(255, 255, 255, 0.95);
        color: #667eea;
    }

    .enhanced-toast-login-btn:hover {
        background: white;
    }
} 