/**
 * 信息分层展示样式
 */

.view-toggle-container {
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.view-toggle-container .btn-group {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.view-toggle-container .btn {
    min-width: 100px;
    font-weight: 500;
}

.view-toggle-container .btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

/* 概览模式样式 */
.view-overview .detail-only,
.view-overview [data-view="detail"] {
    display: none !important;
}

.view-overview .overview-only,
.view-overview [data-view="overview"] {
    display: block !important;
}

/* 详情模式样式 */
.view-detail .detail-only,
.view-detail [data-view="detail"],
.view-detail .overview-only,
.view-detail [data-view="overview"] {
    display: block !important;
}

/* 简化模式下的设备卡片 */
.view-overview .device-card {
    min-height: auto;
    padding: 15px;
}

.view-overview .device-card .device-details {
    display: none;
}

.view-overview .device-card .key-metrics {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.view-overview .device-card .key-metric {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* 查看更多按钮 */
.view-more-sensors {
    width: 100%;
    margin-top: 15px;
    text-align: center;
    color: #007bff;
    text-decoration: none;
}

.view-more-sensors:hover {
    text-decoration: underline;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .view-toggle-container {
        justify-content: center;
        padding: 15px 0;
    }
    
    .view-toggle-container .btn {
        min-width: 80px;
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .view-overview .device-card .key-metrics {
        flex-direction: column;
    }
    
    .view-overview .device-card .key-metric {
        width: 100%;
    }
}

