/* Generic zoom toolbar for the New Form flyout. Sits under the flyout header
   and CSS-`zoom`s the hosted form (the existing Blazor form). Opens in
   fit-to-width mode (the fixed-width form page is scaled to the flyout, like
   the React page); − / % / + drop out of fit mode, and the fit button
   re-engages it. */

/* When a zoomed form is hosted, make the flyout body a column so the toolbar
   pins at the top and the content area fills the rest. */
.form-slideout-body:has(.flyout-zoom-toolbar) {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.flyout-zoom-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 40px;
  flex-shrink: 0;
  background: #f1f1f3;
  border-bottom: 1px solid #d9d9d9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.flyout-zoom-btn {
  background: transparent;
  border: none;
  color: #333;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.flyout-zoom-btn:hover {
  background: rgba(0, 0, 0, 0.07);
}

.flyout-zoom-pct {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: #333;
  background: #ffffff;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 4px 6px;
}

.flyout-zoom-pct-input {
  width: 30px;
  border: none;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 12px;
  color: #333;
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding: 0;
}

/* Divider + fit-to-width toggle in the toolbar. */
.flyout-zoom-divider {
  width: 1px;
  height: 20px;
  background: #cfcfcf;
  margin: 0 4px;
}

.flyout-zoom-fit {
  background: transparent;
  border: none;
  color: #333;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;   /* React .crf-zoom-fit is a circle, not a 6px rect */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.flyout-zoom-fit:hover {
  background: rgba(0, 0, 0, 0.07);
}

.flyout-zoom-fit.is-active {
  background: #d9e5f3;
  color: #1f5fa8;
}

/* Scrollable content area holding the hosted form. The CSS zoom is applied to
   the inner .flyout-zoom-scale so this container stays a stable measuring box
   (its clientWidth = available width, scrollWidth = zoomed content width). */
.flyout-zoom-content {
  flex: 1;
  min-height: 0;
  min-width: 0;      /* clip an overflowing zoomed page instead of growing to it */
  overflow: auto;
}

.flyout-zoom-scale {
  /* zoom applied inline; width follows the hosted form's own layout */
}
