/* 监控大屏样式 */

/* Dashboard页面专用样式 */

/* 监控大屏标题美化样式 */
.dashboard-title {
    display: flex;
    align-items: center;
    padding: 2px 2px;
    background: linear-gradient(135deg, #1890ff 0%, #0050b3 100%);
    border-radius: 6px;
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
    margin-bottom: 0px;
    border: 1px solid rgba(24, 144, 255, 0.3);
}

.dashboard-title i {
    font-size: 0.85rem;
    margin-right: 2px;
    color: #ffffff;
    opacity: 0.9;
}

.dashboard-title span {
    letter-spacing: 0.3px;
    font-weight: 300;
}

/* 目录和面板容器样式 */
.directory-container {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding: 2px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.iframe-container {
    height: calc(100vh - 80px);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    background-color: white;
}

#grafanaIframe {
    width: 100%;
    height: 100%;
    border: none;
}

.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 0px;
    color: #dee2e6;
}

.empty-state h4 {
    margin-bottom: 0px;
    color: #495057;
    font-size: 1.2rem;
}

.empty-state p {
    margin-bottom: 0px;
    font-size: 0.9rem;
}

/* 页面底部边距 */
.container-fluid {
    padding-bottom: 0;
    margin-bottom: 0;
    min-height: calc(100vh - 80px); /* 确保容器占满剩余高度 */
}

body {
    margin-bottom: 0;
    padding-bottom: 0;
    overflow-x: hidden; /* 防止水平滚动条 */
}

.container {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 专门为监控大屏页面设置 */
.dashboard-page {
    height: 100vh;
    overflow: hidden;
}

.dashboard-page .container-fluid {
    height: calc(100vh - 80px);
    padding: 0;
    margin-top: 10px;
}

/* Grafana目录面板样式 */
.directory-item {
    margin-bottom: 3px;
    border-radius: 4px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.directory-item.active {
    background-color: #e9ecef;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 合并目录名称样式，解决冲突 */
.directory-name {
    flex: 1;
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    background-color: transparent !important;
    text-align: left;
    margin: 0 !important;
}

.directory-name:hover {
    background-color: #e9ecef;
    border-radius: 4px;
}

.directory-actions {
    display: flex;
    gap: 3px;
    margin-left: auto;
}

.toggle-icon {
    margin-right: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 14px;
    text-align: center;
}

.directory-children {
    transition: all 0.3s ease;
}

.panel-item {
    margin-bottom: 0px;
    border: none;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.2s ease;
    background-color: white;
}

.panel-item:hover {
    background-color: #f8f9fa;
}

.panel-header {
    padding: 4px 8px;
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 400;
}

.panel-actions {
    display: flex;
    gap: 5px;
}

.panel-info {
    padding: 4px 8px;
    border-top: none;
}

.directory-header {
    display: flex;
    align-items: center;
    background-color: transparent !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 确保iframe容器占满整个可用空间 */
#grafana-dashboard-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 5%;
    top: 56px; /* 导航栏高度 */
    z-index: 10;
    background-color: var(--bg-color);
    transition: background-color 0.3s;
    overflow: hidden;
}

/* iframe样式 */
#grafana-iframe {
    width: 100%;
    height: 100%;
    border: none;
    margin: 0;
    padding: 0;
}

/* 未配置Grafana时的提示样式 */
.grafana-not-configured {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
}

.grafana-not-configured h4 {
    margin-bottom: 5px;
    color: #ea2715;
}

.grafana-not-configured p {
    margin-bottom: 30px;
    color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #grafana-dashboard-container {
        top: 50px; /* 移动设备上导航栏可能更小 */
    }
    
    .directory-container {
        height: calc(100vh - 60px);
    }
    
    .iframe-container {
        height: calc(100vh - 60px);
    }
}