/* bar.css, the bottom bar. A TEST, 2026-09-25, only live behind ?bar=1.

   Copied from tryhappyads.com, Sabby's older Webflow site, off its computed
   styles measured in a real browser at 390 and 1440 wide, not guessed from a
   screenshot. His words: the bar at the bottom looks beautiful, make that
   exact bar. Two differences, both on purpose:

   1. Poppins, not Happy Ads' Space Grotesk. The site's type is the brand.
   2. It stays hidden until the first screen has scrolled away. Happy Ads
      shows it from the start; Sabby wants the hero left alone.

   Happy Ads numbers kept as measured: fixed 20px off the bottom, 1px
   #555B62 outline, 20px corners, rgba(26,29,34,.9) with a 5px blur, padding
   10 10 10 16, a 35px home icon, a 32px burger of three 16x2 lines, links at
   16px/600 in #EDEDED with 12px 16px padding and 12px corners, and the Apply
   button 40px tall, 12px corners, 12px 20px padding, white on the accent.
   Under 992px (Webflow's "medium") the links fold into the burger and open
   in a matching glass panel above the bar.

   Everything is scoped to .dbar, and bar.js only builds it when theme.js has
   put data-bar on <html>, so without the parameter none of this applies. */

.dbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;            /* only the bar itself takes taps */
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity .45s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
  font-family: 'Poppins', sans-serif;
}
.dbar.is-shown { opacity: 1; transform: none; }

.dbar-inner {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 64px;
  padding: 10px 10px 10px 16px;
  border: 1px solid #555B62;
  border-radius: 20px;
  background: rgba(26, 29, 34, .9);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-sizing: border-box;
}
.dbar:not(.is-shown) .dbar-inner { pointer-events: none; }

.dbar-left { display: flex; align-items: center; gap: 10px; }

.dbar-home {
  display: block;
  width: 35px;
  height: 35px;
  color: #EDEDED;
  -webkit-tap-highlight-color: transparent;
}
.dbar-home svg { display: block; width: 35px; height: 35px; }
.dbar-home:hover { color: #fff; }

/* The burger. Three lines become an X when the panel is open, the same as
   Happy Ads. A <button>, so it is reachable by keyboard and says what it
   does to a screen reader. */
.dbar-menu {
  display: none;
  width: 32px;
  height: 32px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
}
.dbar-menu span {
  display: block;
  width: 16px;
  height: 2px;
  background: #EDEDED;
  border-radius: 1px;
  transition: transform .25s ease, opacity .2s ease;
}
.dbar.is-open .dbar-menu span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.dbar.is-open .dbar-menu span:nth-child(2) { opacity: 0; }
.dbar.is-open .dbar-menu span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.dbar-links { display: flex; align-items: center; gap: 0; }
.dbar-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #EDEDED;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease;
}
.dbar-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }

.dbar-apply {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--accent);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, .1);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background-color .2s ease;
}
.dbar-apply:hover { color: #fff; background: var(--accent-deep); }

/* The panel the burger opens. Same glass as the bar, 8px above it. */
.dbar-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 20px 16px;
  border-radius: 20px;
  background: rgba(26, 29, 34, .9);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.dbar.is-open .dbar-panel { opacity: 1; transform: none; pointer-events: auto; }
.dbar-panel a {
  display: block;
  padding: 10px 0;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}
.dbar-panel a + a { margin-top: 12px; }

/* Room under the footer so the bar never sits on the wolves at the end. */
html[data-bar] footer { padding-bottom: 110px; }

@media (max-width: 991px) {
  .dbar-links { display: none; }
  .dbar-menu { display: flex; }
  /* 74vw closed is Happy Ads' own value; it widens when the panel opens, the
     way theirs does, so the panel has room. */
  .dbar-inner { width: 74vw; max-width: 340px; height: 62px; transition: width .3s ease, max-width .3s ease; }
  .dbar.is-open .dbar-inner { width: calc(100vw - 20px); max-width: 520px; }
}
@media (max-width: 360px) {
  .dbar-inner { width: calc(100vw - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  .dbar, .dbar-inner, .dbar-panel, .dbar-menu span { transition: none; }
}
