/* Custom styles layered on top of Tailwind (CDN/play build, so no @apply
   here — Tailwind's browser runtime only scans class names in the DOM). */

html {
  scroll-behavior: smooth;
}

/* --- Tabs -------------------------------------------------------------- */

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b; /* slate-500 */
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-btn:hover {
  color: #334155; /* slate-700 */
}

.tab-btn.is-active {
  color: #4f46e5; /* brand-600 */
  border-bottom-color: #4f46e5;
}

.tab-panel {
  animation: fadeIn 0.3s ease both;
}

/* --- Buttons ------------------------------------------------------------ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: none;
  background: #4f46e5; /* brand-600 */
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  box-shadow: 0 4px 14px -4px rgba(79, 70, 229, 0.4);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  background: #4338ca; /* brand-700 */
  box-shadow: 0 6px 18px -4px rgba(79, 70, 229, 0.45);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* --- Spinner ------------------------------------------------------------ */

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid #e0e7ff; /* brand-100 */
  border-top-color: #4f46e5; /* brand-600 */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* --- Fade-in transitions -------------------------------------------------- */

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

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

/* --- Job cards ------------------------------------------------------------ */

.job-card {
  border: 1px solid #e2e8f0; /* slate-200 */
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  animation: fadeIn 0.35s ease both;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.job-card:hover {
  box-shadow: 0 14px 28px -14px rgba(79, 70, 229, 0.3);
  border-color: #c7d2fe; /* brand-200 */
  transform: translateY(-2px);
}

.job-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  background: #eef2ff; /* brand-50 */
  color: #4338ca; /* brand-700 */
}

/* --- JSON preview --------------------------------------------------------- */

#json-output {
  max-height: 28rem;
}

#json-output::-webkit-scrollbar,
#json-panel *::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

#json-output::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
}

/* --- Copy button flash feedback -------------------------------------------- */

.copy-flash {
  background: #16a34a !important; /* green-600 */
}

/* --- API status dot -------------------------------------------------------- */

#api-status-dot.ok {
  background: #22c55e; /* green-500 */
}

#api-status-dot.error {
  background: #ef4444; /* red-500 */
}

#api-status-dot.checking {
  background: #f59e0b; /* amber-500 */
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
