/* Import shared component styles */
@import url('../ui-wrappers/shared/styles.css');

/* Import UI wrapper styles */
@import url('../ui-wrappers/v1/styles.css');
@import url('../ui-wrappers/v3/styles.css');
@import url('../ui-wrappers/hybrid/styles.css');

.v3-widget .aizee-watermark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--theme-primary-color, #2C0855);
  color: #ffffff; /* fallback; overridden by JS contrast algo */
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
  pointer-events: auto;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  z-index: 30;
  opacity: 0.98;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.voice-widget-float .aizee-watermark,
.widget-float .aizee-watermark {
  position: absolute;
  right: 0;
  bottom: -26px;
  transform: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--theme-primary-color, #2C0855);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
  pointer-events: auto;
  z-index: 30;
  opacity: 0.98;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

/* Centered watermark for Hybrid pill */
.hybrid-widget-pill .aizee-watermark {
  position: absolute;
  left: 50%;
  bottom: -24px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--theme-primary-color, #2C0855);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: auto;
  z-index: 30;
  opacity: 0.98;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
  white-space: nowrap; /* prevent text wrapping/cutting */
}

/* On floating placement, avoid viewport cut-off by anchoring to the right edge */
.voice-widget-float .hybrid-widget-pill .aizee-watermark,
.widget-float .hybrid-widget-pill .aizee-watermark {
  left: auto;
  right: 0;
  transform: none;
}

.v3-widget .aizee-watermark::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
  opacity: 0.85;
}

.v3-widget .aizee-watermark span {
  text-transform: uppercase;
  opacity: 0.68;
}

/* Unified link style: inherits text color from badge (set by contrast algo in JS) */
.aizee-watermark a {
  color: inherit !important;
  text-decoration: underline !important;
  font-weight: 600;
}



.launcher-attention-cue {
  position: absolute;
  display: inline-flex;
  width: max-content;
  max-width: min(var(--launcher-attention-cue-width, 172px), calc(100vw - 32px));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 40;
  transition: opacity 220ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1), visibility 220ms step-end;
}

.launcher-attention-cue--hybrid {
  left: 18px;
  bottom: calc(100% + 12px);
  transform: translateY(10px) scale(0.96);
  transform-origin: left bottom;
}

.launcher-attention-cue--hybrid.launcher-attention-cue--launcher-center {
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0.96);
  transform-origin: center bottom;
}

.launcher-attention-cue--v3.launcher-attention-cue--launcher-right {
  right: -6px;
  bottom: calc(100% + 14px);
  transform: translateY(10px) scale(0.96);
  transform-origin: right bottom;
}

.launcher-attention-cue--v3.launcher-attention-cue--launcher-left {
  left: -6px;
  bottom: calc(100% + 14px);
  transform: translateY(10px) scale(0.96);
  transform-origin: left bottom;
}

.launcher-attention-cue.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.launcher-attention-cue--hybrid.launcher-attention-cue--launcher-center.is-visible {
  transform: translateX(-50%) translateY(0) scale(1);
}

.launcher-attention-cue__bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 34px;
  padding: 8px 11px;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 16px;
  background: var(--launcher-attention-bubble-bg, rgba(255, 250, 246, 0.95));
  border: 1px solid var(--launcher-attention-bubble-frame, rgba(115, 76, 56, 0.28));
  box-shadow:
    0 0 0 1px var(--launcher-attention-bubble-frame, rgba(115, 76, 56, 0.28)),
    0 18px 34px var(--launcher-attention-bubble-shadow, rgba(82, 56, 40, 0.14)),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  color: var(--launcher-attention-bubble-text, #684735);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.launcher-attention-cue__bubble::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0));
  opacity: 0.78;
  pointer-events: none;
}

.launcher-attention-cue__bubble::after {
  content: "";
  position: absolute;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: inherit;
  border-right: 1px solid var(--launcher-attention-bubble-frame, rgba(115, 76, 56, 0.28));
  border-bottom: 1px solid var(--launcher-attention-bubble-frame, rgba(115, 76, 56, 0.28));
  transform: rotate(45deg);
  border-bottom-right-radius: 4px;
}

.launcher-attention-cue--hybrid .launcher-attention-cue__bubble::after {
  left: 28px;
}

.launcher-attention-cue--hybrid.launcher-attention-cue--launcher-center .launcher-attention-cue__bubble::after {
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
}

.launcher-attention-cue--v3.launcher-attention-cue--launcher-right .launcher-attention-cue__bubble::after {
  right: 18px;
}

.launcher-attention-cue--v3.launcher-attention-cue--launcher-left .launcher-attention-cue__bubble::after {
  left: 18px;
}

.launcher-attention-cue__label {
  position: relative;
  z-index: 1;
  display: block;
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.launcher-attention-cue--v3 .launcher-attention-cue__bubble {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.hybrid-widget-pill {
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 360ms ease, filter 360ms ease;
  transform-origin: center;
}

.hybrid-widget-pill.launcher-attention-anchor--active {
  transform: scale(1.015);
  box-shadow:
    0 16px 34px var(--launcher-attention-react-shadow, rgba(15, 23, 42, 0.16)),
    0 0 0 8px var(--launcher-attention-react-soft, rgba(255, 255, 255, 0.08));
  filter: saturate(1.03);
}

.v3-widget.launcher-attention-anchor--active .v3-stroke-container {
  transform: scale(1.014);
}

.v3-widget.launcher-attention-anchor--active .v3-inner-container {
  box-shadow:
    0 18px 38px var(--launcher-attention-react-shadow, rgba(15, 23, 42, 0.16)),
    0 0 0 8px var(--launcher-attention-react-soft, rgba(255, 255, 255, 0.08));
}

.launcher-attention-cue.is-active .launcher-attention-cue__bubble {
  animation: launcherAttentionBubbleFloat 1800ms ease-in-out infinite;
}

.launcher-attention-cue.is-active .launcher-attention-cue__bubble::before {
  animation: launcherAttentionBubbleGlow 1800ms ease-in-out infinite;
}

.hybrid-widget-pill.launcher-attention-anchor--active,
.v3-widget.launcher-attention-anchor--active .v3-stroke-container {
  animation: launcherAttentionLauncherPulse 1800ms ease-in-out infinite;
}

.launcher-attention-cue.is-reduced-motion,
.launcher-attention-cue.is-reduced-motion .launcher-attention-cue__bubble,
.launcher-attention-cue.is-reduced-motion .launcher-attention-cue__bubble::before {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .launcher-attention-cue,
  .launcher-attention-cue .launcher-attention-cue__bubble,
  .launcher-attention-cue .launcher-attention-cue__bubble::before,
  .hybrid-widget-pill.launcher-attention-anchor--active,
  .v3-widget.launcher-attention-anchor--active .v3-stroke-container {
    animation: none !important;
  }
}

@keyframes launcherAttentionBubbleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes launcherAttentionBubbleGlow {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 0.95;
  }
}

@keyframes launcherAttentionLauncherPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.014);
  }
  72% {
    transform: scale(1.008);
  }
}

@media (max-width: 767px) {
  .launcher-attention-cue {
    width: max-content;
    max-width: min(var(--launcher-attention-cue-width, 156px), calc(100vw - 24px));
  }

  .launcher-attention-cue--hybrid {
    left: 10px;
    bottom: calc(100% + 10px);
  }

  .launcher-attention-cue--hybrid.launcher-attention-cue--launcher-center {
    left: 50%;
  }

  .launcher-attention-cue--v3.launcher-attention-cue--launcher-right {
    right: -10px;
  }

  .launcher-attention-cue--v3.launcher-attention-cue--launcher-left {
    left: -10px;
  }

  .launcher-attention-cue__bubble {
    min-height: 30px;
    padding: 7px 10px;
    border-radius: 14px;
    font-size: 10px;
  }

  .launcher-attention-cue__bubble::before {
    border-radius: 13px;
  }

  .launcher-attention-cue__bubble::after {
    bottom: -5px;
    width: 10px;
    height: 10px;
  }

  .launcher-attention-cue--hybrid .launcher-attention-cue__bubble::after {
    left: 24px;
  }

  .launcher-attention-cue--hybrid.launcher-attention-cue--launcher-center .launcher-attention-cue__bubble::after {
    left: 50%;
  }
}
