/* ============================================================
   Kyros Talent — AI UI Kit
   Animaciones, badges y primitivas para representar la IA
   ============================================================ */

/* ---- Variables ---- */
:root {
  --ai-violet: #7c3aed;
  --ai-fuchsia: #d946ef;
  --ai-cyan: #06b6d4;
  --ai-grad: linear-gradient(135deg, #7c3aed 0%, #d946ef 50%, #06b6d4 100%);
}

/* ---- Gradient text ---- */
.ai-text-grad {
  background: var(--ai-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---- Badge IA con glow ---- */
.ai-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 9999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff;
  background: var(--ai-grad);
  box-shadow: 0 4px 14px -2px rgba(124,58,237,0.45);
  position: relative; overflow: hidden;
}
.ai-badge::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
  transform: translateX(-100%); animation: aiShine 2.6s ease-in-out infinite;
}
@keyframes aiShine { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }

/* ---- Pulso de actividad IA ---- */
.ai-pulse {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
}
.ai-pulse::before, .ai-pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--ai-violet); opacity: 0;
  animation: aiPulseRing 2s ease-out infinite;
}
.ai-pulse::after { animation-delay: 1s; }
@keyframes aiPulseRing {
  0% { transform: scale(0.7); opacity: 0.7; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ---- Botón IA primario ---- */
.ai-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 10px;
  background: var(--ai-grad); color: #fff;
  font-weight: 600; font-size: 12.5px;
  box-shadow: 0 4px 14px -3px rgba(124,58,237,0.45);
  transition: transform .15s, box-shadow .15s, filter .15s;
  position: relative; overflow: hidden;
}
.ai-btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 8px 22px -4px rgba(124,58,237,0.55); }
.ai-btn:active { transform: translateY(0); }
.ai-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.ai-btn::before {
  content:""; position:absolute; inset:0;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,0.25) 50%, transparent 65%);
  transform: translateX(-120%);
}
.ai-btn:hover::before { transform: translateX(120%); transition: transform .9s ease; }

/* ---- Botón IA outline ---- */
.ai-btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 10px;
  background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.25);
  color: #7c3aed; font-weight: 600; font-size: 12.5px;
  transition: all .15s;
}
.ai-btn-outline:hover { background: rgba(124,58,237,0.12); border-color: rgba(124,58,237,0.4); transform: translateY(-1px); }

/* ---- Card con glow IA ---- */
.ai-card {
  position: relative; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(217,70,239,0.04), rgba(6,182,212,0.05));
  border: 1px solid rgba(124,58,237,0.18);
}
.ai-card::before {
  content:""; position:absolute; inset:-1px; border-radius:18px; pointer-events:none;
  background: conic-gradient(from var(--ai-rot, 0deg), transparent 0deg, var(--ai-violet) 60deg, var(--ai-fuchsia) 120deg, var(--ai-cyan) 180deg, transparent 240deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1px; opacity: 0; transition: opacity .3s;
}
.ai-card:hover::before { opacity: 0.6; animation: aiRotate 4s linear infinite; }
@property --ai-rot { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes aiRotate { to { --ai-rot: 360deg; } }

/* ---- Skeleton shimmer IA ---- */
.ai-skeleton {
  background: linear-gradient(90deg,
    rgba(124,58,237,0.06) 0%,
    rgba(217,70,239,0.12) 50%,
    rgba(124,58,237,0.06) 100%);
  background-size: 200% 100%;
  animation: aiShimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes aiShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---- Loader "IA pensando" — orb con partículas ---- */
.ai-thinking {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: #6d28d9; font-weight: 600;
}
.ai-orb {
  width: 28px; height: 28px; border-radius: 50%; position: relative;
  background: var(--ai-grad);
  box-shadow: 0 0 24px -2px rgba(124,58,237,0.55);
  animation: aiOrbPulse 1.8s ease-in-out infinite;
}
.ai-orb::after {
  content:""; position:absolute; inset:-6px; border-radius:50%;
  border: 2px dashed rgba(124,58,237,0.4);
  animation: aiOrbSpin 4s linear infinite;
}
@keyframes aiOrbPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 24px -2px rgba(124,58,237,0.55); }
  50% { transform: scale(1.15); box-shadow: 0 0 36px 0 rgba(217,70,239,0.7); }
}
@keyframes aiOrbSpin { to { transform: rotate(360deg); } }
.ai-thinking .ai-dots { display:inline-flex; gap:3px; }
.ai-thinking .ai-dots span {
  width:5px; height:5px; border-radius:50%; background: var(--ai-violet);
  animation: aiDot 1.2s ease-in-out infinite;
}
.ai-thinking .ai-dots span:nth-child(2){ animation-delay: .2s; }
.ai-thinking .ai-dots span:nth-child(3){ animation-delay: .4s; }
@keyframes aiDot {
  0%,80%,100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1.2); opacity: 1; }
}

/* ---- Mark IA (pequeño tag tras un campo autocompletado) ---- */
.ai-filled {
  position: relative;
}
.ai-filled::after {
  content: "✨ Auto"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  background: var(--ai-grad); color: #fff;
  padding: 2px 7px; border-radius: 6px; pointer-events: none;
  box-shadow: 0 2px 6px rgba(124,58,237,0.35);
}

/* ---- Slide transition base classes ---- */
.kt-slide-enter { transform: translateX(40px); opacity: 0; }
.kt-slide-enter-to { transform: translateX(0); opacity: 1; }
.kt-slide-leave { transform: translateX(0); opacity: 1; }
.kt-slide-leave-to { transform: translateX(-40px); opacity: 0; }
.kt-slide-back-enter { transform: translateX(-40px); opacity: 0; }
.kt-slide-back-leave-to { transform: translateX(40px); opacity: 0; }

/* ---- Stepper ---- */
.kt-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex: 1; min-width: 0; cursor: pointer; transition: all .2s;
}
.kt-step-bullet {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12.5px;
  background: #f1f5f9; color: #94a3b8;
  border: 2px solid transparent;
  transition: all .25s cubic-bezier(.16,1,.3,1);
}
.kt-step.is-active .kt-step-bullet {
  background: var(--ai-grad); color: #fff;
  transform: scale(1.1);
  box-shadow: 0 6px 18px -4px rgba(124,58,237,0.45);
}
.kt-step.is-done .kt-step-bullet {
  background: #10b981; color: #fff;
}
.kt-step-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em;
  color: #94a3b8; text-align: center; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kt-step.is-active .kt-step-label { color: #1e293b; }
.kt-step.is-done .kt-step-label { color: #047857; }

.kt-step-bar {
  position: relative; height: 3px; flex: 1; background: #e2e8f0; border-radius: 999px; overflow: hidden;
  margin: 0 8px; align-self: center; max-width: 80px;
}
.kt-step-bar.is-done { background: #10b981; }
.kt-step-bar.is-active::after {
  content:""; position:absolute; inset:0; background: var(--ai-grad);
  animation: barFill 1.6s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes barFill { from { width: 0; } to { width: 100%; } }

/* ---- Floating AI helper ---- */
.ai-floating {
  position: fixed; bottom: 20px; right: 20px; z-index: 60;
  background: #fff; border-radius: 18px;
  box-shadow: 0 18px 48px -12px rgba(15,23,42,0.20), 0 6px 18px -4px rgba(124,58,237,0.25);
  border: 1px solid rgba(124,58,237,0.18);
  padding: 14px; max-width: 320px;
  animation: aiFloatIn .35s cubic-bezier(.16,1,.3,1) both;
}
@keyframes aiFloatIn {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---- Reduce motion ---- */
@media (prefers-reduced-motion: reduce) {
  .ai-badge::after, .ai-orb, .ai-orb::after, .ai-thinking .ai-dots span,
  .ai-skeleton, .ai-card::before { animation: none !important; }
}
