.foav-v3-frontend,
.foav-v3-frontend-stage {
  position: relative;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.foav-v3-preview-hero {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  background-color: #111827;
}

.foav-v3-preview-hero.is-width-full,
.foav-v3-preview-hero.is-width-viewport {
  width: var(--foav-v3-viewport-width, 100vw) !important;
  max-width: var(--foav-v3-viewport-width, 100vw) !important;
  margin-left: calc(50% - (var(--foav-v3-viewport-width, 100vw) / 2)) !important;
  margin-right: calc(50% - (var(--foav-v3-viewport-width, 100vw) / 2)) !important;
}

.foav-v3-preview-content {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

/* Permanent composition contract: the surface may be fluid; layer percentages may not. */
.foav-v3-safe-design-area {
  width: min(100%, var(--foav-v3-safe-design-width, 100%)) !important;
  max-width: var(--foav-v3-safe-design-width, 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  flex: 0 1 auto;
}

.foav-v3-layer-space {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.foav-v3-preview-overlay,
.foav-v3-preview-layer-stage {
  position: absolute;
  inset: 0;
}

.foav-v3-preview-overlay {
  pointer-events: none;
}

.foav-v3-preview-layer-stage {
  z-index: 2;
}

.foav-v3-preview-layer {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow: hidden;
  cursor: default;
  outline: 0 !important;
  box-shadow: none;
  margin: 0;
  text-decoration: none;
}

.foav-v3-preview-layer[hidden] {
  display: none;
}

.foav-v3-preview-layer.foav-v3-layer-image img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.foav-v3-preview-layer.foav-v3-layer-button {
  justify-content: center;
  cursor: pointer;
}

.foav-v3-preview-empty {
  color: #64748b;
  margin: 40px auto;
}

.foav-v3-preview-resize-handle,
.foav-v3-resize-handle {
  display: none !important;
}

.foav-v3-slide-navigation {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  --foav-arrow-size: 44px;
  --foav-arrow-icon-color: #fff;
  --foav-arrow-bg-color: #111827;
  --foav-arrow-bg-opacity: .35;
  --foav-arrow-edge: 24px;
  --foav-arrow-vertical: 50%;
  --foav-dot-size: 8px;
  --foav-dot-active: #fff;
  --foav-dot-inactive: #fff;
  --foav-dot-bottom: 18px;
}

.foav-v3-slide-navigation button {
  pointer-events: auto;
  cursor: pointer;
}

.foav-v3-slide-arrow {
  position: absolute;
  top: clamp(calc(var(--foav-arrow-size) / 2), var(--foav-arrow-vertical), calc(100% - (var(--foav-arrow-size) / 2)));
  width: var(--foav-arrow-size);
  height: var(--foav-arrow-size);
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--foav-arrow-icon-color);
  line-height: 1;
  isolation: isolate;
  opacity: 1;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.foav-v3-slide-arrow::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: var(--foav-arrow-bg-color);
  opacity: var(--foav-arrow-bg-opacity);
  content: "";
}

.foav-v3-slide-arrow-icon { width: 52%; height: 52%; }
.foav-v3-slide-arrow.is-previous { left: clamp(0px, var(--foav-arrow-edge), calc(50% - (var(--foav-arrow-size) / 2))); }
.foav-v3-slide-arrow.is-next { right: clamp(0px, var(--foav-arrow-edge), calc(50% - (var(--foav-arrow-size) / 2))); }
.foav-v3-slide-arrow:hover { transform: translateY(-50%) scale(1.05); }
.foav-v3-slide-arrow:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; box-shadow: 0 0 0 2px rgba(15,23,42,.75); }
.foav-v3-slide-arrow:disabled { cursor: default; }

.foav-v3-slide-navigation.is-arrow-style-minimal .foav-v3-slide-arrow { filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); }
.foav-v3-slide-navigation.is-arrow-style-minimal .foav-v3-slide-arrow::before { opacity: 0; }
.foav-v3-slide-navigation.is-arrow-style-glass .foav-v3-slide-arrow { border-color: rgba(255,255,255,.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 20px rgba(0,0,0,.16); }
.foav-v3-slide-navigation.is-arrow-style-outline .foav-v3-slide-arrow { border-color: var(--foav-arrow-bg-color); }
.foav-v3-slide-navigation.is-arrow-style-outline .foav-v3-slide-arrow::before { opacity: 0; }

.foav-v3-slide-navigation.is-hover-only .foav-v3-slide-arrow { opacity: 0; }
.foav-v3-hero-surface:hover > .foav-v3-slide-navigation.is-hover-only .foav-v3-slide-arrow,
.foav-v3-hero-surface:focus-within > .foav-v3-slide-navigation.is-hover-only .foav-v3-slide-arrow,
.foav-v3-artboard:hover > .foav-v3-slide-navigation.is-hover-only .foav-v3-slide-arrow,
.foav-v3-artboard:focus-within > .foav-v3-slide-navigation.is-hover-only .foav-v3-slide-arrow,
.foav-v3-slide-navigation.is-hover-only .foav-v3-slide-arrow:focus-visible { opacity: 1; }

.foav-v3-slide-dots {
  position: absolute;
  right: 0;
  bottom: clamp(0px, var(--foav-dot-bottom), calc(100% - 32px));
  left: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.foav-v3-slide-dots button {
  position: relative;
  width: max(32px, calc(var(--foav-dot-size) + 16px));
  height: max(32px, calc(var(--foav-dot-size) + 16px));
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.foav-v3-slide-dots button::before { position:absolute; top:50%; left:50%; width:var(--foav-dot-size); height:var(--foav-dot-size); border-radius:50%; background:var(--foav-dot-inactive); opacity:.45; content:""; transform:translate(-50%,-50%); transition:transform .2s ease,opacity .2s ease,background-color .2s ease; }
.foav-v3-slide-dots button:hover::before { opacity:.75; transform:translate(-50%,-50%) scale(1.15); }
.foav-v3-slide-dots button.is-active::before { background:var(--foav-dot-active); opacity:1; transform:translate(-50%,-50%) scale(1.12); }
.foav-v3-slide-dots button:focus-visible { outline:2px solid #60a5fa; outline-offset:0; }

@media(max-width:640px){
  .foav-v3-slide-navigation.is-arrow-size-small { --foav-arrow-size: 44px !important; }
  .foav-v3-slide-arrow.is-previous{left:clamp(8px,var(--foav-arrow-edge),calc(50% - (var(--foav-arrow-size) / 2)))}
  .foav-v3-slide-arrow.is-next{right:clamp(8px,var(--foav-arrow-edge),calc(50% - (var(--foav-arrow-size) / 2)))}
}

@media(hover:none){.foav-v3-slide-navigation.is-hover-only .foav-v3-slide-arrow{opacity:1}}
