/**
 * Toast 通知组件样式
 * 替代原生 alert()，提供现代化的通知体验
 */

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

/* Toast 主体 */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 450px;
    padding: 14px 18px;
    background: #1a1a2e;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Toast 显示状态 */
.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Toast 隐藏状态 */
.toast.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Toast 图标 */
.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* Toast 成功状态 */
.toast-success {
    border-left: 4px solid #10b981;
}
.toast-success .toast-icon {
    color: #10b981;
}

/* Toast 错误状态 */
.toast-error {
    border-left: 4px solid #ef4444;
}
.toast-error .toast-icon {
    color: #ef4444;
}

/* Toast 警告状态 */
.toast-warning {
    border-left: 4px solid #f59e0b;
}
.toast-warning .toast-icon {
    color: #f59e0b;
}

/* Toast 信息状态 */
.toast-info {
    border-left: 4px solid #3b82f6;
}
.toast-info .toast-icon {
    color: #3b82f6;
}

/* Toast 消息 */
.toast-message {
    flex: 1;
    color: #e5e7eb;
    font-size: 14px;
    line-height: 1.5;
}

/* Toast 关闭按钮 */
.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #e5e7eb;
}

/* 确认对话框模态层 */
.toast-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast-confirm-modal.show {
    opacity: 1;
}

/* 确认对话框内容 */
.toast-confirm-content {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 24px;
    min-width: 320px;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.toast-confirm-modal.show .toast-confirm-content {
    transform: scale(1);
}

/* 确认对话框消息 */
.toast-confirm-message {
    color: #e5e7eb;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* 确认对话框操作按钮 */
.toast-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.toast-confirm-actions .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.toast-confirm-actions .btn-cancel {
    background: #374151;
    color: #e5e7eb;
}

.toast-confirm-actions .btn-cancel:hover {
    background: #4b5563;
}

.toast-confirm-actions .btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.toast-confirm-actions .btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .toast-container {
        right: 10px;
        left: 10px;
        top: 10px;
    }

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

    .toast-confirm-content {
        min-width: auto;
        max-width: calc(100vw - 40px);
        margin: 20px;
    }
}
