/* Shared mobile safeguards for both the marketing site and authenticated app. */
html {
  overflow-x: clip;
}

body {
  min-width: 320px;
  overflow-x: clip;
  overflow-wrap: break-word;
}

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

pre,
code,
.formatted-text {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.table-responsive {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.modal-dialog {
  max-width: calc(100vw - 24px);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 767.98px) {
  .container,
  .container-sm {
    --bs-gutter-x: 1.5rem;
  }

  h1 { font-size: clamp(1.7rem, 8vw, 2.15rem); }
  h2 { font-size: clamp(1.4rem, 6.5vw, 1.8rem); }

  .card:hover,
  .dashboard-card:hover,
  .feature-card:hover {
    transform: none;
  }

  .table-responsive > table {
    min-width: 640px;
  }

  .table-responsive > table[style*="table-layout:fixed"] {
    min-width: 680px;
  }

  .table-responsive th,
  .table-responsive td {
    white-space: nowrap;
  }

  .table-responsive td pre,
  .table-responsive td code,
  .table-responsive td .text-wrap,
  .table-responsive td[style*="white-space: pre-wrap"] {
    white-space: pre-wrap;
  }

  .doc-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .doc-content table th,
  .doc-content table td {
    min-width: 150px;
  }

  .inz-card,
  .admin-panel,
  .property-card {
    max-width: 100%;
  }

  .inz-card.p-4,
  .inz-card.p-5 {
    padding: 1rem !important;
  }

  .inz-hero.p-4,
  .inz-hero.p-5,
  .inz-hero.p-lg-5 {
    padding: 1.25rem !important;
  }

  .admin-page-head {
    align-items: stretch !important;
  }

  .admin-page-head > .btn,
  .admin-page-head > form,
  .admin-page-head > a {
    width: 100%;
  }

  .admin-page-head > .btn,
  .admin-page-head > a {
    display: inline-flex;
    justify-content: center;
  }

  .admin-panel-head,
  .admin-toolbar {
    align-items: flex-start !important;
  }

  .admin-panel-head {
    flex-wrap: wrap;
  }

  .admin-panel form.d-flex,
  .admin-panel .d-flex:has(> .form-control) {
    flex-wrap: wrap;
  }

  .admin-panel form.d-flex > .form-control,
  .admin-panel form.d-flex > .form-select {
    flex: 1 1 100%;
  }

  .toast-container,
  body > .position-fixed.top-0.end-0 {
    width: 100%;
    max-width: 100vw;
    padding: 10px !important;
  }

  #cookie-banner {
    bottom: 10px !important;
    width: calc(100vw - 20px) !important;
  }

  #cookie-banner > div {
    padding: 20px 16px 16px !important;
  }

  #global-spinner {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
}

@media (max-width: 575.98px) {
  .btn-group:not(.btn-group-vertical) {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .modal-dialog {
    max-width: calc(100vw - 16px);
    margin-top: 8px;
    margin-bottom: 8px;
  }

  .modal-content {
    max-height: calc(100dvh - 16px);
  }

  .modal-body {
    overflow-y: auto;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}
