/**
 * 组件样式文件
 * 包含通知面板、对话框等组件的样式
 */

/* 通知面板样式 */
.notification-panel {
    position: fixed;
    top: 80px;
    right: 24px;
    width: 400px;
    max-height: 600px;
    background: linear-gradient(135deg, 
        rgba(17, 24, 39, 0.95), 
        rgba(31, 41, 55, 0.95)
    );
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(38, 87, 253, 0.1);
    z-index: 1000;
    animation: slideInDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.notification-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(38, 87, 253, 0.8), 
        transparent
    );
    border-radius: 16px 16px 0 0;
}

.notification-panel-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-panel-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.close-panel {
    background: none;
    border: none;
    color: rgba(156, 163, 175, 0.8);
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-panel:hover {
    color: white;
    background: rgba(75, 85, 99, 0.3);
}

.notification-panel-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notification-list {
    padding: 0;
    margin: 0;
}

.notification-item-panel {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(75, 85, 99, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification-item-panel:last-child {
    border-bottom: none;
}

.notification-item-panel:hover {
    background: rgba(59, 130, 246, 0.05);
}

.notification-item-panel.success i {
    color: #10B981;
}

.notification-item-panel.warning i {
    color: #F59E0B;
}

.notification-item-panel.info i {
    color: #3B82F6;
}

.notification-item-panel.error i {
    color: #EF4444;
}

.notification-content {
    flex: 1;
}

.notification-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-desc {
    color: rgba(156, 163, 175, 0.9);
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.notification-time {
    color: rgba(156, 163, 175, 0.6);
    font-size: 12px;
}

.notification-panel-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(75, 85, 99, 0.2);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.notification-panel-footer button {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(75, 85, 99, 0.3);
    background: rgba(75, 85, 99, 0.1);
    color: rgba(156, 163, 175, 0.9);
    cursor: pointer;
}

.notification-panel-footer button:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: white;
}

/* 动画 */
@keyframes slideInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 侧边栏工具提示样式增强 */
.nav-tooltip {
    position: fixed;
    left: 88px;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(31, 41, 55, 0.95));
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(-5px) translateZ(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(38, 87, 253, 0.3);
    backdrop-filter: blur(10px);
    z-index: 1001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    will-change: transform, opacity;
}

.nav-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0) translateZ(0);
}

.nav-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: rgba(17, 24, 39, 0.95);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .notification-panel {
        width: calc(100vw - 32px);
        left: 16px;
        right: 16px;
        top: 70px;
    }
    
    .notification-panel-header,
    .notification-item-panel,
    .notification-panel-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* 滚动条样式 */
.notification-panel-body::-webkit-scrollbar {
    width: 4px;
}

.notification-panel-body::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.3);
}

.notification-panel-body::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 2px;
}

.notification-panel-body::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    .notification-panel,
    .notification-item-panel,
    .close-panel,
    .nav-tooltip {
        animation: none !important;
        transition: none !important;
    }
}

/* 表单元素增强样式 */
.input-field,
select.input-field {
    background: linear-gradient(135deg, 
        rgba(55, 65, 81, 0.9), 
        rgba(31, 41, 55, 0.95)
    );
    border: 1px solid rgba(75, 85, 99, 0.5);
    color: #e5e7eb;
    backdrop-filter: blur(10px);
}

.input-field:focus,
select.input-field:focus {
    border-color: rgba(38, 87, 253, 0.6);
    box-shadow: 0 0 0 3px rgba(38, 87, 253, 0.1);
}

/* 选择框选项样式 */
select.input-field option {
    background-color: #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border: none;
}

select.input-field option:hover,
select.input-field option:focus,
select.input-field option:checked {
    background-color: #4b5563;
    color: #ffffff;
}

/* 确保选择框在所有浏览器中的一致性 */
select.input-field {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5e7eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
}

/* 文本域样式 */
textarea.input-field {
    resize: vertical;
    min-height: 120px;
}

/* 复选框样式 */
input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(75, 85, 99, 0.5);
    border-radius: 4px;
    background: linear-gradient(135deg, 
        rgba(55, 65, 81, 0.9), 
        rgba(31, 41, 55, 0.95)
    );
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #2657FD, #3B82F6);
    border-color: #2657FD;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
} 