/**
 * 通知组件样式
 */

/* ==================== 通知消息样式 ==================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.notification.hide {
    opacity: 0;
    transform: translateX(400px);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.notification-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    padding: 0;
    margin: 0;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

/* 成功消息 */
.notification-success {
    background-color: #10b981;
    color: white;
}

.notification-success .notification-icon {
    color: white;
}

/* 错误消息 */
.notification-error {
    background-color: #ef4444;
    color: white;
}

.notification-error .notification-icon {
    color: white;
}

/* 警告消息 */
.notification-warning {
    background-color: #f59e0b;
    color: white;
}

.notification-warning .notification-icon {
    color: white;
}

/* 信息消息 */
.notification-info {
    background-color: #3b82f6;
    color: white;
}

.notification-info .notification-icon {
    color: white;
}

/* ==================== 确认对话框样式 ==================== */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.notification-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.notification-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.notification-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.notification-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111827;
}

.notification-modal-message {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin-bottom: 24px;
}

.notification-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.notification-modal-actions .btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.notification-modal-actions .btn-cancel {
    background-color: #f3f4f6;
    color: #374151;
}

.notification-modal-actions .btn-cancel:hover {
    background-color: #e5e7eb;
}

.notification-modal-actions .btn-confirm {
    background-color: #3b82f6;
    color: white;
}

.notification-modal-actions .btn-confirm:hover {
    background-color: #2563eb;
}

.notification-modal-content.notification-warning .btn-confirm {
    background-color: #f59e0b;
}

.notification-modal-content.notification-warning .btn-confirm:hover {
    background-color: #d97706;
}

.notification-modal-content.notification-error .btn-confirm {
    background-color: #ef4444;
}

.notification-modal-content.notification-error .btn-confirm:hover {
    background-color: #dc2626;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 640px) {
    .notification {
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: none;
    }

    .notification.show {
        transform: translateY(0);
    }

    .notification.hide {
        transform: translateY(-100px);
    }

    .notification-modal-content {
        max-width: none;
        width: 90%;
    }
}

/* ==================== 表单验证样式 ==================== */
.is-invalid {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.is-invalid:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #ef4444;
}
