/* Mobile bottom tab bar and menu sheet. Visible below 992px only. */
.ifl-tabbar, .ifl-tabsheet, .ifl-tabsheet-backdrop { display: none; }

@media (max-width: 991.98px) {
  :root { --ifl-tabbar-h: 66px; --ifl-safe-b: env(safe-area-inset-bottom, 0px); }
  body { padding-bottom: calc(var(--ifl-tabbar-h) + 6px + var(--ifl-safe-b)); }

  /* ---------- Tab bar ---------- */
  .ifl-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    height: calc(var(--ifl-tabbar-h) + var(--ifl-safe-b));
    padding: 0 .35rem var(--ifl-safe-b);
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid #e6edf4;
    box-shadow: 0 -10px 30px rgba(16, 35, 63, .08);
    -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
    transition: transform .28s ease;
  }
  .ifl-tabbar.is-hidden { transform: translateY(110%); }
  .ifl-tab {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .18rem;
    height: var(--ifl-tabbar-h); padding: 0; border: 0; background: none;
    color: #6b7a90; font: inherit; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .ifl-tab-icon { position: relative; display: grid; place-items: center; width: 46px; height: 30px; border-radius: 999px; transition: background .2s ease; }
  .ifl-tab-icon i { font-size: 1.25rem; line-height: 1; transition: transform .2s ease, opacity .2s ease; }
  .ifl-tab-label { font-size: .69rem; font-weight: 600; letter-spacing: .01em; }
  .ifl-tab:active .ifl-tab-icon i { transform: scale(.88); }
  .ifl-tab.is-active { color: #087fac; }
  .ifl-tab.is-active .ifl-tab-icon { background: #e3f4fb; }
  .ifl-tab.is-active .ifl-tab-label { font-weight: 700; }
  .ifl-tab:focus-visible { outline: 2px solid #06a3da; outline-offset: -3px; border-radius: 12px; }

  /* More button morphs into a close button while the sheet is open */
  .ifl-tab-more .bi-x-lg { position: absolute; opacity: 0; transform: rotate(-90deg); }
  .ifl-tab-more[aria-expanded="true"] { color: #087fac; }
  .ifl-tab-more[aria-expanded="true"] .ifl-tab-icon { background: #e3f4fb; }
  .ifl-tab-more[aria-expanded="true"] .bi-list { opacity: 0; transform: rotate(90deg); }
  .ifl-tab-more[aria-expanded="true"] .bi-x-lg { opacity: 1; transform: none; }

  .ifl-tab-demo { justify-content: flex-end; padding-bottom: .5rem; color: #10233f; }
  .ifl-tab-demo .ifl-tab-label { font-weight: 700; }
  .ifl-tab-demo-btn {
    display: grid; place-items: center; width: 58px; height: 58px; margin-top: -28px; margin-bottom: .12rem;
    border-radius: 50%; background: linear-gradient(145deg, #12b5ea 0%, #087fac 100%);
    color: #fff; box-shadow: 0 10px 24px rgba(6, 163, 218, .40), 0 0 0 5px #fff;
    transition: transform .2s ease;
  }
  .ifl-tab-demo-btn i { font-size: 1.4rem; }
  .ifl-tab-demo:active .ifl-tab-demo-btn { transform: scale(.94); }

  /* Keep other floating elements clear of the bar */
  .scroll-top { bottom: calc(var(--ifl-tabbar-h) + 18px + var(--ifl-safe-b)) !important; }
  .ifl-cookie-banner { bottom: calc(var(--ifl-tabbar-h) + 12px + var(--ifl-safe-b)) !important; }

  /* ---------- Sheet ---------- */
  .ifl-tabsheet-backdrop:not([hidden]) {
    display: block; position: fixed; inset: 0; z-index: 9996;
    background: rgba(15, 23, 42, .42); animation: ifl-fade .2s ease;
  }
  .ifl-tabsheet:not([hidden]) {
    display: flex; flex-direction: column;
    position: fixed; left: 0; right: 0; z-index: 9997;
    bottom: calc(var(--ifl-tabbar-h) + var(--ifl-safe-b));
    max-height: calc(100vh - var(--ifl-tabbar-h) - 56px);
    max-height: calc(100dvh - var(--ifl-tabbar-h) - var(--ifl-safe-b) - 56px);
    border-radius: 24px 24px 0 0; background: #fff;
    box-shadow: 0 -18px 48px rgba(16, 35, 63, .22);
    animation: ifl-sheet-up .3s cubic-bezier(.2, .85, .25, 1);
  }
  .ifl-tabsheet-handle { flex: 0 0 auto; width: 40px; height: 5px; margin: .55rem auto .35rem; border-radius: 99px; background: #d5dee8; }

  .ifl-tabsheet-top { flex: 0 0 auto; display: flex; align-items: center; gap: .6rem; padding: .2rem 1rem .7rem; }
  .ifl-tabsheet-search {
    flex: 1 1 auto; display: flex; align-items: center; gap: .55rem; height: 46px; margin: 0; padding: 0 .9rem;
    border: 1px solid #dbe3ec; border-radius: 14px; background: #f6f9fc; color: #6b7a90; cursor: text;
  }
  .ifl-tabsheet-search:focus-within { border-color: #06a3da; background: #fff; box-shadow: 0 0 0 3px rgba(6, 163, 218, .15); }
  .ifl-tabsheet-search input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #10233f; font-size: 16px; }
  .ifl-tabsheet-search input::placeholder { color: #8a97aa; }
  .ifl-tabsheet-close { flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 14px; background: #f1f5f9; color: #10233f; font-size: 1rem; }

  .ifl-tabsheet-tabs { flex: 0 0 auto; display: flex; gap: .4rem; overflow-x: auto; padding: 0 1rem .75rem; scrollbar-width: none; scroll-padding: 0 1rem; }
  .ifl-tabsheet-tabs::-webkit-scrollbar { display: none; }
  .ifl-tabsheet-tabs button {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: .35rem; height: 36px; padding: 0 .9rem;
    border: 1px solid #dbe3ec; border-radius: 999px; background: #fff;
    color: #334155; font: inherit; font-size: .82rem; font-weight: 600; line-height: 1; white-space: nowrap;
  }
  .ifl-tabsheet-tabs button i { font-size: .85rem; color: #8a97aa; }
  .ifl-tabsheet-tabs button[aria-selected="true"] { border-color: #10233f; background: #10233f; color: #fff; }
  .ifl-tabsheet-tabs button[aria-selected="true"] i { color: #6fd2f3; }
  .ifl-tabsheet.is-searching .ifl-tabsheet-tabs { display: none; }

  .ifl-tabsheet-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: .15rem 1rem 1rem; border-top: 1px solid #eef2f6; -webkit-overflow-scrolling: touch; }
  .ifl-tabsheet .ifl-tabsheet-panel { margin: 0; padding: .75rem 0 0 !important; background: none !important; min-height: 0; }
  .ifl-tabsheet .ifl-tabsheet-panel::before, .ifl-tabsheet .ifl-tabsheet-panel::after { display: none !important; }
  .ifl-tabsheet-panel:not([hidden]) { animation: ifl-panel-in .22s ease; }

  .ifl-tabsheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0; padding: 0; list-style: none; }
  .ifl-tabsheet-grid li a {
    position: relative; display: flex; align-items: center; gap: .6rem; min-height: 56px; height: 100%; padding: .6rem .7rem;
    border: 1px solid #e3eaf2; border-radius: 14px; background: #fff;
    color: #10233f; text-decoration: none; transition: border-color .15s ease, background .15s ease, transform .15s ease;
  }
  .ifl-tabsheet-grid li a:active { transform: scale(.98); background: #f3f9fd; }
  .ifl-tile-icon { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #e8f6fc; color: #087fac; font-size: 1rem; }
  .ifl-tile-text { display: flex; flex-direction: column; min-width: 0; }
  .ifl-tile-text strong { font-size: .86rem; font-weight: 700; line-height: 1.2; }
  .ifl-tile-text small { margin-top: .15rem; color: #6b7a90; font-size: .72rem; line-height: 1.25; }
  .ifl-tabsheet-grid.has-desc li a { min-height: 66px; }
  .ifl-tabsheet-grid li a[aria-current="page"] { border-color: #06a3da; background: #f0f9fd; }
  .ifl-tile-here { position: absolute; top: -8px; right: 8px; padding: .1rem .45rem; border-radius: 999px; background: #06a3da; color: #fff; font-size: .6rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }

  .ifl-tabsheet-results-label { margin: 0 0 .5rem; color: #6b7a90; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .ifl-tabsheet-empty { margin: 1rem 0; color: #52627a; font-size: .9rem; text-align: center; }
  .ifl-tabsheet-empty a { color: #087fac; font-weight: 600; }

  .ifl-tabsheet-foot { flex: 0 0 auto; display: flex; gap: .5rem; padding: .7rem 1rem calc(.8rem + 26px); border-top: 1px solid #eef2f6; background: #fff; }
  .ifl-sheet-cta {
    flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 48px;
    border-radius: 14px; background: linear-gradient(145deg, #12b5ea 0%, #087fac 100%);
    color: #fff; font-size: .95rem; font-weight: 700; text-decoration: none; box-shadow: 0 8px 18px rgba(6, 163, 218, .3);
  }
  .ifl-sheet-cta:hover { color: #fff; filter: brightness(1.04); }
  .ifl-sheet-icon { flex: 0 0 48px; display: grid; place-items: center; height: 48px; border: 1px solid #dbe3ec; border-radius: 14px; color: #087fac; font-size: 1.15rem; text-decoration: none; }
  .ifl-sheet-icon.is-wa { color: #16a34a; }

  body.ifl-sheet-open { overflow: hidden; }
  body.ifl-sheet-open .scroll-top, body.ifl-sheet-open .ifl-cookie-banner { visibility: hidden !important; opacity: 0 !important; }
}

@media (max-width: 359.98px) {
  .ifl-tabsheet-grid { grid-template-columns: 1fr; }
  .ifl-tab-label { font-size: .64rem; }
}
@keyframes ifl-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ifl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ifl-panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ifl-tabsheet, .ifl-tabsheet-backdrop, .ifl-tabsheet-panel, .ifl-tabbar { animation: none !important; transition: none !important; }
}
