/* ===================================
   iPonto Web Connect - Estilos Globais
   =================================== */

/* --- IMPORTAÇÕES --- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* --- BASE --- */
body {
  font-family: "Inter", sans-serif;
  background-color: #f8fafc;
}

/* --- HUB ITEM STATES --- */
.hub-item.active .hub-line {
  background-color: #004efd;
}

.hub-item.active .hub-title {
  color: #004efd;
}

/* --- TRANSIÇÕES --- */
.transition-all-300 {
  transition: all 0.3s ease-in-out;
}

/* --- ANIMAÇÃO DE BORDA PULSANTE (BOTÃO EXPLORAR) --- */
@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.btn-pulse {
  animation: pulse-border 2s infinite;
  position: absolute;
}

.btn-pulse::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid #004efd;
  border-radius: 9999px;
  pointer-events: none;
  animation: ring-breathe 2s infinite ease-in-out;
}

@keyframes ring-breathe {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* --- SCROLL REVEAL ANIMATION --- */
.reveal {
  opacity: 0;
  transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

/* Padrão: Sobe */
.reveal:not(.reveal-left):not(.reveal-right):not(.reveal-zoom) {
  transform: translateY(50px);
}

/* Variação: Esquerda */
.reveal.reveal-left {
  transform: translateX(-50px);
}

/* Variação: Direita */
.reveal.reveal-right {
  transform: translateX(50px);
}

/* Variação: Zoom */
.reveal.reveal-zoom {
  transform: scale(0.9);
}

/* Estado Ativo (Reset) */
.reveal.active {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* --- ANIMAÇÃO DE LUZ NAS LINHAS DO HUB --- */
.hub-line-light {
  stroke: #004efd;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 40px 800px;
  stroke-dashoffset: 40px;
  animation: lightFlow 4s ease-in infinite reverse;
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(0, 78, 253, 0.8));
}

@keyframes lightFlow {
  to {
    stroke-dashoffset: -800px;
  }
}

/* --- ANIMAÇÃO DE PULSO SUAVE PARA O HUB CENTRAL --- */
@keyframes pulse-slow {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.95;
  }
}

.animate-pulse-slow {
  animation: pulse-slow 3s ease-in-out infinite;
}

/* --- ANIMAÇÃO DE OSCILAÇÃO (PENDULO) PARA O REP-C --- */
@keyframes orbit-oscillation {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

.animate-orbit-oscillation {
  animation: orbit-oscillation 20s ease-in-out infinite;
}

/* Contra-rotação para manter o ícone em pé */
@keyframes orbit-oscillation-reverse {
  0%,
  100% {
    transform: rotate(5deg);
  }
  50% {
    transform: rotate(-5deg);
  }
}

.animate-orbit-oscillation-reverse {
  animation: orbit-oscillation-reverse 20s ease-in-out infinite;
}

/* --- PULSO AZUL PARA O REP-P --- */
@keyframes pulse-blue-shadow {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 78, 253, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(0, 78, 253, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 78, 253, 0);
  }
}

.rep-p-pulse {
  animation: pulse-blue-shadow 2s infinite;
  position: relative;
}

.rep-p-pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid #004efd;
  border-radius: 9999px;
  pointer-events: none;
  animation: ring-breathe 2s infinite ease-in-out;
}

/* --- CLASSE ÚNICA PARA O CÍRCULO CENTRAL --- */
.hub-central-circle {
  background-color: rgba(255, 255, 255, 0.9);
}

/* --- TOAST NOTIFICATION --- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  min-width: 320px;
  max-width: 420px;
  animation: toastSlideIn 0.3s ease-out;
  backdrop-filter: blur(10px);
}

.toast.toast-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.toast.toast-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.toast.toast-hide {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* --- BUTTON LOADING SPINNER --- */
#submitBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: btnSpin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes btnSpin {
  to {
    transform: rotate(360deg);
  }
}
