/**
 * 统一的消息提示系统 - 样式文件
 * 漂亮的弹窗UI设计
 */

/* ===== 通知容器 ===== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    pointer-events: none;
}

/* ===== 通知卡片 ===== */
.notification {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: flex;
    min-width: 400px;
    max-width: 500px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
}

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

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

/* ===== 左侧色条 ===== */
.notification-border {
    width: 6px;
    flex-shrink: 0;
}

/* ===== 内容区域 ===== */
.notification-content {
    flex: 1;
    padding: 20px;
}

/* ===== 头部 ===== */
.notification-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.notification-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.notification-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* ===== 消息内容 ===== */
.notification-message {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* ===== 详细信息 ===== */
.notification-details {
    background: rgba(0, 0, 0, 0.02);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.8;
}

.notification-detail-item {
    display: flex;
    margin-bottom: 6px;
    color: #555;
}

.notification-detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 500;
    color: #333;
    min-width: 80px;
}

.detail-value {
    color: #666;
    word-break: break-all;
}

/* ===== 不同类型的样式 ===== */
.notification-success .notification-details {
    background: rgba(40, 167, 69, 0.05);
}

.notification-warning .notification-details {
    background: rgba(255, 193, 7, 0.08);
}

.notification-error .notification-details {
    background: rgba(220, 53, 69, 0.05);
}

.notification-info .notification-details {
    background: rgba(0, 113, 227, 0.05);
}

/* ===== 遮罩层 ===== */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-overlay-show {
    opacity: 1;
}

/* ===== 对话框 ===== */
.notification-dialog {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: visible;
    display: flex;
    flex-direction: row;
    min-width: 650px;           /* ✅ 从 500px 增加到 650px */
    max-width: 1080px;          /* ✅ 从 800px 增加 35% 到 1080px */
    width: auto;
    max-height: 85vh;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-dialog-show {
    opacity: 1;
    transform: scale(1);
}

.notification-dialog .notification-content {
    flex: 1;
    padding: 30px 35px;
    overflow-y: auto;
    max-height: calc(85vh - 60px);
    min-width: 600px;           /* ✅ 从 450px 增加到 600px */
    max-width: 1000px;          /* ✅ 从 750px 增加到 1000px */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.notification-dialog .notification-header {
    margin-bottom: 20px;
}

.notification-dialog .notification-icon {
    font-size: 48px;
}

.notification-dialog .notification-title {
    font-size: 22px;
}

.notification-dialog .notification-message {
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.8;
    word-wrap: break-word;
    word-break: normal;
    overflow-wrap: break-word;
    max-width: 100%;
    color: #333;
}

/* ===== 对话框按钮 ===== */
.notification-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: nowrap;
    margin-top: auto;
    padding-top: 20px;
    width: 100%;
    flex-shrink: 0;
}

.notification-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    min-width: 80px;
    white-space: nowrap;
    flex-shrink: 0;
}

.notification-btn-cancel {
    background: #f0f0f2;
    color: #666;
}

.notification-btn-cancel:hover {
    background: #e0e0e2;
}

.notification-btn-confirm {
    background: #0071e3;
    color: white;
}

.notification-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

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

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

    .notification-dialog {
        min-width: auto;
        max-width: 90%;
        margin: 0 20px;
    }

    .notification-dialog .notification-content {
        padding: 20px;
    }
}

/* ===== 动画效果 ===== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .notification-dialog {
        min-width: 280px;
        max-width: 95vw;
        width: 95%;
        margin: 0 auto;
    }
    
    .notification-dialog .notification-content {
        padding: 25px 20px;
        min-width: 0;
        max-width: 100%;
    }
    
    .notification-dialog .notification-title {
        font-size: 18px;
    }
    
    .notification-dialog .notification-message {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .notification-dialog .notification-icon {
        font-size: 36px;
    }
    
    .notification-actions {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        padding-top: 15px;
    }
    
    .notification-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-width: 90px;
        flex: 1;
        max-width: 48%;
    }
}

