/**
 * Facebook-style mobile bottom dock
 */

.vtg-mobile-dock {
  --vtg-dock-active: var(--vtg-nav-active, var(--primary-color, #154787));
  --vtg-dock-active-bg: color-mix(in srgb, var(--vtg-dock-active) 14%, #fff);
  --vtg-dock-accent: var(--vtg-nav-accent, var(--fs-color-secondary, #C09C40));
  display: none;
}

@media (max-width: 849px) {
  .vtg-has-mobile-dock .vtg-mobile-dock {
    display: block;
    position: fixed;
    z-index: 999;
    left: 14px;
    right: 14px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
  }

  .vtg-dock {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    height: 54px;
    padding: 3px 6px 3px 4px;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  }

  .vtg-dock__item {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    color: #050505;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .vtg-dock__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: transparent;
  }

  .vtg-dock-svg {
    width: 32px;
    height: 32px;
    display: block;
    overflow: visible;
  }

  .vtg-i-fill {
    display: none;
  }

  .vtg-i-outline {
    display: block;
  }

  .vtg-dock__item.is-active {
    color: var(--vtg-dock-active);
  }

  .vtg-dock__item.is-active .vtg-dock__icon {
    width: 56px;
    height: 44px;
    background: var(--vtg-dock-active-bg);
  }

  .vtg-dock__item.is-active .vtg-i-outline {
    display: none;
  }

  .vtg-dock__item.is-active .vtg-i-fill {
    display: block;
  }

  .vtg-dock__avatar {
    flex: 0 0 44px;
    width: 44px;
  }

  .vtg-dock__avatar .vtg-dock__icon {
    width: 40px;
    height: 40px;
    background: transparent !important;
  }

  .vtg-dock__avatar img,
  .vtg-dock__avatar .avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: block;
    object-fit: cover;
    box-shadow: 0 0 0 2px var(--vtg-dock-accent, #C09C40);
  }

  .vtg-dock__avatar--guest {
    color: #050505;
  }

  .vtg-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.42);
  }

  body.vtg-sidebar-drawer-open .vtg-sidebar-backdrop {
    display: block;
  }

  body.vtg-sidebar-drawer-open .vtg-sidebar {
    z-index: 1001;
  }

  body.vtg-search-open .vtg-mobile-dock {
    display: none;
  }

  .vtg-search-sheet {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: #fff;
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0px);
  }

  .vtg-search-sheet[hidden] {
    display: none !important;
  }

  .vtg-search-sheet__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px 10px;
  }

  .vtg-search-sheet__back {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
  }

  .vtg-search-sheet__form {
    flex: 1;
    min-width: 0;
  }

  .vtg-search-sheet__input {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #f0f2f5;
    padding: 0 16px;
    font-size: 16px;
    color: #050505;
    outline: none;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
  }

  .vtg-search-sheet__input:focus {
    background: #ebedf0;
    box-shadow: none !important;
  }

  .vtg-search-sheet__body {
    flex: 1;
    overflow: auto;
    padding: 8px 16px 24px;
  }

  .vtg-search-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 12px;
  }

  .vtg-search-sheet__head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #050505;
  }

  .vtg-search-sheet__all {
    border: 0;
    background: transparent;
    color: #154787;
    font-size: 15px;
    padding: 0;
    cursor: pointer;
  }

  .vtg-search-recent {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .vtg-search-recent li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: #050505;
    text-decoration: none;
    font-size: 16px;
  }

  .vtg-search-recent__icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #e4e6eb;
    color: #050505;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
  }

  .vtg-search-recent__empty {
    color: #65676b;
    padding: 8px 0;
    font-size: 15px;
  }

  body.vtg-has-mobile-dock {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  body.vtg-dock-hide-header #header,
  body.vtg-dock-hide-header .header-mobile-bar,
  body.vtg-dock-hide-header .header-wrapper {
    display: none !important;
  }

  body.vtg-dock-hide-header.header-sidebar-layout #wrapper {
    padding-left: 0;
  }

  body.vtg-has-mobile-dock .back-to-top {
    bottom: 80px;
  }
}

@media (min-width: 850px) {
  .vtg-mobile-dock,
  body.vtg-has-mobile-dock .vtg-mobile-dock,
  .vtg-search-sheet,
  .vtg-sidebar-backdrop {
    display: none !important;
  }
}
