/* BeeCore Models registry layout repair.
   Layout and density only: no data, filters, pricing, routing or sidebar content changes. */

@media (min-width: 1025px) {
  /* Keep the filter rail in the application sidebar slot, not inside a centered
     Models content container. Removing transformed containing blocks makes
     position:fixed resolve against the viewport. */
  body.bc-route-models .bc-app,
  body.bc-route-models .bc-body,
  body.bc-route-models .bc-main,
  body.bc-route-models .bc-content {
    transform: none !important;
  }

  body.bc-route-models .bc-main {
    width: 100%;
    min-width: 0;
    margin-left: 0 !important;
  }

  body.bc-route-models .bc-content {
    position: static !important;
    width: 100%;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.bc-route-models aside.mc-filters {
    position: fixed !important;
    top: var(--bc-topnav-h) !important;
    bottom: 0 !important;
    left: 0 !important;
    right: auto !important;
    margin: 0 !important;
  }

  body.bc-route-models .model-catalog,
  body.bc-route-models .db-page.model-catalog {
    box-sizing: border-box;
    width: calc(100% - var(--bc-sidebar-width)) !important;
    max-width: none !important;
    margin: 0 0 0 var(--bc-sidebar-width) !important;
    padding: 22px 24px 36px !important;
    background: #fff;
    min-width: 0;
  }

  body.bc-route-models .mc-header {
    align-items: flex-start;
    padding-bottom: 20px;
  }

  body.bc-route-models .mc-header h1 { margin-bottom: 6px; }

  body.bc-route-models .mc-tabs {
    gap: 10px;
    margin-bottom: 12px;
  }

  body.bc-route-models .mc-tab {
    padding: 8px 10px;
    gap: 6px;
  }

  body.bc-route-models .mc-toolbar {
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: minmax(240px, 1fr) 150px 120px 145px 150px auto;
    gap: 12px;
    align-items: end;
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
  }

  body.bc-route-models .mc-toolbar input[type="search"] {
    width: 100%;
    min-width: 0;
  }

  body.bc-route-models .mc-toolbar label,
  body.bc-route-models .mc-toolbar label select { width: 100%; min-width: 0; }

  body.bc-route-models .mc-view {
    min-width: 104px;
    margin: 0;
    justify-content: center;
  }

  body.bc-route-models .mc-columns,
  body.bc-route-models .mc-list .mc-row {
    box-sizing: border-box;
    grid-template-columns: minmax(120px, .75fr) minmax(280px, 1.75fr) minmax(210px, 1.2fr) minmax(240px, 1.35fr) !important;
    column-gap: 14px;
    align-items: center;
  }

  body.bc-route-models .mc-columns {
    min-height: 38px;
    padding: 0 16px;
  }

  body.bc-route-models .mc-columns span { font-size: 12px; }

  body.bc-route-models .mc-list .mc-row {
    min-height: 96px;
    height: auto;
    padding: 10px 16px;
    margin-bottom: 9px;
    border-radius: 8px;
  }

  body.bc-route-models .mc-provider { gap: 9px; }
  body.bc-route-models .mc-provider-logo,
  body.bc-route-models .mc-provider-fallback { width: 24px; height: 24px; }
  body.bc-route-models .mc-model strong { font-size: 15px; }
  body.bc-route-models .mc-cap-wrap { gap: 5px; }
  body.bc-route-models .mc-badge { padding: 1px 6px; line-height: 19px; }
  body.bc-route-models .mc-prices > span { padding-left: 8px; padding-right: 8px; }
}

@media (min-width: 1025px) and (max-width: 1360px) {
  body.bc-route-models .mc-toolbar {
    grid-template-columns: minmax(220px, 1fr) 135px 110px 130px 135px auto;
    gap: 10px;
  }

  body.bc-route-models .mc-columns,
  body.bc-route-models .mc-list .mc-row {
    grid-template-columns: minmax(105px, .7fr) minmax(230px, 1.65fr) minmax(180px, 1.1fr) minmax(205px, 1.25fr) !important;
    column-gap: 12px;
  }
}

@media (max-width: 1024px) {
  body.bc-route-models .model-catalog,
  body.bc-route-models .db-page.model-catalog {
    width: auto !important;
    margin-left: 0 !important;
    padding: 18px 14px 32px !important;
  }
}
