/* Toast 通知系统样式 */

/* 容器 */
.toast-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 位置 */
.toast-top-right {
    top: 20px;
    right: 20px;
}

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

.toast-bottom-right {
    bottom: 20px;
    right: 20px;
}

.toast-bottom-left {
    bottom: 20px;
    left: 20px;
}

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

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

/* Toast 基础样式 */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    padding: 14px 16px;
    background: rgba(17, 34, 64, 0.98);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: all;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

/* 左侧位置的动画 */
.toast-top-left .toast,
.toast-bottom-left .toast {
    transform: translateX(-100%);
}

.toast-top-left .toast-show,
.toast-bottom-left .toast-show {
    transform: translateX(0);
}

.toast-top-left .toast-hide,
.toast-bottom-left .toast-hide {
    transform: translateX(-100%);
}

/* 图标 */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
}

/* 消息文本 */
.toast-message {
    flex: 1;
    color: #ccd6f6;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

/* 关闭按钮 */
.toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #8892b0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ccd6f6;
}

/* 进度条 */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    animation: toast-progress linear forwards;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* 成功类型 */
.toast-success {
    border-left: 3px solid #64ffda;
}

.toast-success .toast-icon {
    background: rgba(100, 255, 218, 0.2);
    color: #64ffda;
}

.toast-success .toast-progress {
    background: #64ffda;
}

/* 错误类型 */
.toast-error {
    border-left: 3px solid #ff6363;
}

.toast-error .toast-icon {
    background: rgba(255, 99, 99, 0.2);
    color: #ff6363;
}

.toast-error .toast-progress {
    background: #ff6363;
}

/* 警告类型 */
.toast-warning {
    border-left: 3px solid #ffb35a;
}

.toast-warning .toast-icon {
    background: rgba(255, 179, 90, 0.2);
    color: #ffb35a;
}

.toast-warning .toast-progress {
    background: #ffb35a;
}

/* 信息类型 */
.toast-info {
    border-left: 3px solid #5a9eff;
}

.toast-info .toast-icon {
    background: rgba(90, 158, 255, 0.2);
    color: #5a9eff;
}

.toast-info .toast-progress {
    background: #5a9eff;
}

/* 响应式 */
@media (max-width: 768px) {
    .toast-container {
        left: 10px !important;
        right: 10px !important;
        top: 10px;
        transform: none !important;
    }

    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    .toast,
    .toast-show {
        transform: translateY(-20px);
        opacity: 0;
    }

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

    .toast-hide {
        transform: translateY(-20px);
        opacity: 0;
    }
}
