/*
 * Shadow DOM CSS overrides for Squeeze Webflow code components.
 *
 * Tailwind v4 generates styles via adoptedStyleSheets, but certain utilities
 * (borders, shadows, transforms, transitions, hover/focus states, backdrop
 * filters) don't reliably resolve inside Shadow DOM. This file explicitly
 * declares only the utilities our subscription components actually use.
 *
 * Keep this file minimal — only add classes that are confirmed broken.
 */

/* ── Borders ───────────────────────────────────────────────────────────── */

.border {
  border-style: solid;
  border-width: 1px;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-2xl {
  border-radius: 1rem;
}

.border-squeeze-off-white {
  border-color: var(--color-squeeze-off-white, #fafaf3);
}

.border-squeeze-brown {
  border-color: var(--color-squeeze-brown, #552d0b);
}

/* ── Shadows ───────────────────────────────────────────────────────────── */

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.shadow-\[0_0_5px_rgba\(250\,250\,243\,0\.75\)\] {
  box-shadow: 0 0 5px rgba(250, 250, 243, 0.75);
}

/* ── Transitions ───────────────────────────────────────────────────────── */

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-\[grid-template-rows\] {
  transition-property: grid-template-rows;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-200 {
  transition-duration: 200ms;
}

.duration-300 {
  transition-duration: 300ms;
}

.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Transforms ────────────────────────────────────────────────────────── */

.rotate-180 {
  transform: rotate(180deg);
}

.scale-95 {
  transform: scale(0.95);
}

.scale-100 {
  transform: scale(1);
}

/* ── Opacity ───────────────────────────────────────────────────────────── */

.opacity-0 {
  opacity: 0;
}

.opacity-100 {
  opacity: 1;
}

/* ── Backdrop filter ───────────────────────────────────────────────────── */

.backdrop-blur-sm {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.backdrop-blur-md {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.backdrop-blur-xl {
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

/* ── Animation (spinner for video loading) ────────────────────────────── */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ── Border width variants ────────────────────────────────────────────── */

.border-3 {
  border-style: solid;
  border-width: 3px;
}

.border-t-squeeze-off-white {
  border-top-color: var(--color-squeeze-off-white, #fafaf3);
}

.border-squeeze-off-white\/30 {
  border-color: color-mix(in srgb, var(--color-squeeze-off-white, #fafaf3) 30%, transparent);
}

.border-squeeze-off-white\/40 {
  border-color: color-mix(in srgb, var(--color-squeeze-off-white, #fafaf3) 40%, transparent);
}

/* ── Fixed positioning (modal portal) ─────────────────────────────────── */

.fixed {
  position: fixed;
}

.z-50 {
  z-index: 50;
}

.inset-0 {
  inset: 0;
}

/* ── Hover states ──────────────────────────────────────────────────────── */

.hover\:opacity-90:hover {
  opacity: 0.9;
}

.hover\:bg-squeeze-off-white\/80:hover {
  background-color: color-mix(in srgb, var(--color-squeeze-off-white, #fafaf3) 80%, transparent);
}

.hover\:decoration-squeeze-brown:hover {
  text-decoration-color: var(--color-squeeze-brown, #552d0b);
}

/* ── Group hover (benefit card plus icon) ─────────────────────────────── */

.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

/* ── Grid rows (FAQ accordion) ─────────────────────────────────────────── */

.grid-rows-\[0fr\] {
  grid-template-rows: 0fr;
}

.grid-rows-\[1fr\] {
  grid-template-rows: 1fr;
}

/* ── Glass shimmer (rotating border glow on hover) ────────────────────
 *
 * NOTE: @property --shimmer-angle CANNOT be declared here.
 * Shadow DOM ignores @property — it must be registered at the document
 * level. See src/hooks/useShimmerProperty.ts which handles this.
 * ──────────────────────────────────────────────────────────────────────── */

.glass-shimmer {
  position: relative;
}

.glass-shimmer::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--shimmer-radius, 9999px);
  background: conic-gradient(
    from var(--shimmer-angle),
    transparent 0%,
    transparent 15%,
    rgba(105, 181, 145, 0.3) 30%,
    rgba(105, 181, 145, 0.3) 30%,
    transparent 45%,
    transparent 65%,
    rgba(105, 181, 145, 0.3) 80%,
    rgba(105, 181, 145, 0.3) 80%,
    transparent 95%,
    transparent 100%
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 1px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.glass-shimmer:hover::before {
  opacity: 1;
  animation: shimmer-spin 2s linear infinite;
}

.glass-shimmer-slow:hover::before {
  animation-duration: 4s;
}

.glass-shimmer-long:hover::before {
  animation-duration: 6s;
  background: conic-gradient(
    from var(--shimmer-angle),
    transparent 0%,
    transparent 10%,
    rgba(105, 181, 145, 0.3) 20%,
    rgba(105, 181, 145, 0.4) 25%,
    rgba(105, 181, 145, 0.3) 30%,
    transparent 40%,
    transparent 60%,
    rgba(105, 181, 145, 0.3) 70%,
    rgba(105, 181, 145, 0.4) 75%,
    rgba(105, 181, 145, 0.3) 80%,
    transparent 90%,
    transparent 100%
  );
}

@keyframes shimmer-spin {
  to { --shimmer-angle: 360deg; }
}

