:root {
  --vezz-safe-top: env(safe-area-inset-top, 0px);
  --vezz-safe-right: env(safe-area-inset-right, 0px);
  --vezz-safe-bottom: env(safe-area-inset-bottom, 0px);
  --vezz-safe-left: env(safe-area-inset-left, 0px);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  padding-left: var(--vezz-safe-left);
  padding-right: var(--vezz-safe-right);
  padding-bottom: var(--vezz-safe-bottom);
}

button,
[role="button"],
input,
select,
textarea,
a {
  touch-action: manipulation;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

.tablewrap,
.table-wrapper,
.table-container,
.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.modal,
.modal-content,
.modal-box {
  max-height: calc(100dvh - var(--vezz-safe-top) - var(--vezz-safe-bottom) - 24px);
  overscroll-behavior: contain;
}

html.vezz-native body {
  min-height: 100dvh;
  overscroll-behavior-y: none;
}

html.vezz-native header:first-of-type,
html.vezz-native #appHeader {
  padding-top: var(--vezz-safe-top);
}

@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    min-height: 44px;
    font-size: 16px !important;
  }

  button,
  .btn,
  .btn-modern,
  .btn-header,
  .btn-soft,
  a.btn {
    min-height: 44px;
  }

  .top-tabs,
  .tabs,
  .tab-buttons,
  .header-actions {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .top-tabs::-webkit-scrollbar,
  .tabs::-webkit-scrollbar,
  .tab-buttons::-webkit-scrollbar,
  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .modal,
  .modal-content,
  .modal-box {
    width: min(100% - 16px, 980px) !important;
    max-width: none !important;
    margin: max(8px, var(--vezz-safe-top)) 8px max(8px, var(--vezz-safe-bottom));
  }

  table {
    min-width: max-content;
  }

  td,
  th {
    overflow-wrap: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
