/* Mobile bottom bar — teal / lime / white */

.ffl-bottombar {
  display: none;
}

@media (max-width: 979px) {
  body.ffl-body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .ffl-bottombar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) 72px repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 0;
    min-height: 64px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid rgba(0, 169, 206, 0.18);
    box-shadow: 0 -8px 28px rgba(15, 40, 60, 0.1);
  }

  .ffl-bottombar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: var(--ffl-teal, #00a9ce);
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .ffl-bottombar__ico {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: var(--ffl-teal, #00a9ce);
  }

  .ffl-bottombar__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: var(--ffl-ink, #1a1f26);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ffl-bottombar__item:active .ffl-bottombar__ico,
  .ffl-bottombar__item.is-active .ffl-bottombar__ico {
    color: var(--ffl-lime-deep, #b0bc24);
  }

  /* Center donate FAB */
  .ffl-bottombar__donate {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-decoration: none;
    margin-top: -22px;
  }

  .ffl-bottombar__donate-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ffl-lime, #c6d32d);
    border: 4px solid #fff;
    box-shadow: 0 8px 22px rgba(0, 169, 206, 0.28);
    display: grid;
    place-items: center;
    transition: transform 0.15s ease, background 0.15s ease;
  }

  .ffl-bottombar__donate:active .ffl-bottombar__donate-btn {
    transform: scale(0.96);
    background: var(--ffl-lime-deep, #b0bc24);
  }

  .ffl-bottombar__donate-img {
    display: block;
    width: 34px;
    height: 34px;
    object-fit: contain;
  }

  /* Language popup */
  .ffl-bottombar__lang {
    position: relative;
  }

  .ffl-bottombar__lang-btn {
    width: 100%;
  }

  .ffl-bottombar__lang-panel {
    position: absolute;
    right: 4px;
    bottom: calc(100% + 10px);
    min-width: 112px;
    padding: 8px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(0, 169, 206, 0.2);
    box-shadow: 0 12px 32px rgba(15, 40, 60, 0.16);
    display: grid;
    gap: 4px;
    z-index: 2;
  }

  .ffl-bottombar__lang-panel[hidden] {
    display: none !important;
  }

  .ffl-bottombar__lang-panel::after {
    content: "";
    position: absolute;
    right: 22px;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-right: 1px solid rgba(0, 169, 206, 0.2);
    border-bottom: 1px solid rgba(0, 169, 206, 0.2);
    transform: rotate(45deg);
  }

  .ffl-bottombar__lang-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--ffl-ink, #1a1f26);
    background: var(--ffl-bg-soft, #f7f9fb);
  }

  .ffl-bottombar__lang-link.is-active,
  .ffl-bottombar__lang-link:active {
    background: var(--ffl-teal, #00a9ce);
    color: #fff;
  }

  .ffl-bottombar__lang.is-open .ffl-bottombar__lang-btn .ffl-bottombar__ico {
    color: var(--ffl-lime-deep, #b0bc24);
  }
}
