/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

html {
  scroll-behavior: smooth;
}

html[data-hotwire-native-app] dialog.koat-modal-dialog:not(.koat-modal-dialog--full) {
  --koat-native-modal-top: calc(max(env(safe-area-inset-top, 0px), 3.5rem) + 4.25rem);
  --koat-native-modal-bottom: calc(max(env(safe-area-inset-bottom, 0px), 2rem) + 6rem);
  --koat-native-modal-height: calc(100vh - var(--koat-native-modal-top) - var(--koat-native-modal-bottom));

  max-height: var(--koat-native-modal-height);
}

@supports (height: 100dvh) {
  html[data-hotwire-native-app] dialog.koat-modal-dialog:not(.koat-modal-dialog--full) {
    --koat-native-modal-height: calc(100dvh - var(--koat-native-modal-top) - var(--koat-native-modal-bottom));
  }
}

html[data-hotwire-native-app] dialog.koat-modal-dialog:not(.koat-modal-dialog--full) > .koat-modal-content {
  max-height: var(--koat-native-modal-height);
}
