@media (max-width: 620px) {
  .ecoflow-summary[style] {
    width: 100% !important;
  }
}

@media (max-width: 900px) {
  .ecoflow-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(12, minmax(0, 1fr));
    min-height: 760px;
  }
  .energy-grid-item {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    min-height: 120px;
  }
}

@media (max-width: 620px) {
  .ecoflow-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: minmax(120px, auto);
    min-height: 0;
    gap: 10px !important;
  }
  .energy-grid-item {
    min-height: 120px;
  }
}

@media (max-width: 1100px) {
  body.has-custom-layout #dashboard-app .wr-module-page,
  body.has-custom-layout #dashboard-app .theme-layout-page[data-theme-layout-page="energy"],
  body.has-custom-layout #dashboard-app .theme-layout-page[data-theme-layout-page="energy"] > .theme-layout-item {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.has-custom-layout #dashboard-app .theme-layout-page[data-theme-layout-page="energy"] .ecoflow-grid {
    min-height: 0 !important;
  }
}

@media (hover: none) and (pointer: coarse) and (min-width: 901px) {
  body.has-custom-layout #dashboard,
  body.has-custom-layout #dashboard-app,
  body.has-custom-layout #dashboard-app .dashboard-stack,
  body.has-custom-layout #dashboard-app .theme-layout-page[data-theme-layout-page="energy"],
  body.has-custom-layout #dashboard-app .theme-layout-page[data-theme-layout-page="energy"] > .theme-layout-item {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
}

@media (hover: none) and (pointer: coarse) and (min-width: 901px) {
  #dashboard-app.has-custom-layout,
  #dashboard-app.has-custom-layout #dashboard,
  #dashboard-app.has-custom-layout .dashboard-stack,
  #dashboard-app.has-custom-layout .theme-layout-page[data-theme-layout-page="energy"],
  #dashboard-app.has-custom-layout .theme-layout-page[data-theme-layout-page="energy"] > .theme-layout-item {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
  #dashboard-app.has-custom-layout .wr-module-page:has(.ecoflow-panel) .ecoflow-panel {
    max-height: none !important;
    overflow: visible !important;
  }
}