/* Mobile Floating Bottom Bar Styles */
.tcmfb-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--tcmfb-bg, rgba(15, 23, 42, 0.96)); /* slate-900-ish */
  color: var(--tcmfb-text, #fff);
  -webkit-backdrop-filter: saturate(180%) blur(6px);
  backdrop-filter: saturate(180%) blur(6px);
  border-top: 1px solid var(--tcmfb-border, rgba(255, 255, 255, 0.08));
  padding-bottom: env(safe-area-inset-bottom, 0);
  /* New: ensure no horizontal overflow and rounded top corners */
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  border-top-left-radius: var(--tcmfb-radius, 14px);
  border-top-right-radius: var(--tcmfb-radius, 14px);
}

.tcmfb-list {
  margin: 0;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0));
  list-style: none;
  display: grid;
  grid-template-columns: repeat(var(--tcmfb-columns, 4), 1fr);
  gap: 6px;
  align-items: center;
  max-width: 100%;
}

.tcmfb-item { text-align: center; min-width: 0; }

.tcmfb-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: inherit;
  padding: 8px 6px;
  border-radius: var(--tcmfb-item-radius, 10px);
  max-width: 100%;
}

.tcmfb-link:focus,
.tcmfb-link:hover { background: var(--tcmfb-hover, rgba(255, 255, 255, 0.08)); outline: none; }
.tcmfb-link:focus-visible { box-shadow: 0 0 0 2px rgba(59,130,246,0.7) inset; }

.tcmfb-icon { line-height: 1; display: inline-flex; }

.tcmfb-text {
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Only show on small/tablet screens */
@media (min-width: 1025px) {
  .tcmfb-bar { display: none !important; }
}

/* Reserve space for the bar to avoid covering content (JS sets body padding-bottom as fallback) */
html.tcmfb-has-bar body { padding-bottom: var(--tcmfb-reserved, 64px); }

/* Prevent horizontal scrolling while the bar is active */
html.tcmfb-has-bar, html.tcmfb-has-bar body { overflow-x: hidden; }

/* Colors are controlled via CSS variables injected by the plugin options */
