/* BOYNERBET mobile bottom navigation + bottom-sheet menu
   Theme Builder > Custom CSS */

:root {
  --boyner-pink: hsl(var(--primary, 340 83% 53%));
  --boyner-pink-soft: rgba(239, 29, 101, .14);
  --boyner-bg: #080712;
  --boyner-panel: #100d1b;
  --boyner-panel-2: #171225;
  --boyner-text: #fff;
  --boyner-muted: #aaa4b5;
  --boyner-line: rgba(255, 255, 255, .09);
  --boyner-bottom-h: 72px;
  --boyner-menu-z: 2147483000;
  --boyner-stable-vh: 100dvh;
}

body.boyner-drawer-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

.boyner-bottom-nav,
.boyner-drawer,
.boyner-drawer-backdrop { display: none; }

.boyner-bottom-nav svg,
.boyner-drawer svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1023px) {
  body.boyner-mobile-enhanced {
    padding-bottom: calc(var(--boyner-bottom-h) + env(safe-area-inset-bottom)) !important;
  }

  /* Comm100 is cross-origin; move its launcher iframe as a whole above the bar. */
  #custom-livechat-container iframe[title*="Sohbet" i],
  [id^="comm100-button-"] iframe,
  #chat_button_adaptive_container,
  iframe[title*="sohbet simgesi" i] {
    position: fixed !important;
    bottom: calc(var(--boyner-bottom-h) + env(safe-area-inset-bottom) + 10px) !important;
    right: 6px !important;
    transition: bottom .22s ease !important;
    filter: hue-rotate(225deg) saturate(1.35) !important;
  }

  .boyner-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: calc(var(--boyner-menu-z) - 20);
    display: flex !important;
    align-items: flex-end;
    justify-content: space-around;
    height: calc(var(--boyner-bottom-h) + env(safe-area-inset-bottom));
    padding: 7px 7px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(239, 29, 101, .22);
    color: var(--boyner-muted);
    background: rgba(8, 7, 18, .94);
    box-shadow: 0 -12px 34px rgba(0, 0, 0, .42);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
  }

  .boyner-bottom-nav__link {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    height: 56px;
    padding: 0 3px;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .boyner-bottom-nav__link > span {
    overflow: hidden;
    max-width: 100%;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .boyner-bottom-nav__link.is-active { color: var(--boyner-pink); }

  .boyner-bottom-nav__link.is-active::after {
    content: "";
    position: absolute;
    top: -7px;
    width: 28px;
    height: 2px;
    border-radius: 99px;
    background: var(--boyner-pink);
    box-shadow: 0 0 12px rgba(239, 29, 101, .75);
  }

  .boyner-bottom-nav__menu { flex-basis: 68px; }

  .boyner-bottom-nav__menu em {
    position: absolute;
    top: -21px;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 4px solid var(--boyner-bg);
    border-radius: 50%;
    color: white;
    background: linear-gradient(145deg, #ff3b7e, var(--boyner-pink) 62%, #bd0d4a);
    box-shadow: 0 10px 28px rgba(239, 29, 101, .4);
    font-style: normal;
    transition: transform .2s ease, box-shadow .2s ease;
  }

  .boyner-bottom-nav__menu[aria-expanded="true"] em {
    transform: rotate(90deg) scale(.94);
    box-shadow: 0 6px 20px rgba(239, 29, 101, .3);
  }

  .boyner-bottom-nav__menu > span { margin-top: 30px; }

  .boyner-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: calc(var(--boyner-menu-z) - 2);
    display: block;
    background: rgba(0, 0, 0, .7);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity .22s ease, visibility .22s ease;
  }

  .boyner-drawer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: var(--boyner-menu-z);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: min(82dvh, calc(var(--boyner-stable-vh) - 18px));
    padding-bottom: env(safe-area-inset-bottom);
    border: 1px solid rgba(239, 29, 101, .2);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    color: var(--boyner-text);
    background:
      radial-gradient(circle at 50% 0, rgba(239, 29, 101, .17), transparent 32%),
      var(--boyner-panel);
    box-shadow: 0 -24px 70px rgba(0, 0, 0, .62);
    visibility: hidden;
    transform: translateY(105%);
    transition: transform .26s cubic-bezier(.2, .8, .2, 1), visibility .26s ease;
  }

  .boyner-drawer::before {
    content: "";
    align-self: center;
    flex: 0 0 auto;
    width: 42px;
    height: 4px;
    margin-top: 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .24);
  }

  .boyner-drawer.is-open,
  .boyner-drawer-backdrop.is-open { visibility: visible; }

  .boyner-drawer.is-open { transform: translateY(0); }
  .boyner-drawer-backdrop.is-open { opacity: 1; }

  .boyner-drawer__head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 8px 15px 10px;
    border-bottom: 1px solid var(--boyner-line);
  }

  .boyner-drawer__brand {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
  }

  .boyner-drawer__brand img {
    display: block;
    width: 150px;
    height: 40px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 0 12px rgba(239, 29, 101, .22));
  }

  .boyner-drawer__age {
    padding: 4px 7px;
    border: 1px solid rgba(239, 29, 101, .32);
    border-radius: 999px;
    color: #ff77a5;
    font-size: 9px;
    font-weight: 900;
  }

  .boyner-icon-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--boyner-line);
    border-radius: 13px;
    color: white;
    background: rgba(255, 255, 255, .045);
    cursor: pointer;
  }

  .boyner-drawer__scroll {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 13px 14px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #b80f4a transparent;
  }

  .boyner-drawer__search {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
    padding: 10px 12px;
    border: 1px solid var(--boyner-line);
    border-radius: 13px;
    color: var(--boyner-muted);
    background: rgba(255, 255, 255, .035);
  }

  .boyner-drawer__search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
    font-size: 16px;
  }

  .boyner-drawer__search input::placeholder { color: #777181; }

  .boyner-drawer__spotlight {
    position: relative;
    overflow: hidden;
    margin-bottom: 13px;
    padding: 14px;
    border: 1px solid rgba(239, 29, 101, .22);
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(239, 29, 101, .19), rgba(255, 255, 255, .025));
  }

  .boyner-drawer__spotlight small,
  .boyner-drawer__spotlight strong,
  .boyner-drawer__spotlight p { position: relative; z-index: 1; display: block; }

  .boyner-drawer__spotlight small {
    margin-bottom: 4px;
    color: #ff77a5;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .14em;
  }

  .boyner-drawer__spotlight strong { font-size: 16px; }
  .boyner-drawer__spotlight p { margin: 4px 0 0; color: var(--boyner-muted); font-size: 11px; line-height: 1.45; }

  .boyner-drawer__groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .boyner-drawer__group { min-width: 0; }
  .boyner-drawer__group:last-child { grid-column: 1 / -1; }

  .boyner-drawer__title {
    margin: 0 9px 6px;
    color: #7c7588;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
  }

  .boyner-drawer__link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    margin: 3px 0;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #d3cedb;
    text-decoration: none;
    transition: .16s ease;
  }

  .boyner-drawer__link:hover,
  .boyner-drawer__link.is-active {
    border-color: rgba(239, 29, 101, .2);
    color: white;
    background: var(--boyner-pink-soft);
  }

  .boyner-drawer__link.is-active svg { color: var(--boyner-pink); }
  .boyner-drawer__link span { flex: 1; min-width: 0; font-size: 12px; font-weight: 750; }

  .boyner-drawer__badge {
    flex: 0 0 auto !important;
    padding: 3px 6px;
    border-radius: 999px;
    color: white;
    background: var(--boyner-pink);
    font-size: 7px !important;
    font-weight: 950 !important;
    text-transform: uppercase;
  }

  .boyner-drawer__quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    padding: 11px 13px;
    border-top: 1px solid var(--boyner-line);
  }

  .boyner-drawer__quick a,
  .boyner-drawer__quick button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, #ff3b7e, var(--boyner-pink) 65%, #bd0d4a);
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
  }

  .boyner-drawer__quick a:last-child {
    border: 1px solid rgba(255, 255, 255, .11);
    color: #ffc2d7;
    background: rgba(255, 255, 255, .045);
  }

  body.boyner-game-route,
  body.boyner-support-open,
  body.boyner-account-open { padding-bottom: 0 !important; }

  body.boyner-game-route .boyner-bottom-nav,
  body.boyner-game-route .boyner-drawer,
  body.boyner-game-route .boyner-drawer-backdrop,
  body.boyner-support-open .boyner-bottom-nav,
  body.boyner-support-open .boyner-drawer,
  body.boyner-support-open .boyner-drawer-backdrop,
  body.boyner-account-open .boyner-drawer,
  body.boyner-account-open .boyner-drawer-backdrop,
  html.boyner-keyboard-open .boyner-bottom-nav {
    display: none !important;
  }

  body.boyner-mobile-enhanced:not(.boyner-game-route):not(.boyner-support-open) .boyner-bottom-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  body.boyner-game-route #custom-livechat-container iframe[title*="Sohbet" i],
  body.boyner-game-route [id^="comm100-button-"] iframe,
  body.boyner-game-route #chat_button_adaptive_container,
  body.boyner-game-route iframe[title*="sohbet simgesi" i] {
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 380px) {
  .boyner-drawer__groups { grid-template-columns: 1fr; }
  .boyner-drawer__group:last-child { grid-column: auto; }
  .boyner-bottom-nav__link > span { font-size: 8px; }
  .boyner-bottom-nav__menu { flex-basis: 58px; }
  .boyner-bottom-nav__menu em { width: 51px; height: 51px; }
}

@media (prefers-reduced-motion: reduce) {
  .boyner-drawer,
  .boyner-drawer-backdrop,
  .boyner-bottom-nav__menu em { transition: none !important; }
}

