@tailwind base;
@tailwind components;
@tailwind utilities;

/* Project custom utilities and base overrides */
:root {
  --color-primary: #1A2B3C;
  --color-action: #8CC63F;
}

/* Small helper to match design tokens */
.brand-title {
  @apply text-primary;
}

.page-container {
  min-height: calc(100vh - 132px);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0; /* light gray */
  border-top-color: var(--color-action); /* green section */
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

/* Upload Dropzone Styles */
.dropzone {
  border: 2px dashed rgba(255,255,255,0.5);
  border-radius: 10px;
  padding: 40px;
  height: 200px;
  position: relative;
  background-color: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.dropzone:hover {
  border-color: #fff;
  background-color: rgba(255,255,255,0.1);
}

.dropzone.drag-over {
  border-color: #4ade80;
  background-color: rgba(255,255,255,0.15);
}

/* Position the InputFile to cover the entire dropzone area */
.dropzone input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.dropzone-text {
  z-index: 1;
  pointer-events: none; /* Prevent flicker when dragging over text */
  text-align: center;
  color: white;
}

/* Blazor error UI (hidden by default) */
#blazor-error-ui {
  display: none;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: .6rem .9rem;
  border-radius: .5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  font-size: .95rem;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
  cursor: pointer;
  margin-left: .6rem;
  color: #1A2B3C;
  text-decoration: underline;
}

#blazor-error-ui .dismiss {
  margin-left: .4rem;
}

@layer base {
  h1:focus:not(:focus-visible) {
    outline: none;
  }
}

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