/* CodexAgent Custom Styles */

/* Loading animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.spinning {
  animation: spin 1s linear infinite;
}

/* Custom components */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.btn-primary {
  @apply bg-blue-600 text-white px-6 py-3 rounded-lg font-semibold hover:bg-blue-700 transition-colors duration-200;
}

.btn-success {
  @apply bg-green-600 text-white px-6 py-3 rounded-lg font-semibold hover:bg-green-700 transition-colors duration-200;
}

.btn-danger {
  @apply bg-red-600 text-white px-6 py-3 rounded-lg font-semibold hover:bg-red-700 transition-colors duration-200;
}

.btn-warning {
  @apply bg-yellow-600 text-white px-6 py-3 rounded-lg font-semibold hover:bg-yellow-700 transition-colors duration-200;
}

/* Status indicators */
.status-running {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800;
}

.status-completed {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800;
}

.status-failed {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800;
}

.status-pending {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800;
}

/* Form styles */
.form-input {
  @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500;
}

.form-textarea {
  @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 resize-vertical;
}

.form-select {
  @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 bg-white;
}

/* Console/log output styles */
.console-output {
  @apply bg-gray-900 text-green-400 p-4 rounded-lg font-mono text-sm overflow-x-auto;
  white-space: pre-wrap;
}

.log-entry {
  @apply mb-2 p-2 rounded border-l-4;
}

.log-info {
  @apply border-blue-400 bg-blue-50;
}

.log-success {
  @apply border-green-400 bg-green-50;
}

.log-error {
  @apply border-red-400 bg-red-50;
}

.log-warning {
  @apply border-yellow-400 bg-yellow-50;
}

/* Dashboard grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Agent status indicator */
.agent-online {
  @apply inline-block w-3 h-3 bg-green-400 rounded-full animate-pulse;
}

.agent-offline {
  @apply inline-block w-3 h-3 bg-red-400 rounded-full;
}

.agent-busy {
  @apply inline-block w-3 h-3 bg-yellow-400 rounded-full animate-pulse;
}

/* Chat interface styles */
.loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.loading-dots .dot {
  width: 6px;
  height: 6px;
  background-color: #9CA3AF;
  border-radius: 50%;
  animation: dot-pulse 1.4s ease-in-out infinite both;
}

.loading-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dots .dot:nth-child(3) { animation-delay: 0; }

@keyframes dot-pulse {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Chat message styles */
.chat-container {
  scrollbar-width: thin;
  scrollbar-color: #CBD5E0 #F7FAFC;
}

.chat-container::-webkit-scrollbar {
  width: 6px;
}

.chat-container::-webkit-scrollbar-track {
  background: #F7FAFC;
  border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb {
  background: #CBD5E0;
  border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
  background: #A0AEC0;
}