/* CPA Keeper - Custom Styles */

@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.animate-pulse-dot { animation: pulse-dot 1.5s infinite; }

/* Table row hover */
tbody tr:hover { background-color: rgba(55, 65, 81, 0.5); cursor: pointer; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1f2937; }
::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6b7280; }

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
}

.toast-item {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: white;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
  animation: toast-in 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast-success { background-color: #065f46; border: 1px solid #047857; }
.toast-error { background-color: #7f1d1d; border: 1px solid #991b1b; }
.toast-info { background-color: #1e3a5f; border: 1px solid #1e40af; }

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

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

.toast-exit {
  animation: toast-out 0.2s ease-in forwards;
}

/* Progress bar */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: #374151;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-alive { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-dead { background-color: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-disabled { background-color: rgba(234, 179, 8, 0.15); color: #fbbf24; }
.badge-unknown { background-color: rgba(156, 163, 175, 0.15); color: #9ca3af; }

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-panel {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.75rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
  animation: slide-up 0.2s ease-out;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SSE connection indicator */
.sse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.sse-connected { background-color: #34d399; }
.sse-disconnected { background-color: #ef4444; }

/* Sidebar active indicator */
.nav-active {
  position: relative;
}
.nav-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #3b82f6;
  border-radius: 0 2px 2px 0;
}

/* Token row clickable */
.token-row {
  transition: background-color 0.15s;
}
.token-row:hover {
  background-color: rgba(55, 65, 81, 0.7) !important;
}

/* Hide Alpine cloak */
[x-cloak] { display: none !important; }
