/* 
 * CALCULADORA ROI - GALIA DIGITAL
 * Estilos personalizados adicionales
 */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.6s ease-out;
}

/* Loading state */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid #f3f4f6;
  border-top-color: #7C3AED;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .big-number {
    font-size: 2.5rem !important;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }
}

/* Print styles for PDF */
@media print {
  .btn-primary,
  .btn-secondary,
  #formularioGuardar,
  footer {
    display: none !important;
  }
  
  .card {
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #E5E7EB;
  }
}

/* Accessibility improvements */
.slider:focus {
  outline: 2px solid #663399;
  outline-offset: 2px;
}

button:focus {
  outline: 2px solid #663399;
  outline-offset: 2px;
}

input:focus {
  outline: none;
  border-color: #663399 !important;
  box-shadow: 0 0 0 3px rgba(102, 51, 153, 0.1);
}

/* Tooltip improvements */
.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* Chart containers */
canvas {
  max-height: 300px !important;
}

/* Success message animation */
#mensajeExito {
  animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Highlight effects */
.highlight {
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: rgba(102, 51, 153, 0.2);
  z-index: -1;
}

/* Number counter animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.resultado-visible .big-number {
  animation: countUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, #663399, #079682);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card hover effects */
.card:hover {
  transform: translateY(-2px);
  transition: transform 0.3s ease;
}

/* Improved form styling */
input[type="email"],
input[type="text"],
input[type="tel"] {
  transition: all 0.3s ease;
}

input[type="email"]:hover,
input[type="text"]:hover,
input[type="tel"]:hover {
  border-color: #9CA3AF;
}

/* Loading dots animation */
.loading-dots::after {
  content: '.';
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
  0%, 20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%, 100% {
    content: '...';
  }
}
