/**
 * SCADA告警样式（与 24小时参数趋势 卡片保持高度一致：同白底、圆角、阴影、高度，列表区支持滚轮滚动）
 */

.alert-panel {
    /* 与 .chart-container 一致：同卡片风格 */
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 20px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.alert-panel-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.alert-panel-header h4 {
    margin: 0;
    color: #333;
}

.alert-count {
    background: #4CAF50;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.alert-count.has-alerts {
    background: #f44336;
}

/* 告警列表：占满标题与“查看更多”之间的全部空间，超出用滚轮滚动 */
.alert-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.06);
}

/* 滚动条样式（WebKit/Chrome），便于发现可滚动 */
.alert-list::-webkit-scrollbar {
    width: 8px;
}

.alert-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
}

.alert-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}

.alert-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

.alert-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    border-left: 4px solid;
    border-radius: 4px;
    background: #f9f9f9;
}

.alert-item.alert-critical {
    border-left-color: #f44336;
    background: #ffebee;
}

.alert-item.alert-warning {
    border-left-color: #ff9800;
    background: #fff3e0;
}

.alert-item.alert-info {
    border-left-color: #4CAF50;
    background: #e8f5e9;
}

.alert-icon {
    font-size: 1.2em;
}

.alert-content {
    flex: 1;
}

.alert-time {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 4px;
}

.alert-message {
    font-size: 0.9em;
    color: #333;
    font-weight: 500;
}

.alert-action {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

/* 查看更多：固定在卡片最下方，上方整块留给告警列表显示 */
.view-all-alerts {
    flex-shrink: 0;
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    color: #666;
    font-size: 13px;
}

.view-all-alerts:hover {
    background: rgba(0, 0, 0, 0.08);
}
