/* Frontend Utilities - Utilities
   Small class-based utilities intended to be safe across Duda projects.
*/

.nowrap {
  white-space: nowrap !important;
}

.width-60 {
  scale: 0.6 !important;
  transform-origin: left top !important;
}

@supports (width: calc-size(max-content, size * 0.6)) {
  .width-60 {
    width: calc-size(max-content, size * 0.6) !important;
    scale: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .no-tablet-animation {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

@media (max-width: 1200px) {
  .stack-desktop-narrow {
    display: flex;
    flex-direction: column !important;
    align-items: start !important;
    gap: 48px !important;
  }

  .stack-desktop-narrow.shrink {
    width: max-content !important;
  }
}

.row-scroll-mobile,
.row-scroll-tablet,
.row-scroll-tablet-mobile {
  --row-scroll-gap: 16px;
  --row-scroll-padding-inline: 5%;
  --row-scroll-snap-type: x proximity;
  --row-scroll-snap-align: start;
  --row-scroll-item-width: 65vw;
}

@media (min-width: 1025px) {
  .bg-tablet-only,
  .bg-tablet-only::before,
  .bg-tablet-mobile-only,
  .bg-tablet-mobile-only::before,
  .bg-mobile-only,
  .bg-mobile-only::before {
    background-color: transparent !important;
    background-image: none !important;
  }

  .border-tablet-only,
  .border-tablet-mobile-only,
  .border-mobile-only {
    border-width: 0 !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .bg-desktop-only,
  .bg-desktop-only::before,
  .bg-mobile-only,
  .bg-mobile-only::before {
    background-color: transparent !important;
    background-image: none !important;
  }

  .border-desktop-only,
  .border-mobile-only {
    border-width: 0 !important;
  }

  :is(.row-scroll-tablet, .row-scroll-tablet-mobile),
  #dm :is(.row-scroll-tablet, .row-scroll-tablet-mobile) {
    display: block !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: var(--row-scroll-snap-type);
    scroll-padding-inline: var(--row-scroll-padding-inline);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  :is(.row-scroll-tablet, .row-scroll-tablet-mobile)::-webkit-scrollbar,
  #dm :is(.row-scroll-tablet, .row-scroll-tablet-mobile)::-webkit-scrollbar {
    display: none;
  }

  :is(.row-scroll-tablet, .row-scroll-tablet-mobile) .row-scroll-track,
  #dm :is(.row-scroll-tablet, .row-scroll-tablet-mobile) .row-scroll-track {
    display: inline-flex !important;
    gap: var(--row-scroll-gap) !important;
    box-sizing: border-box !important;
    padding-inline: var(--row-scroll-padding-inline) !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    flex: 0 0 auto !important;
  }

  :is(.row-scroll-tablet, .row-scroll-tablet-mobile) .row-scroll-track > *,
  #dm :is(.row-scroll-tablet, .row-scroll-tablet-mobile) .row-scroll-track > * {
    flex: 0 0 var(--row-scroll-item-width) !important;
    max-width: var(--row-scroll-item-width) !important;
    scroll-snap-align: var(--row-scroll-snap-align);
  }
}

@media (max-width: 767px) {
  .bg-desktop-only,
  .bg-desktop-only::before,
  .bg-desktop-tablet-only,
  .bg-desktop-tablet-only::before,
  .bg-tablet-only,
  .bg-tablet-only::before {
    background-color: transparent !important;
    background-image: none !important;
  }

  .border-desktop-only,
  .border-desktop-tablet-only {
    border-width: 0 !important;
  }

  :is(.row-scroll-mobile, .row-scroll-tablet-mobile),
  #dm :is(.row-scroll-mobile, .row-scroll-tablet-mobile) {
    display: block !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: var(--row-scroll-snap-type);
    scroll-padding-inline: var(--row-scroll-padding-inline);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  :is(.row-scroll-mobile, .row-scroll-tablet-mobile)::-webkit-scrollbar,
  #dm :is(.row-scroll-mobile, .row-scroll-tablet-mobile)::-webkit-scrollbar {
    display: none;
  }

  :is(.row-scroll-mobile, .row-scroll-tablet-mobile) .row-scroll-track,
  #dm :is(.row-scroll-mobile, .row-scroll-tablet-mobile) .row-scroll-track {
    display: inline-flex !important;
    gap: var(--row-scroll-gap) !important;
    box-sizing: border-box !important;
    padding-inline: var(--row-scroll-padding-inline) !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    flex: 0 0 auto !important;
  }

  :is(.row-scroll-mobile, .row-scroll-tablet-mobile) .row-scroll-track > *,
  #dm :is(.row-scroll-mobile, .row-scroll-tablet-mobile) .row-scroll-track > * {
    flex: 0 0 var(--row-scroll-item-width) !important;
    max-width: var(--row-scroll-item-width) !important;
    scroll-snap-align: var(--row-scroll-snap-align);
  }
}
