/* Estilos genéricos */
body {
  background-color: #0d2a2d;
  margin: 0;
  padding: 0;
}

.modal-hidden {
  display: none;
}

.modal-visible {
  display: flex;
}

/* Animación de spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Process Tracker Styles */
.step-indicator {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.step-indicator.step-completed {
  background-color: rgb(34, 197, 94); /* green-500 */
  color: white;
}

.step-indicator.step-active {
  background-color: rgb(255, 140, 66); /* primary orange */
  color: white;
}

.step-indicator.step-pending {
  background-color: transparent;
  border: 2px solid rgb(229, 231, 235); /* border */
}

.step-indicator.step-stopped {
  background-color: rgba(107, 114, 128, 0.3); /* gray-500/30 */
  border: 2px solid rgb(156, 163, 175); /* gray-400 */
  color: rgb(156, 163, 175);
}

.step-indicator.step-error {
  background-color: rgba(239, 68, 68, 0.2); /* red-500/20 */
  border: 2px solid rgb(239, 68, 68); /* red-500 */
  color: rgb(239, 68, 68);
}

.step-connector {
  align-self: center;
  margin-top: -24px;
}

.step-connector-completed {
  background-color: rgb(34, 197, 94); /* green-500 */
}

.step-connector-pending {
  background-color: rgb(229, 231, 235); /* border */
}

/* Confirm Toast (modal de confirmación de la aplicación) */
.confirm-toast-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.confirm-toast-overlay.confirm-toast-visible {
  opacity: 1;
  visibility: visible;
}

.confirm-toast-overlay.confirm-toast-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.confirm-toast-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.confirm-toast-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 2px solid rgb(255, 140, 66);
  background-color: #0d2a2d;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: confirm-toast-in 0.2s ease;
}

@keyframes confirm-toast-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.confirm-toast-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #f8fafc;
}

.confirm-toast-message {
  margin: 0 0 1.25rem 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #94a3b8;
}

.confirm-toast-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.confirm-toast-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.confirm-toast-btn-cancel {
  border: 1px solid #475569;
  background-color: transparent;
  color: #94a3b8;
}

.confirm-toast-btn-cancel:hover {
  background-color: rgba(71, 85, 105, 0.3);
  color: #f8fafc;
}

.confirm-toast-btn-confirm {
  border: none;
  background-color: rgb(255, 140, 66);
  color: #0d2a2d;
}

.confirm-toast-btn-confirm:hover {
  background-color: rgb(255, 120, 50);
  opacity: 0.95;
}

/* App Toast (mensajes éxito/error de la aplicación) */
.app-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.app-toast-container * {
  pointer-events: auto;
}

.app-toast-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid;
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-toast-card.app-toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast-card.app-toast-hidden {
  opacity: 0;
  transform: translateY(0.5rem);
}

.app-toast-card-success {
  background-color: #0d2a2d;
  border-color: rgb(34, 197, 94);
  color: #f8fafc;
}

.app-toast-card-success .app-toast-icon {
  color: rgb(34, 197, 94);
  flex-shrink: 0;
}

.app-toast-card-error {
  background-color: #0d2a2d;
  border-color: rgb(239, 68, 68);
  color: #f8fafc;
}

.app-toast-card-error .app-toast-icon {
  color: rgb(239, 68, 68);
  flex-shrink: 0;
}

.app-toast-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}

.app-toast-message {
  flex: 1;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.app-toast-close {
  flex-shrink: 0;
  padding: 0.25rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.app-toast-close:hover {
  color: #f8fafc;
  background-color: rgba(255, 255, 255, 0.08);
}
