/* Canonical APEXclusive shared UI.
 * Benchmark: .apexclusive-homepage-publish/index.html floating components.
 * Tool-specific pages may change context, never the shared presentation.
 */
:root {
  --apex-ui-ink: #080808;
  --apex-ui-silver: #c6cbd1;
  --apex-ui-green: #128c4a;
  --apex-ui-text: #e8e8e8;
}

.apex-ui-whatsapp,
.whatsapp-float,
.apex-whatsapp {
  position: fixed !important;
  left: max(1.2rem, env(safe-area-inset-left, 1.2rem)) !important;
  right: auto !important;
  bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem)) !important;
  z-index: 9998 !important;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  background: var(--apex-ui-green) !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  border-radius: 50% !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.32), 0 0 0 5px rgba(18,140,74,.12) !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-decoration: none !important;
  transition: transform .3s, box-shadow .3s, background .3s !important;
}
.apex-ui-whatsapp:hover,
.apex-ui-whatsapp:focus-visible,
.whatsapp-float:hover,
.whatsapp-float:focus-visible,
.apex-whatsapp:hover,
.apex-whatsapp:focus-visible {
  background: #18a957 !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 14px 38px rgba(0,0,0,.38), 0 0 0 7px rgba(18,140,74,.16) !important;
}
.apex-ui-whatsapp svg,
.whatsapp-float svg,
.apex-whatsapp svg {
  width: 25px !important;
  height: 25px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.apex-ui-chat-trigger,
.apex-bubble {
  position: fixed !important;
  right: max(1.5rem, env(safe-area-inset-right, 1.5rem)) !important;
  left: auto !important;
  bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem)) !important;
  z-index: 9998 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: .55rem !important;
  min-height: 44px !important;
  padding: .72rem 1.2rem .72rem .95rem !important;
  color: var(--apex-ui-ink) !important;
  background: rgba(248,248,248,.94) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.28) !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: .7rem !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: transform .3s, box-shadow .3s !important;
}
.apex-ui-chat-trigger:hover,
.apex-ui-chat-trigger:focus-visible,
.apex-bubble:hover,
.apex-bubble:focus-visible {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 42px rgba(0,0,0,.32) !important;
}
.apex-ui-chat-dot,
.apex-bubble-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #009246;
  animation: apex-ui-pulse 2s ease-in-out infinite;
}
@keyframes apex-ui-pulse { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .5; transform: scale(1.3) } }

.apex-ui-chat-window,
.apex-chat-win {
  position: fixed !important;
  right: max(1.5rem, env(safe-area-inset-right, 1.5rem)) !important;
  left: auto !important;
  bottom: calc(max(1.5rem, env(safe-area-inset-bottom, 1.5rem)) + 4.8rem) !important;
  z-index: 9999 !important;
  width: min(360px, calc(100vw - 2rem)) !important;
  max-height: min(680px, calc(100dvh - 104px)) !important;
  display: none !important;
  flex-direction: column !important;
  overflow: hidden !important;
  color: var(--apex-ui-text) !important;
  background: rgba(12,12,12,.98) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 20px !important;
  box-shadow: 0 32px 80px rgba(0,0,0,.55) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  backdrop-filter: blur(28px) !important;
}
.apex-ui-chat-window.is-open,
.apex-ui-chat-window.open,
.apex-chat-win.open {
  display: flex !important;
  animation: apex-ui-chat-in .28s cubic-bezier(.2,.7,.3,1);
}
.apex-ui-chat-window[hidden],
.apex-chat-win[hidden] { display: none !important; }
@keyframes apex-ui-chat-in { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
.apex-ui-chat-header {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.1rem .85rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
}
.apex-ui-chat-header::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg,#009246,#c6cbd1,#ce2b37);
}
.apex-ui-chat-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  color: var(--apex-ui-ink);
  background: linear-gradient(135deg,#c6cbd1,#e8ecf0);
  border-radius: 50%;
  font: 600 1.15rem 'Cormorant Garamond', serif;
}
.apex-ui-chat-meta { display: flex; flex-direction: column; gap: .18rem; }
.apex-ui-chat-name { color: #e8e8e8; font: .68rem 'Oswald', sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.apex-ui-chat-sub { color: rgba(198,203,209,.55); font: italic .82rem 'Cormorant Garamond', serif; }
.apex-ui-chat-close {
  width: 44px;
  height: 44px;
  margin-left: auto;
  color: rgba(198,203,209,.6);
  background: transparent;
  border: 1px solid rgba(198,203,209,.14);
  border-radius: 8px;
  cursor: pointer;
}
.apex-ui-chat-body { min-height: 140px; padding: .85rem 1rem; overflow-y: auto; }
.apex-ui-chat-message { max-width: 88%; margin-bottom: .65rem; padding: .6rem .85rem; line-height: 1.65; font-size: .84rem; }
.apex-ui-chat-message.bot { border-left: 2px solid rgba(198,203,209,.38); background: rgba(255,255,255,.04); }
.apex-ui-chat-message.user { margin-left: auto; background: rgba(198,203,209,.08); }
.apex-ui-chat-actions { display: flex; flex-wrap: wrap; gap: .35rem; padding: .5rem 1rem; border-top: 1px solid rgba(255,255,255,.05); }
.apex-ui-chat-actions a { color: rgba(198,203,209,.8); border: 1px solid rgba(198,203,209,.2); border-radius: 999px; padding: .4rem .75rem; font: .52rem 'Oswald', sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.apex-ui-chat-form { display: flex; gap: .5rem; padding: .7rem 1rem; border-top: 1px solid rgba(255,255,255,.06); }
.apex-ui-chat-input { min-width: 0; flex: 1; padding: .72rem 1rem; color: #e8e8e8; background: rgba(255,255,255,.06); border: 1px solid rgba(198,203,209,.12); border-radius: 999px; }
.apex-ui-chat-send { width: 44px; height: 44px; flex: 0 0 44px; color: var(--apex-ui-silver); background: rgba(198,203,209,.1); border: 1px solid rgba(198,203,209,.16); border-radius: 50%; cursor: pointer; }

@media (max-width: 480px) {
  .apex-ui-whatsapp, .whatsapp-float, .apex-whatsapp { left: max(1.2rem, env(safe-area-inset-left, 1.2rem)) !important; bottom: max(1.2rem, env(safe-area-inset-bottom, 1.2rem)) !important; width: 48px !important; height: 48px !important; min-width: 48px !important; min-height: 48px !important; }
  .apex-ui-chat-trigger, .apex-bubble { right: max(1.2rem, env(safe-area-inset-right, 1.2rem)) !important; bottom: max(1.2rem, env(safe-area-inset-bottom, 1.2rem)) !important; }
  .apex-ui-chat-window, .apex-chat-win { right: 12px !important; left: 12px !important; bottom: calc(max(1.2rem, env(safe-area-inset-bottom, 1.2rem)) + 4.5rem) !important; width: auto !important; max-width: none !important; max-height: calc(100dvh - 92px) !important; border-radius: 20px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .apex-ui-chat-window, .apex-chat-win, .apex-ui-chat-dot, .apex-bubble-dot { animation: none !important; transition: none !important; }
}
