/* ============================================
   Error View Component Styles
   ============================================ */

error-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem;
  position: relative;
}

/* Animated background blobs */
error-view::before,
error-view::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: 0;
  animation: floatBlob 8s ease-in-out infinite;
}

error-view::before {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  top: -100px;
  right: -50px;
  animation-delay: 0s;
}

error-view::after {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  bottom: -80px;
  left: -50px;
  animation-delay: -4s;
}

@keyframes floatBlob {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -20px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

.error-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1200px;
  width: 100%;
  padding: 3rem 2.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 20px 40px -10px rgba(0, 0, 0, 0.1),
    0 40px 80px -20px rgba(99, 102, 241, 0.15);
  animation: errorSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes errorSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Icon wrapper with floating animation */
.error-icon {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ff6b6b 0%, #f43f5e 50%, #e11d48 100%);
  border-radius: 50%;
  box-shadow:
    0 8px 32px rgba(244, 63, 94, 0.35),
    0 0 0 6px rgba(244, 63, 94, 0.1),
    inset 0 2px 6px rgba(255, 255, 255, 0.3);
  animation: iconFloat 3s ease-in-out infinite;
}

.error-icon::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
      transparent,
      rgba(244, 63, 94, 0.3),
      transparent,
      transparent);
  animation: iconRing 4s linear infinite;
}

@keyframes iconFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes iconRing {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.error-icon svg {
  width: 48px;
  height: 48px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.error-title {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.03em;
}

.error-message {
  font-size: 1.125rem;
  color: #64748b;
  margin: 0 0 2rem 0;
  line-height: 1.7;
  max-width: 1080px;
  width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.error-back-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow:
    0 4px 12px rgba(99, 102, 241, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.error-back-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 50%,
      transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.error-back-button:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 24px rgba(99, 102, 241, 0.45),
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.error-back-button:hover::before {
  opacity: 1;
}

.error-back-button:active {
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(99, 102, 241, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

.error-back-button svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.error-back-button:hover svg {
  transform: translateX(-4px);
}

/* Decorative dots pattern */
.error-container::before {
  content: '';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 60px;
  height: 60px;
  background-image: radial-gradient(circle, #e2e8f0 2px, transparent 2px);
  background-size: 12px 12px;
  opacity: 0.6;
}

.error-container::after {
  content: '';
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  width: 40px;
  height: 40px;
  background-image: radial-gradient(circle, #c7d2fe 2px, transparent 2px);
  background-size: 10px 10px;
  opacity: 0.5;
}

/* ============================================
   Error View Component Styles -Dark Mode Support
   ============================================ */
@media (prefers-color-scheme: dark) {
  error-view::before {
    opacity: 0.25;
  }

  error-view::after {
    opacity: 0.2;
  }

  .error-container {
    background: rgba(30, 27, 75, 0.95);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow:
      0 4px 6px -1px rgba(0, 0, 0, 0.2),
      0 20px 40px -10px rgba(0, 0, 0, 0.4),
      0 40px 80px -20px rgba(99, 102, 241, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .error-container::before {
    background-image: radial-gradient(circle, rgba(148, 163, 184, 0.3) 2px, transparent 2px);
  }

  .error-container::after {
    background-image: radial-gradient(circle, rgba(129, 140, 248, 0.3) 2px, transparent 2px);
  }

  .error-title {
    background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .error-message {
    color: #94a3b8;
  }

  .error-icon {
    box-shadow:
      0 8px 32px rgba(244, 63, 94, 0.25),
      0 0 0 6px rgba(244, 63, 94, 0.08),
      inset 0 2px 6px rgba(255, 255, 255, 0.2);
  }

  .error-back-button {
    box-shadow:
      0 4px 12px rgba(99, 102, 241, 0.25),
      0 1px 3px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  .error-back-button:hover {
    box-shadow:
      0 8px 24px rgba(99, 102, 241, 0.35),
      0 4px 8px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
}

/* ============================================
   Error View Component Styles - Responsive Adjustments
   ============================================ */
@media (max-width: 480px) {
  error-view {
    padding: 1rem;
    min-height: 50vh;
  }

  .error-container {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .error-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
  }

  .error-icon svg {
    width: 40px;
    height: 40px;
  }

  .error-title {
    font-size: 1.75rem;
  }

  .error-message {
    font-size: 1rem;
  }

  .error-back-button {
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
  }

  error-view::before,
  error-view::after {
    filter: blur(60px);
  }

  error-view::before {
    width: 200px;
    height: 200px;
  }

  error-view::after {
    width: 150px;
    height: 150px;
  }
}


/* =====================================================
   SIDE PANEL
   Sliding panel from the right side of the screen
   ===================================================== */

.side-panel-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  visibility: hidden;
  transition: all var(--transition-base);
}

.side-panel-backdrop.open {
  visibility: visible;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.side-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--side-panel-width, 480px);
  max-width: 100vw;
  background: white;
  box-shadow: var(--shadow-2xl);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-base) cubic-bezier(0.16, 1, 0.3, 1);
}

.side-panel.open {
  transform: translateX(0);
}

.side-panel-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-shrink: 0;
  background: linear-gradient(to bottom, white, var(--neutral-50));
}

.side-panel-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--neutral-900);
  margin: 0;
  line-height: 1.3;
}

.side-panel-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--neutral-100);
  color: var(--neutral-600);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.side-panel-close:hover {
  background: var(--error-light);
  color: var(--error);
  transform: rotate(90deg);
}

.side-panel-close:active {
  transform: rotate(90deg) scale(0.95);
}

.side-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  overscroll-behavior: contain;
}

.side-panel-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--neutral-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-shrink: 0;
  background: var(--neutral-50);
}

/* Responsive Side Panel */
@media (max-width: 768px) {
  .side-panel {
    width: 100vw;
    max-width: 100vw;
  }

  .side-panel-header {
    padding: var(--space-4);
  }

  .side-panel-body {
    padding: var(--space-4);
  }

  .side-panel-footer {
    padding: var(--space-3) var(--space-4);
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .side-panel-footer .btn {
    flex: 1;
    min-width: 0;
  }
}