/* UX Components - Loading States, Empty States, Toast, Mobile Nav */

/* ========== SKELETON LOADERS ========== */
.skeleton {
  background: linear-gradient(90deg, 
    rgba(2,6,23,0.06) 0%, 
    rgba(2,6,23,0.1) 50%, 
    rgba(2,6,23,0.06) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }
.skeleton-text.long { width: 100%; }

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-thumb {
  width: 100%;
  height: 160px;
  border-radius: 12px 12px 0 0;
}

.skeleton-card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(2,6,23,0.08);
}

.skeleton-card .skeleton-thumb {
  margin: -12px -12px 12px -12px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ========== EMPTY STATES ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.empty-state h3 {
  margin: 0 0 8px 0;
  color: var(--text);
  font-size: 1.3rem;
}

.empty-state p {
  margin: 0 0 24px 0;
  font-size: 0.95rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.empty-state-compact {
  padding: 40px 20px;
}

.empty-state-compact .empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state-compact h3 {
  font-size: 1.1rem;
}

.empty-state-compact p {
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: var(--card);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-left: 4px solid transparent;
  min-width: 300px;
  max-width: 100%;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text);
}

.toast-message {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(2,6,23,0.1);
  color: var(--text);
}

/* Toast Types */
.toast-success {
  border-left-color: #22c55e;
}

.toast-success .toast-icon {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.toast-error {
  border-left-color: #ef4444;
}

.toast-error .toast-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.toast-warning {
  border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.toast-info {
  border-left-color: var(--accent);
}

.toast-info .toast-icon {
  background: rgba(0, 100, 210, 0.15);
  color: var(--accent);
}

/* ========== MOBILE NAVIGATION ========== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: var(--glass);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.show {
  opacity: 1;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: var(--card);
  box-shadow: -4px 0 20px rgba(0,0,0,0.2);
  z-index: 9999;
  transition: right 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-menu.show {
  right: 0;
}

.mobile-menu-header {
  padding: 20px;
  border-bottom: 1px solid rgba(2,6,23,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu-header .brand {
  font-size: 1.1rem;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.mobile-menu-close:hover {
  background: var(--glass);
}

.mobile-menu-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.mobile-menu-nav .nav-section {
  padding: 0 20px;
  margin-bottom: 24px;
}

.mobile-menu-nav .nav-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 12px;
  padding: 0 20px;
}

.mobile-menu-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.mobile-menu-nav .nav-link:hover,
.mobile-menu-nav .nav-link.active {
  background: var(--glass);
  border-left-color: var(--accent);
  color: var(--accent);
}

.mobile-menu-nav .nav-link-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.mobile-menu-footer {
  padding: 20px;
  border-top: 1px solid rgba(2,6,23,0.08);
}

.mobile-menu-footer .btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .header-right {
    display: none;
  }
  
  .header-right.mobile-visible {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    gap: 12px;
  }
  
  .search-wrap {
    max-width: 100%;
  }
  
  .toast-container {
    left: 20px;
    right: 20px;
    max-width: none;
  }
  
  .toast {
    min-width: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .empty-state {
    padding: 40px 16px;
  }
  
  .empty-state-icon {
    font-size: 3rem;
  }
  
  .empty-state h3 {
    font-size: 1.1rem;
  }
  
  .empty-state p {
    font-size: 0.9rem;
  }
}

