/* Conversion bar for the live admin demo (see assets/js/demo-bar.js). Sits bottom-left of
   the content area, clear of the admin sidebar and of the demo's own "sample data" badge
   on the right. Every glyph is drawn: DM Sans here is the site's latin subset. */
@font-face {
  font-family: 'DM Sans';
  src: url('/assets/fonts/dm-sans-latin.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}

.dd-bar {
  position: fixed;
  left: 248px;
  bottom: 16px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 248px - 480px);
  padding: 6px 6px 6px 8px;
  border-radius: 999px;
  background: #0b0d10;
  color: #f4f6f8;
  font:
    500 13px/1.25 'DM Sans',
    system-ui,
    sans-serif;
  letter-spacing: -0.005em;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 14px 34px -12px rgba(0, 0, 0, 0.5);
  animation: dd-in 0.5s 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.dd-bar svg {
  width: 12px;
  height: 12px;
  flex: none;
}
.dd-bar p {
  margin: 0;
  min-width: 0;
}
.dd-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  color: rgba(244, 246, 248, 0.7);
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px 0 0 999px;
}
.dd-back:hover {
  color: #fff;
}
.dd-copy,
.dd-nudge {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dd-copy b {
  font-weight: 600;
}
.dd-sub {
  color: rgba(244, 246, 248, 0.6);
}
.dd-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 9px 14px;
  border-radius: 999px;
  background: #5fd6ff;
  color: #04121a;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.dd-cta:hover {
  background: #8de3ff;
}
.dd-cta:focus-visible,
.dd-back:focus-visible,
.dd-x:focus-visible {
  outline: 2px solid #5fd6ff;
  outline-offset: 2px;
}
.dd-x {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(244, 246, 248, 0.6);
  cursor: pointer;
}
.dd-x[hidden],
.dd-nudge[hidden] {
  display: none;
}
.dd-x:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* The one-time offer: the bar lifts into a card and the nudge replaces the tagline. */
.dd-bar.is-open {
  flex-wrap: wrap;
  max-width: min(420px, calc(100vw - 248px - 480px));
  padding: 14px;
  border-radius: 18px;
  gap: 10px 12px;
  animation: dd-lift 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.dd-bar.is-open .dd-back,
.dd-bar.is-open .dd-copy {
  display: none;
}
.dd-bar.is-open .dd-nudge {
  flex: 1 1 calc(100% - 44px);
  white-space: normal;
  font-size: 14px;
  line-height: 1.4;
}
.dd-bar.is-open .dd-x {
  order: 2;
  margin: -6px -6px 0 0;
}
.dd-bar.is-open .dd-cta {
  order: 3;
}

@keyframes dd-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes dd-lift {
  from {
    transform: translateY(6px) scale(0.98);
  }
}

@media (max-width: 1360px) {
  .dd-sub {
    display: none;
  }
}
@media (max-width: 1100px) {
  .dd-bar,
  .dd-bar.is-open {
    left: 16px;
    max-width: calc(100vw - 32px);
    bottom: 72px; /* above the demo badge, which spans the bottom edge on narrow screens */
  }
}
@media (prefers-reduced-motion: reduce) {
  .dd-bar,
  .dd-bar.is-open {
    animation: none;
  }
}
@media (max-width: 600px) {
  .dd-copy {
    display: none;
  }
  .dd-bar {
    justify-content: space-between;
  }
}
