/* BespokeWorks.ai — Cookie consent banner (F1 redesign theme).
   Mirrors the global F1 tokens used across the site:
     bg #070914, surface #0c1220, border #1c2a42,
     accent #00d4b0, accent-hi #00ffda, accent-deep #007a6a,
     text #e4edff, muted #4e6690.
   Fonts: Space Grotesk + DM Sans + JetBrains Mono.
*/

#bw-cookie-banner {
  position: fixed;
  /* Desktop: compact floating card in bottom-left so it never overlaps
     centred/right-aligned form submit buttons (e.g. contact form).
     Mobile override sits at the bottom of this file. */
  left: 16px;
  bottom: 16px;
  max-width: 420px;
  z-index: 2147483000;
  max-width: 560px;
  margin-left: auto;
  background: rgba(7, 9, 20, 0.92);
  color: #e4edff;
  border: 1px solid #1c2a42;
  border-top: 1px solid rgba(0, 212, 176, 0.35);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 212, 176, 0.05) inset;
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: bw-cc-in 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

#bw-cookie-banner.bw-cc-out {
  animation: bw-cc-out 200ms ease-in forwards;
}

@keyframes bw-cc-in {
  from { transform: translateY(24px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1);       opacity: 1; }
}
@keyframes bw-cc-out {
  from { transform: translateY(0) scale(1);       opacity: 1; }
  to   { transform: translateY(24px) scale(0.98); opacity: 0; }
}

.bw-cc-inner {
  /* Stack vertically on desktop now that the banner is a compact card */
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 16px;
}

/* Eyebrow above the body copy — mono caps, signals "this is a system message" */
.bw-cc-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #00d4b0;
}
.bw-cc-eyebrow::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00d4b0;
  animation: bw-cc-dot 2.5s ease-in-out infinite;
}
@keyframes bw-cc-dot {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.35); }
}

.bw-cc-text {
  color: rgba(228, 237, 255, 0.78);
  font-family: 'DM Sans', system-ui, sans-serif;
}

.bw-cc-text strong {
  color: #e4edff;
  font-weight: 600;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.bw-cc-text a {
  color: #00d4b0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 150ms ease, text-decoration-thickness 150ms ease;
}

.bw-cc-text a:hover,
.bw-cc-text a:focus-visible {
  color: #00ffda;
  text-decoration-thickness: 2px;
}

.bw-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bw-cc-btn {
  appearance: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 9px 18px;
  border-radius: 999px;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 80ms ease;
  white-space: nowrap;
  line-height: 1;
}

.bw-cc-btn:active {
  transform: translateY(1px);
}

.bw-cc-btn:focus-visible {
  outline: 2px solid #00d4b0;
  outline-offset: 3px;
}

/* Ghost (Reject / Analytics-only) — subtle, low-pressure */
.bw-cc-btn-ghost {
  background: transparent;
  color: rgba(228, 237, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.14);
}

.bw-cc-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.28);
  color: #e4edff;
}

/* Primary (Accept all) — accent fill, dark text, matches site CTAs */
.bw-cc-btn-primary {
  background: #00d4b0;
  color: #070914;
  border-color: #00d4b0;
}

.bw-cc-btn-primary:hover {
  background: #00ffda;
  border-color: #00ffda;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(0, 212, 176, 0.6);
}

/* Tertiary link-style — "Customise" / "Cookie settings" routed to /cookies */
.bw-cc-link {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  margin-right: auto;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(228, 237, 255, 0.55);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}
.bw-cc-link:hover,
.bw-cc-link:focus-visible {
  color: #e4edff;
}

@media (min-width: 720px) {
  #bw-cookie-banner {
    max-width: 640px;
  }
  .bw-cc-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 22px 18px;
  }
  .bw-cc-body {
    flex: 1 1 auto;
    min-width: 0;
  }
  .bw-cc-actions {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 168px;
  }
  .bw-cc-actions .bw-cc-link {
    margin-right: 0;
    text-align: left;
    padding-left: 2px;
  }
}

@media (max-width: 480px) {
  #bw-cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    font-size: 12.5px;
  }
  .bw-cc-inner {
    padding: 14px 16px 12px;
    gap: 12px;
  }
  .bw-cc-actions {
    flex-wrap: wrap;
  }
  .bw-cc-actions .bw-cc-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 10px 14px;
  }
  .bw-cc-actions .bw-cc-link {
    flex: 1 0 100%;
    text-align: left;
    margin-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #bw-cookie-banner,
  #bw-cookie-banner.bw-cc-out {
    animation: none;
  }
  .bw-cc-eyebrow::before {
    animation: none;
  }
}
