/* MudBlazor base styling and theme support */
html,
body {
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* Primary and secondary text colors */
.mud-primary-text {
  color: var(--mud-palette-text-primary) !important;
}

.mud-secondary-text {
  color: var(--mud-palette-text-secondary) !important;
}

/* AppBar styling enhancements */
.mud-appbar {
  background-color: var(--mud-palette-appbar-background) !important;
  border-bottom: 1px solid var(--mud-palette-divider);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none !important; /* Remove default elevation shadow */
}

/* Ensure AppBar text uses the correct theme colors */
.mud-appbar .mud-typography,
.mud-appbar .mud-button-root,
.mud-appbar .mud-icon-root {
  color: var(--mud-palette-appbar-text) !important;
}

/* Text capitalization utility */
.text-capitalize {
  text-transform: capitalize !important;
}

/* Smooth transitions for theme changes */
.mud-appbar,
.mud-drawer,
.mud-main-content {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Loading Experience - Clean Black and White Design */
.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  text-align: center;
  color: black;
}

.loading-logo {
  margin-bottom: 2rem;
}

.logo-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: black;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  margin: 0 auto;
  animation: pulse 2s infinite;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  height: 40px;
}

.spinner-ring {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid black;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text h2 {
  font-size: 2rem;
  font-weight: 300;
  margin: 0 0 0.5rem 0;
  letter-spacing: 1px;
  color: black;
}

.loading-text p {
  font-size: 1rem;
  opacity: 0.6;
  margin: 0;
  font-weight: 300;
  color: black;
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced Error UI */
#blazor-error-ui {
  background: #ff4444;
  color: white;
  border: none;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  border-radius: 12px 12px 0 0;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  display: none;
  z-index: 10000;
  text-align: center;
}

.error-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#blazor-error-ui h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 500;
}

#blazor-error-ui p {
  margin: 0 0 1.5rem 0;
  opacity: 0.9;
  font-size: 0.9rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.error-actions a {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.error-actions a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

#blazor-error-ui .dismiss {
  cursor: pointer;
}

/* Button enhancements */
.mud-button-root {
  text-transform: none !important;
}

/* Input field enhancements */
.mud-input {
  background-color: var(--mud-palette-background) !important;
}

/* Responsive design */
@media (max-width: 768px) {
  .mud-appbar {
    padding: 0 8px;
  }

  .mud-main-content {
    padding: 16px 8px;
  }
}
