/* ===== Toast 提示系统 ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background-color: white;
    color: var(--color-text);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid var(--color-primary);
}

.toast.toast-success {
    border-left-color: var(--color-success);
}

.toast.toast-error {
    border-left-color: var(--color-error);
}

.toast.toast-warning {
    border-left-color: var(--color-warning);
}

.toast.toast-info {
    border-left-color: var(--color-primary);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: var(--color-success);
}

.toast-error .toast-icon {
    color: var(--color-error);
}

.toast-warning .toast-icon {
    color: var(--color-warning);
}

.toast-info .toast-icon {
    color: var(--color-primary);
}

.toast-message {
    flex: 1;
    font-size: 0.95rem;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--color-text);
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ===== 自定义确认对话框 ===== */
.confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.confirm-overlay.active {
    display: flex;
}

.confirm-dialog-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.confirm-dialog-actions button {
    padding: 0.5rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 70px;
}

.confirm-dialog-actions .confirm-btn-cancel {
    background-color: #f5f5f5;
    color: var(--color-text);
}

.confirm-dialog-actions .confirm-btn-cancel:hover {
    background-color: #e0e0e0;
}

.confirm-dialog-actions .confirm-btn-confirm {
    background-color: var(--color-primary);
    color: white;
}

.confirm-dialog-actions .confirm-btn-confirm:hover {
    background-color: #45a049;
}

.confirm-dialog {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    animation: scaleIn 0.2s ease-out;
}

.confirm-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.confirm-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.confirm-body {
    padding: 1.5rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.confirm-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.confirm-footer button {
    padding: 0.5rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 70px;
}

.confirm-footer .confirm-btn-cancel {
    background-color: #f5f5f5;
    color: var(--color-text);
}

.confirm-footer .confirm-btn-cancel:hover {
    background-color: #e0e0e0;
}

.confirm-footer .confirm-btn-confirm {
    background-color: var(--color-primary);
    color: white;
}

.confirm-footer .confirm-btn-confirm:hover {
    background-color: #45a049;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== 移动端适配 ===== */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

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

    .confirm-dialog {
        width: 95%;
    }
}