/* Alignment applies to the full shortcode output, without changing Query Loop styles. */
.dqz-wrapper { display: flex; width: 100%; box-sizing: border-box; }
.dqz-wrapper.dqz-align-left { justify-content: flex-start; }
.dqz-wrapper.dqz-align-center { justify-content: center; }
.dqz-wrapper.dqz-align-right { justify-content: flex-end; }
/* Front-end only; inherits the active site's text, color and font. */
.dqz-control {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border: 1px solid currentColor;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: 1;
  vertical-align: middle;
  box-sizing: border-box;
  margin-block: .5rem;
}
.dqz-control .dqz-button {
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: inherit;
  font: inherit;
  min-width: 42px;
  min-height: 38px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dqz-control .dqz-button { cursor: pointer; appearance: none; -webkit-appearance: none; }
.dqz-control .dqz-button + .dqz-button { border-left: 1px solid currentColor; }
.dqz-control .dqz-button svg { display: block; flex-shrink: 0; }
.dqz-control .dqz-button:hover:not(:disabled) { background: currentColor; }
.dqz-control .dqz-button:hover:not(:disabled) svg { filter: invert(1); }
.dqz-control .dqz-button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.dqz-control .dqz-button:disabled { cursor: not-allowed; opacity: .35; }
.dqz-control[data-dqz-unavailable="true"] { opacity: .5; }
/* Directly scope override to the bound Query Loop's post template only. */
.wp-block-query.dqz-bound > .wp-block-post-template,
.wp-block-query.dqz-bound > :is(.wp-block-query-loop, .wp-block-post-template),
.dqz-bound.wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(var(--dqz-columns, 3), minmax(0, 1fr)) !important;
}
/* WordPress grid styles sometimes put the template inside a query container. */
.wp-block-query.dqz-bound .wp-block-post-template.dqz-template {
  display: grid !important;
  grid-template-columns: repeat(var(--dqz-columns, 3), minmax(0, 1fr)) !important;
}
.wp-block-post-template.dqz-template > li { min-width: 0; width: auto; }
/* Prevent six tiny columns on phones while retaining desktop preference. */
@media (max-width: 781px) {
  .wp-block-query.dqz-bound .wp-block-post-template.dqz-template,
  .dqz-bound.wp-block-post-template { grid-template-columns: repeat(min(var(--dqz-columns, 3), 2), minmax(0, 1fr)) !important; }
}
@media (max-width: 480px) {
  .wp-block-query.dqz-bound .wp-block-post-template.dqz-template,
  .dqz-bound.wp-block-post-template { grid-template-columns: minmax(0, 1fr) !important; }
}
