/* Loading screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--rz-base-100, #f5f5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.loading-screen .logo {
  width: 130px;
  object-fit: fill;
}

.loading-screen .loading-bar {
  width: 130px;
  height: 2px;
  background: var(--rz-base-300, #cfcfcf);
  margin-top: 22px;
  position: relative;
  overflow: hidden;
}

.loading-screen .loading-bar::before {
  content: '';
  width: 68px;
  height: 2px;
  background: var(--rz-primary);
  position: absolute;
  left: -34px;
  animation: bar 1.5s infinite ease;
}

@keyframes bar {
  50% {
    left: 96px;
  }
}

#blazor-error-ui {
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

.blazor-error-boundary {
  background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4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4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
  padding: 1rem 1rem 1rem 3.7rem;
  color: white;
}

.blazor-error-boundary::after {
  content: "An error has occurred."
}

/* Header logo container - aligns with sidebar */
.header-logo-container {
  display: flex;
  align-items: center;
  transition: width 0.25s var(--ease-out-quart);
  overflow: hidden;
}

.header-logo-container.expanded {
  width: calc(var(--rz-sidebar-width) - 84px);
}

.header-logo-container.collapsed {
  width: auto;
}

.rz-header .logo {
  height: 20px;
}

.validation-message {
  color: var(--rz-danger);
}

.looc-theme-card {
  min-height: 70px;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.looc-theme-companylogo {
  max-width: 100px;
  max-height: 100px;
  object-fit: scale-down;
}

.looc-theme-profilepicture {
  max-width: 85px;
  max-height: 85px;
  object-fit: cover;
  height: 100%;
  width: 100%;
  aspect-ratio: revert;
}

.incident-menu {
  position: fixed;
  top: 50px;
  left: calc(100% - 400px);
  background-color: white;
}

.incident-menu [style*="cursor: pointer"]:hover {
  background-color: var(--rz-base-100);
  transition: background-color 0.2s ease;
}

.incident-row {
  border: none;
  box-shadow: none;
}

.incident-row:hover {
  animation-duration: 0.5s;
  background-color: var(--rz-secondary-lighter);
  border-radius: var(--rz-datalist-border-radius);
  cursor: pointer;
}

.has-incidents {
  color: var(--rz-danger);
}

@keyframes heart-strong {
  0%,
  to {
    opacity: 0.8;
    transform: scale(0.8);
  }

  10%,
  30% {
    opacity: 1;
    transform: scale(1);
  }

  20% {
    opacity: 0.9;
    transform: scale(0.9);
  }
}

.pulsing-heart {
  animation: 1s linear infinite heart-strong;
}

.title-section {
  margin-left: 1rem;
  border-left: var(--rz-sidebar-toggle-border);
  padding: var(--rz-sidebar-toggle-padding);
}

.action-section {
  margin-left: auto;
  margin-right: 1rem;
}

/* This is needed to make the dialog content fill the available space */
.rz-dialog .rz-dialog-content {
  flex-basis: 100%;
}

/* Page content padding for top-level pages */
.page-content {
  padding: 24px;
}

/* Authorizing state container - centered loading */
.authorizing-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* Clickable data grid rows - only when grid has RowSelect handler */
.clickable-rows .rz-data-row {
  cursor: pointer;
}

/* =============================================================================
   LOOC Animation System
   ============================================================================= */

/* Animation timing functions - natural deceleration */
:root {
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Content fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation utility classes */
.animate-fade-in {
  animation: fadeIn 0.3s var(--ease-out-quart) forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.4s var(--ease-out-quart) forwards;
}

/* Stagger delays for dashboard cards */
.stagger-1 { animation-delay: 0ms; }
.stagger-2 { animation-delay: 50ms; }
.stagger-3 { animation-delay: 100ms; }
.stagger-4 { animation-delay: 150ms; }
.stagger-5 { animation-delay: 200ms; }
.stagger-6 { animation-delay: 250ms; }

/* Content wrapper animation for LoadingWrapper */
.content-loaded {
  animation: fadeIn 0.25s var(--ease-out-quart) forwards;
}

/* Sidebar transition enhancement */
.rz-sidebar {
  transition: width 0.25s var(--ease-out-quart);
}

/* Card hover improvements with better easing */
.rz-card {
  transition: box-shadow 0.2s var(--ease-out-quart),
              transform 0.2s var(--ease-out-quart);
}

/* Interactive card lift effect */
.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  box-shadow: var(--rz-shadow-3);
  transform: translateY(-2px);
}

.card-interactive:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

/* Button feedback enhancement */
.rz-button {
  transition: background-color 0.15s var(--ease-out-quart),
              box-shadow 0.15s var(--ease-out-quart),
              transform 0.1s var(--ease-out-quart);
}

.rz-button:active:not(:disabled) {
  transform: scale(0.98);
}

/* Tab indicator animation */
.page-tab {
  position: relative;
}

.page-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--looc-tab-active-color);
  transform: scaleX(0);
  transition: transform 0.2s var(--ease-out-quart);
}

.page-tab.active::after {
  transform: scaleX(1);
}

/* Loading skeleton animation */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--rz-base-200) 25%,
    var(--rz-base-100) 50%,
    var(--rz-base-200) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* Status badge pulse for active items */
@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse-active {
  animation: pulse-subtle 2s ease-in-out infinite;
}

/* Expand/collapse animation for accordions */
.expand-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease-out-quart);
}

.expand-collapse.expanded {
  grid-template-rows: 1fr;
}

.expand-collapse > * {
  overflow: hidden;
}

/* =============================================================================
   Success Notification Polish
   ============================================================================= */

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes iconPulse {
  0% {
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.rz-notification-success {
  animation: slideInRight 0.35s var(--ease-out-quart) forwards;
  border-left: 3px solid #39B388;
}

.rz-notification-success .rz-icon {
  animation: iconPulse 0.4s var(--ease-out-quart) forwards;
}

/* =============================================================================
   Overview Empty State
   ============================================================================= */

.empty-state--grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 0.5rem;
  background: var(--rz-base-50);
  border-radius: 8px;
}

.empty-state--grid .empty-state-icon {
  font-size: 2.5rem;
  color: var(--rz-text-tertiary-color);
}

.empty-state--grid .empty-state-title {
  font-weight: 500;
  color: var(--rz-text-secondary-color);
}

.empty-state--grid .empty-state-message {
  font-size: 0.875rem;
  color: var(--rz-text-tertiary-color);
}

/* =============================================================================
   Dashboard Positive Empty State
   ============================================================================= */

.empty-state--positive {
  background: linear-gradient(135deg, rgba(57, 179, 136, 0.04), rgba(57, 179, 136, 0.08));
  border-radius: 8px;
}

.empty-state-title {
  font-weight: 500;
  color: var(--rz-text-color);
}

.empty-state-message {
  font-size: 0.875rem;
  color: var(--rz-text-tertiary-color);
}