// The alert dialogs' shared geometry. Both partials declare it with `!default`
// so either compiles standalone; `_tempalte-base.scss` imports ConfirmationAlert
// first, so that copy is the one that takes effect. The two dialogs are the same
// window with different artwork, and every measure they share is declared once
// on each side rather than written twice as a literal.
$alert-dialog-width: 520px !default;
$alert-dialog-min-height: 300px !default;

// A two-character action ("No", "OK") still has to read as a button. A floor,
// and the only measure either action states — the height comes from the
// package's button box (`$btn-line`, GridToolBar partial) and is intrinsic.
//
// 110px was chosen against a 40px-tall action. Under the 26px box that is a
// 4.2:1 bar; 80px puts the proportion back where it was drawn.
$alert-action-min-width: 80px !default;

// The scrim behind a Kendo dialog. On the theme's shadow hue rather than pure
// black, so the dim and the elevation over it are lit by the same light.
$alert-scrim: rgba($shadow-color, 0.45) !default;

// How close a modal may come to the viewport edge — one pair for all five
// windows in this package. They ran three different pairs: 85vh/90vw on the two
// GridToolBar dialogs, 85vh/92vw on the column chooser, 90vh/92vw on the two
// alerts. Nothing distinguished them; they were each capped by whoever wrote
// them. Declared with `!default` in all three partials that need it — this
// file and the two alert partials — so each compiles standalone and no copy can
// disagree with the others.
$dialog-viewport-max-width: 92vw !default;
$dialog-viewport-max-height: 90vh !default;

// The dialog box inside this window — `.tmpl-dialog-box-container` and every
// `.tmpl-dialog-box__*` under it — is styled once, in ConfirmationAlert/scss.
// Both alerts render the same markup, so it is one rule set, not two copies.

.tmpl-information-dialog {
  .k-dialog {
    box-shadow: $shadow-xl !important;
    width: $alert-dialog-width;
    // A floor, not a height. The body is free text, so a fixed height makes a
    // two-paragraph message scroll inside a half-empty window; max-height still
    // caps it on a short screen.
    min-height: $alert-dialog-min-height;
    max-width: $dialog-viewport-max-width;
    max-height: $dialog-viewport-max-height;
    overflow: hidden;
    background-color: $background-default;
  }

  .k-overlay {
    background-color: $alert-scrim;
  }

  .k-window-titlebar,
  .k-dialog-titlebar {
    display: none;
  }

  // Mirror ConfirmationAlert: stretch Kendo's content wrapper so the inner
  // container can flex its footer to the bottom edge.
  .k-window-content,
  .k-dialog-content {
    height: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
  }
}
