/**
 * EDS Marketing Button — Styles
 * eDesign Space · https://edesignspace.com/
 */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
/* emb-outer fills the widget and uses justify-content for alignment */
.emb-outer {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center; /* default; overridden by Elementor selector */
}

.emb-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.emb-btn-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

/* ── Core Button ──────────────────────────────────────────────────────────── */
.emb-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  overflow: hidden;
  transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
}

.emb-btn:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* ── Sizes ────────────────────────────────────────────────────────────────── */
.emb-btn.emb-size--sm { padding: 10px 20px; font-size: 0.875rem; border-radius: 6px; }
.emb-btn.emb-size--md { padding: 14px 32px; font-size: 1rem;     border-radius: 8px; }
.emb-btn.emb-size--lg { padding: 18px 42px; font-size: 1.125rem; border-radius: 10px; }
.emb-btn.emb-size--xl { padding: 22px 56px; font-size: 1.25rem;  border-radius: 12px; }

/* Button style set via Elementor style controls */

/* ── Double-line Text ─────────────────────────────────────────────────────── */
.emb-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  white-space: normal;
  text-align: center;
}

.emb-primary {
  display: block;
  font-weight: 700;
  line-height: 1.2;
}

.emb-secondary {
  display: block;
  font-size: 0.78em;
  font-weight: 400;
  opacity: 0.8;
  line-height: 1.2;
}

/* ── Icons ────────────────────────────────────────────────────────────────── */
.emb-icon-before,
.emb-icon-after {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Badge ────────────────────────────────────────────────────────────────── */
.emb-badge {
  position: absolute;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #ef4444;
  color: #fff;
  padding: 3px 8px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
}

.emb-badge--top-right  { top: -12px; right: 10px; transform: translateY(0); }
.emb-badge--top-left   { top: -12px; left: 10px; }
.emb-badge--top-center { top: -12px; left: 50%; transform: translateX(-50%); }

/* ════════════════════════════════════════════════════════════════════════════
   POINTER ARROW
════════════════════════════════════════════════════════════════════════════ */
.emb-arrow {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #f97316;
  pointer-events: none;
  flex-shrink: 0;
}

.emb-arrow svg {
  width: 50px;
  height: auto;
  overflow: visible;
  stroke: currentColor;
  fill: none;
}

.emb-arrow-text {
  font-size: 0.85rem;
  font-weight: 500;
  font-style: italic;
  white-space: nowrap;
}

/* Left: text then arrow pointing right (flip is applied inline) */
.emb-arrow--left  { flex-direction: row-reverse; }
/* Right: arrow then text */
.emb-arrow--right { flex-direction: row; }
/* Top: column, centered */
.emb-arrow--top   { flex-direction: column; align-items: center; }
.emb-arrow--top svg { transform: rotate(90deg); }

/* Animation */
@keyframes emb-arrow-bounce-lr {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(6px); }
}
@keyframes emb-arrow-bounce-top {
  0%, 100% { transform: rotate(90deg) translateX(0); }
  50%       { transform: rotate(90deg) translateX(6px); }
}

.emb-arrow--animated.emb-arrow--right svg,
.emb-arrow--animated.emb-arrow--left  svg {
  animation: emb-arrow-bounce-lr 1s ease-in-out infinite;
}
.emb-arrow--animated.emb-arrow--top svg {
  animation: emb-arrow-bounce-top 1s ease-in-out infinite;
}

/* ════════════════════════════════════════════════════════════════════════════
   MARKETING EFFECTS
════════════════════════════════════════════════════════════════════════════ */

/* ── Flash ────────────────────────────────────────────────────────────────── */
@keyframes emb-flash {
  0%, 100%  { opacity: 1; }
  50%        { opacity: 0.55; }
}
.emb-btn.emb-fx--flash {
  animation: emb-flash 1.8s ease-in-out infinite;
}

/* ── Bounce ───────────────────────────────────────────────────────────────── */
@keyframes emb-bounce {
  0%, 100% { transform: translateY(0); }
  40%       { transform: translateY(-8px); }
  60%       { transform: translateY(-4px); }
}
.emb-btn.emb-fx--bounce {
  animation: emb-bounce 1.6s ease-in-out infinite;
}

/* ── Glow ─────────────────────────────────────────────────────────────────── */
@keyframes emb-glow {
  0%, 100% { box-shadow: 0 0 0px 0px rgba(99,102,241,0); }
  50%       { box-shadow: 0 0 22px 8px rgba(99,102,241,0.55); }
}
.emb-btn.emb-fx--glow {
  animation: emb-glow 2s ease-in-out infinite;
}

/* ── Pulse ring ───────────────────────────────────────────────────────────── */
.emb-pulse-ring {
  position: absolute;
  inset: 0;
  border: 3px solid currentColor;
  border-radius: inherit;
  pointer-events: none;
  animation: emb-pulse-ring 2s ease-out infinite;
}
.emb-pulse-ring--delay { animation-delay: 0.8s; }

@keyframes emb-pulse-ring {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* ── Shimmer sweep ────────────────────────────────────────────────────────── */
.emb-shimmer {
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.4) 50%,
    rgba(255,255,255,0) 100%
  );
  pointer-events: none;
  animation: emb-shimmer-sweep 2.2s ease-in-out infinite;
}
@keyframes emb-shimmer-sweep {
  0%   { left: -75%; }
  100% { left: 150%; }
}

/* ── Shake on hover ───────────────────────────────────────────────────────── */
@keyframes emb-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-5px); }
  40%       { transform: translateX(5px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.emb-btn.emb-fx--shake:hover {
  animation: emb-shake 0.5s ease;
}

/* ── Scale on hover ───────────────────────────────────────────────────────── */
.emb-btn.emb-fx--scale:hover {
  transform: scale(1.05);
}

/* ── Lift shadow on hover ─────────────────────────────────────────────────── */
.emb-btn.emb-fx--lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

/* ── Colour sweep on hover ────────────────────────────────────────────────── */
.emb-btn.emb-fx--sweep {
  z-index: 0;
}
.emb-btn.emb-fx--sweep::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-100%);
  transition: transform 0.35s ease;
  z-index: -1;
  border-radius: inherit;
}
.emb-btn.emb-fx--sweep:hover::after {
  transform: translateX(0);
}

/* ── Hover base resets ────────────────────────────────────────────────────── */
.emb-btn:hover { text-decoration: none; }
