/* Fluid application workspaces. Content formats and modal sizes stay independent. */
@media screen {
  .ova-design .workspace {
    min-width: 0;
    max-width: none;
    min-height: 100dvh;
  }

  .ova-design .workspace > main {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    min-width: 0;
    min-height: 0;
    flex: 1 0 auto;
  }

  .ova-design .workspace > main > :is(
    .planning-workspace, .calendar-workspace, .campaigns,
    .grid-cards, .home-columns, .folder-grid,
    .office-list-panel, .stock-grid, .stock-detail, .panel
  ) {
    min-width: 0;
    max-width: 100%;
  }

  .ova-design .campaigns {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  .ova-design :is(.planning-layout, .calendar-workspace, .campaign-grid, .home-columns) > * {
    min-width: 0;
  }

  /* The editor's own page and sheet dimensions belong to its document. */
  .ova-design .workspace.office-workspace {
    height: 100dvh;
    min-height: 0;
  }

  .ova-design .workspace > main.office-host {
    min-height: 0;
    flex: 1 1 0;
  }
}

/* A month uses tall displays naturally; short content in other modules is not inflated. */
@media screen and (min-width: 1051px) {
  .ova-design .calendar-month {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 196px);
  }

  .ova-design .calendar-month > .calendar-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .ova-design .calendar-month .calendar-weekdays {
    flex: 0 0 auto;
  }

  .ova-design .calendar-month .calendar-week {
    flex: 1;
  }

  .ova-design .calendar-month .calendar-day {
    height: 100%;
  }
}

/* Keep a small folder collection at normal tile size on wide monitors. */
@media screen and (min-width: 768px) {
  .ova-design .folder-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}
