.btn-wa {
  color: #fff !important;
  background-color: #25d366 !important;
  border-color: #25d366 !important;
}

.btn-tg {
  color: #fff !important;
  background-color: #0088cc !important;
  border-color: #0088cc !important;
}

.btn-max {
  color: #fff !important;
  background-color: #0077ff !important;
  border-color: #0077ff !important;
}

.btn-wa img,
.btn-tg img,
.btn-max img {
  height: 1.3em;
  width: 1.3em;
  object-fit: contain;
  vertical-align: middle;
}

.nav-help-link {
  font-size: 0.85rem;
  color: #6c757d;
  text-decoration: none;
}

.nav-help-link:hover {
  color: #495057;
}

.navbar-brand img {
  width: 80px;
  height: auto;
}

@media (max-width: 992px) {
  .navbar-brand img {
    width: 50px;
  }
}

@media (max-width: 576px) {
  .navbar-brand img {
    width: 30px;
  }
}

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --crm-tab-h: 3.75rem;
  --crm-tab-total: calc(var(--crm-tab-h) + var(--safe-bottom));
}

html {
  scroll-padding-bottom: var(--crm-tab-total);
}

body.crm-has-tab-bar {
  padding-bottom: var(--crm-tab-total);
}

.crm-mobile-tab-bar,
.crm-nav-overlay {
  display: none;
}

.crm-skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 999px;
  background: #343a40;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.crm-skip-link:focus {
  left: 1rem;
}

.crm-mobile-tab-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  min-width: 0;
  min-height: 48px;
  padding: .35rem .2rem;
  border: 0;
  background: transparent;
  color: #6c757d;
  font-size: .68rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.crm-mobile-tab-bar__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.crm-mobile-tab-bar__item.is-active {
  color: #212529;
}

.crm-mobile-tab-bar__item--cta {
  flex: 1.1;
  margin: .2rem .25rem .3rem 0;
  border-radius: 999px;
  background: #007bff;
  color: #fff;
}

.crm-mobile-tab-bar__item--cta.is-active {
  color: #fff;
}

.crm-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.crm-nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.crm-mobile-messenger {
  display: none;
}

@media (max-width: 899px) {
  html,
  body {
    overflow-x: hidden;
  }

  .crm-mobile-tab-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 220;
    align-items: stretch;
    min-height: var(--crm-tab-h);
    padding-bottom: var(--safe-bottom);
    background: rgba(248, 249, 250, .97);
    border-top: 1px solid #dee2e6;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .08);
  }

  .crm-nav-overlay {
    display: block;
  }

  .navbar .custom-toggler {
    display: none !important;
  }

  #mySidenav.sidenav {
    top: calc(64px + var(--safe-top));
    right: 16px;
    bottom: var(--crm-tab-total);
    left: 16px;
    width: auto;
    height: auto;
    padding-top: 12px;
    z-index: 240;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }

  body.crm-nav-open #mySidenav.sidenav {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  body.crm-nav-open {
    overflow: hidden;
  }

  #mySidenav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #495057;
  }

  .crm-mobile-messenger {
    display: block;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    background: #fff;
  }

  .crm-mobile-messenger h5 {
    font-size: 1rem;
    margin-bottom: .75rem;
  }

  .crm-mobile-messenger .input-group-append .btn {
    min-width: 48px;
    min-height: 48px;
    padding: .5rem;
  }

  .crm-mobile-messenger .form-control {
    min-height: 48px;
  }

  .btn,
  .page-link {
    min-height: 44px;
  }

  .container {
    max-width: 100%;
    padding-left: max(12px, var(--safe-left, 0px));
    padding-right: max(12px, var(--safe-right, 0px));
  }

  #searchForm.search-form,
  #searchForm .search-form__filters {
    max-width: 100%;
    overflow: hidden;
  }

  #searchForm .search-form__summary {
    cursor: pointer;
    padding: .35rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  #searchForm .search-form__hint {
    text-align: left !important;
    font-size: .875rem;
    line-height: 1.45;
  }

  #searchForm .search-form__actions {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    width: 100%;
  }

  #searchForm .search-form__actions .btn {
    width: 100%;
    margin: 0 !important;
    min-height: 48px;
  }

  #searchForm .search-form__filters .form-control,
  #searchForm .search-form__filters select.form-control {
    min-height: 48px;
    font-size: 1rem;
  }

  #searchForm .search-form__apply {
    min-height: 48px;
    font-size: 1rem;
    white-space: normal;
  }

  #searchForm #searchInput {
    min-height: 48px;
    font-size: 1rem;
  }

  #searchResultsTable .table-responsive {
    margin: 0 -2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #searchResultsTable table {
    min-width: 280px;
  }

  .pricing-header {
    padding-top: 1.25rem !important;
    padding-bottom: 1rem !important;
  }

  .container > .row.justify-content-center.justify-content-lg-end {
    display: none;
  }

  .table-responsive {
    margin-bottom: .5rem;
  }

  .container > .row > .btn,
  .container > .row .btn,
  .container > .row form .btn {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .container > .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .breadcrumb {
    font-size: .9rem;
    flex-wrap: wrap;
  }

  form .d-flex.justify-content-between.align-items-center.mb-4 {
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }

  form .d-flex.justify-content-between.align-items-center.mb-4 .btn {
    width: 100%;
  }

  .crm-mobile-messenger .input-group {
    flex-wrap: wrap;
  }

  .crm-mobile-messenger .input-group > .form-control {
    flex: 1 1 100%;
    min-width: 0;
    border-radius: .25rem .25rem 0 0;
  }

  .crm-mobile-messenger .input-group-append {
    display: flex;
    width: 100%;
    margin-left: 0;
  }

  .crm-mobile-messenger .input-group-append .btn {
    flex: 1;
  }

  .table-responsive .table.table-sm td,
  .table-responsive .table.table-sm th {
    font-size: .875rem;
  }
}

@media (min-width: 768px) {
  #searchForm .search-form__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    width: auto;
  }

  #searchForm .search-form__actions .btn-block {
    width: auto;
    flex: 0 0 auto;
  }

  #searchForm .search-form__hint {
    text-align: center;
  }
}

@media (min-width: 900px) {
  body.crm-has-tab-bar {
    padding-bottom: 0;
  }

  .crm-mobile-tab-bar,
  .crm-nav-overlay {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crm-nav-overlay {
    transition: none;
  }
}
