/**
 * Toast 提示框样式
 * 主题与页面风格保持一致
 */

/* Toast 容器 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Toast 基础样式 */
.toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 450px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: toast-slide-in 0.3s ease-out;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* 进入动画 */
@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 退出动画 */
@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hiding {
    animation: toast-slide-out 0.3s ease-in forwards;
}

/* 图标样式 */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* 内容区域 */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    color: #fff;
}

.toast-message {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
    color: #fff;
}

/* 关闭按钮 */
.toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    margin: -4px -8px 0 0;
}

.toast-close:hover {
    opacity: 1;
}

/* 进度条 */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 0 0 12px;
    animation: toast-progress 5s linear forwards;
}

@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* 信息类型 - 蓝色 */
.toast-info {
    background: linear-gradient(135deg, #1890ff 0%, #36cfc9 100%);
}

.toast-info .toast-icon,
.toast-info .toast-title,
.toast-info .toast-message {
    color: #fff;
}

/* 成功类型 - 绿色 */
.toast-success {
    background: linear-gradient(135deg, #52c41a 0%, #95de64 100%);
}

.toast-success .toast-icon,
.toast-success .toast-title,
.toast-success .toast-message {
    color: #fff;
}

/* 警告类型 - 橙色 */
.toast-warning {
    background: linear-gradient(135deg, #fa8c16 0%, #ffc53d 100%);
}

.toast-warning .toast-icon,
.toast-warning .toast-title,
.toast-warning .toast-message {
    color: #fff;
}

/* 错误类型 - 红色 */
.toast-error {
    background: linear-gradient(135deg, #f5222d 0%, #ff7875 100%);
}

.toast-error .toast-icon,
.toast-error .toast-title,
.toast-error .toast-message {
    color: #fff;
}

/* 移动端适配 */
@media (max-width: 576px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
        padding: 14px 16px;
    }
}
