/**
 * Bottom Sticky Nav Plugin Styles
 * Author: MojaaDev (https://mojaadev.site)
 */

.bottom-sticky-nav {
  direction: inherit;
  width: 100%;
  max-width: var(--bsn-max-width, 100%);
  margin-inline: auto;
  z-index: 999;
}

.bottom-sticky-nav--rtl {
  direction: rtl;
}

.bottom-sticky-nav--ltr {
  direction: ltr;
}

.bottom-sticky-nav *,
.bottom-sticky-nav *::before,
.bottom-sticky-nav *::after {
  box-sizing: border-box;
}

.bottom-sticky-nav--fixed {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
}

.bottom-sticky-nav--sticky {
  position: sticky;
  bottom: 0;
}

.bottom-sticky-nav--static {
  position: relative;
}

.bottom-sticky-nav--safe-area {
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-sticky-nav__bar {
  position: relative;
  width: 100%;
  min-height: var(--bsn-bar-height, 72px);
  height: var(--bsn-bar-height, auto);
  background-color: var(--bsn-bar-bg, #ffffff);
  box-shadow: var(--bsn-bar-shadow, none);
  overflow: visible;
}

.bottom-sticky-nav__bg-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.bottom-sticky-nav__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(
    var(--bottom-sticky-nav-columns, var(--bsn-columns, 5)),
    minmax(0, 1fr)
  );
  align-items: stretch;
  width: 100%;
  min-height: var(--bsn-bar-height, 72px);
  height: var(--bsn-bar-height, auto);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bottom-sticky-nav__item {
  position: relative;
  min-width: 0;
}

.bottom-sticky-nav__item--center {
  z-index: 2;
}

.bottom-sticky-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding-inline: 4px;
  padding-top: var(--bsn-item-top-padding, 30px);
  gap: var(--bsn-icon-text-gap, 6px);
  text-decoration: none;
  color: var(--bsn-icon-color, #9aa3b2);
  line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: color 160ms ease;
}

.bottom-sticky-nav__link:hover,
.bottom-sticky-nav__link:focus-visible {
  text-decoration: none;
  color: var(--bsn-item-hover-color, #16b886);
}

.bottom-sticky-nav__link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -4px;
}

.bottom-sticky-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--bsn-icon-size, 28px);
  height: var(--bsn-icon-size, 28px);
  font-size: var(--bsn-icon-size, 28px);
  object-fit: contain;
  color: currentColor;
  line-height: 1;
}

.bottom-sticky-nav__icon > *,
.bottom-sticky-nav__icon i,
.bottom-sticky-nav__icon svg,
.bottom-sticky-nav__icon img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

.bottom-sticky-nav__icon svg {
  fill: currentColor;
}

.bottom-sticky-nav__icon img {
  object-fit: contain;
}

.bottom-sticky-nav__text {
  display: block;
  max-width: 100%;
  min-width: 0;
  font-size: var(--bsn-text-font-size, 18px);
  font-weight: var(--bsn-text-font-weight, 500);
  line-height: 1.45;
  text-align: center;
  color: var(--bsn-text-color, #1f2933);
  white-space: normal;
  overflow-wrap: anywhere;
  transition: color 160ms ease;
}

.bottom-sticky-nav__link:hover .bottom-sticky-nav__text,
.bottom-sticky-nav__link:focus-visible .bottom-sticky-nav__text {
  color: var(--bsn-item-hover-color, #16b886);
}

.bottom-sticky-nav__link--center {
  position: absolute;
  top: var(--bsn-center-top-offset, 18px);
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--bsn-center-size, 70px);
  height: var(--bsn-center-size, 70px);
  padding: 0;
  border-radius: 999px;
  background-color: var(--bsn-center-bg, #16b886);
  color: var(--bsn-center-icon-color, #ffffff);
  transform: translateX(-50%);
  transition:
    background-color 160ms ease,
    transform 160ms ease;
  z-index: 5;
}

.bottom-sticky-nav__link--center .bottom-sticky-nav__icon {
  width: var(--bsn-center-icon-size, 30px);
  height: var(--bsn-center-icon-size, 30px);
  font-size: var(--bsn-center-icon-size, 30px);
}

.bottom-sticky-nav__link--center:hover,
.bottom-sticky-nav__link--center:focus-visible {
  background-color: var(--bsn-center-bg-hover, #0ea371);
  color: var(--bsn-center-icon-color, #ffffff);
}

.bottom-sticky-nav__link--center:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: -8px;
}

.bottom-sticky-nav__link--center .bottom-sticky-nav__text {
  display: none;
}

@media (max-width: 767px) {
  .bottom-sticky-nav__text {
    font-size: var(--bsn-text-font-size-mobile, 14px);
  }

  .bottom-sticky-nav__link {
    padding-inline: 2px;
  }
}
