/**
 * Toast消息提示样式
 */

/* Toast容器 */
.toast-container {
    z-index: 9999 !important;
}

/* Toast基础样式 */
.toast {
    min-width: 300px;
    max-width: 500px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-bottom: 12px;
}

.toast-body {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
}

/* Toast类型样式 */
.toast--success {
    background-color: rgba(25, 135, 84, 0.95);
    color: white;
}

.toast--error {
    background-color: rgba(220, 53, 69, 0.95);
    color: white;
}

.toast--warning {
    background-color: rgba(255, 193, 7, 0.95);
    color: #000;
}

.toast--info {
    background-color: rgba(13, 110, 253, 0.95);
    color: white;
}

/* 图标样式 */
.toast-body i {
    flex-shrink: 0;
}

.toast--success .toast-body i {
    color: #fff;
}

.toast--error .toast-body i {
    color: #fff;
}

.toast--warning .toast-body i {
    color: #000;
}

.toast--info .toast-body i {
    color: #fff;
}

/* 关闭按钮 */
.toast .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.toast .btn-close:hover {
    opacity: 1;
}

.toast--warning .btn-close {
    filter: none;
    opacity: 0.5;
}

.toast--warning .btn-close:hover {
    opacity: 1;
}

/* 动画效果 */
.toast.showing {
    animation: toastSlideIn 0.3s ease-out;
}

.toast.hide {
    animation: toastSlideOut 0.3s ease-in;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 响应式 */
@media (max-width: 576px) {
    .toast {
        min-width: auto;
        max-width: calc(100vw - 32px);
    }

    .toast-container {
        left: 16px !important;
        right: 16px !important;
        padding: 16px !important;
    }

    .toast-body {
        font-size: 13px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .toast {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .toast--success {
        background-color: rgba(25, 135, 84, 0.98);
    }

    .toast--error {
        background-color: rgba(220, 53, 69, 0.98);
    }

    .toast--warning {
        background-color: rgba(255, 193, 7, 0.98);
    }

    .toast--info {
        background-color: rgba(13, 110, 253, 0.98);
    }
}

/* 辅助功能 */
.toast:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* 多个Toast堆叠效果 */
.toast-container .toast + .toast {
    margin-top: 12px;
}
