/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1120px) {
  .overview-hero,
  .flow-detail-row,
  .schema-grid {
    grid-template-columns: 1fr;
  }

  .flow-step-grid,
  .cards-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schema-arrow-col {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .arrow-icon {
    transform: rotate(90deg);
  }

  .explorer-grid {
    grid-template-columns: 240px 1fr 300px;
  }
}

@media (max-width: 900px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
  }

  .md-appbar {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }

  .appbar-left {
    width: 100%;
    justify-content: space-between;
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .main-nav.mobile-open {
    display: flex;
  }

  .nav-item {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    min-width: 0;
    width: 100%;
    box-shadow: none;
    background: #2c2c2c;
    margin: 4px 0;
  }

  .dropdown-item strong { color: #ffffff; }
  .dropdown-item span   { color: rgba(255, 255, 255, 0.7); }
  .dropdown-item .material-symbols-outlined { color: rgba(255, 255, 255, 0.75); }
  .dropdown-item:hover { background: rgba(255, 255, 255, 0.08); }

  .kg-status-chip {
    width: 100%;
    justify-content: center;
  }

  .tab-panel {
    overflow: visible;
  }

  .explorer-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 460px auto;
    height: auto;
  }

  .explorer-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--md-divider);
  }

  .explorer-inspector {
    border-left: none;
    border-top: 1px solid var(--md-divider);
  }

  .sparql-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .sparql-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--md-divider);
  }

  .md-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .footer-meta {
    border-left: none;
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .page-container {
    padding: 16px 14px 32px;
  }

  .flow-step-grid,
  .cards-grid-4,
  .cards-grid-3,
  .cards-grid-2,
  .search-form-row {
    grid-template-columns: 1fr;
  }

  .diagnose-select-wrap,
  .btn-group-wrap {
    width: 100%;
  }

  .bar-row {
    grid-template-columns: 120px 1fr 38px;
  }

  .ont-class-item.subclass {
    margin-left: 12px;
  }

  .snackbar-container {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 440px) {
  .kpi-grid-2x2 {
    grid-template-columns: 1fr;
  }
}
