/* Filtros Ramirez - Estilos personalizados */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes checkmark {
  0%   { stroke-dashoffset: 100; }
  100% { stroke-dashoffset: 0; }
}

@keyframes pulse-success {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

.fade-in {
  animation: fadeIn 0.5s ease-out both;
}

.card-form {
  animation: fadeIn 0.6s ease-out both;
}

/* Campo con error */
.input-error {
  border-color: #EF4444 !important;
  background-color: #FEF2F2;
}

/* Campo válido */
.input-success {
  border-color: #10B981 !important;
  background-color: #F0FDF4;
}

/* Spinner de carga */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

/* Drop zone de archivos */
.drop-zone {
  transition: all 0.2s ease;
}

.drop-zone.drag-over {
  border-color: #1E40AF;
  background-color: #EFF6FF;
  transform: scale(1.01);
}

/* Preview imagen */
.file-preview {
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Botón primario */
.btn-primary {
  background-color: #1E40AF;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}
.btn-primary:hover:not(:disabled) {
  background-color: #1d3a9e;
  box-shadow: 0 4px 14px rgba(30,64,175,0.35);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}
.btn-primary:disabled {
  background-color: #93C5FD;
  cursor: not-allowed;
}

/* Botón secundario */
.btn-secondary {
  transition: background-color 0.2s;
}
.btn-secondary:hover {
  background-color: #E5E7EB;
}

/* Contador de caracteres */
.char-counter {
  font-size: 0.75rem;
  color: #6B7280;
  text-align: right;
  margin-top: 2px;
}
.char-counter.near-limit { color: #F59E0B; }
.char-counter.at-limit   { color: #EF4444; }

/* Icono de éxito en confirmación */
.success-icon {
  animation: pulse-success 1.5s ease-in-out 3;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .card-form { margin: 1rem; }
}
