/* =========================================== */
/* MOBILE ERROR STATES */
/* User-friendly error messages and retry options */
/* =========================================== */

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
  text-align: center;
  min-height: 50vh;
}

.error-state-icon {
  font-size: clamp(3rem, 8vw, 5rem);
  color: #ef4444;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.error-state-title {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
}

.error-state-message {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  color: #666;
  margin-bottom: 1.5rem;
  max-width: 500px;
  line-height: 1.6;
}

.error-state-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.error-state-button {
  padding: clamp(0.5rem, 2vw, 0.75rem) clamp(1rem, 3vw, 1.5rem);
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 44px;
  touch-action: manipulation;
}

.error-state-button-primary {
  background: #6366f1;
  color: white;
}

.error-state-button-primary:hover,
.error-state-button-primary:active {
  background: #4f46e5;
  transform: scale(0.98);
}

.error-state-button-secondary {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.error-state-button-secondary:hover,
.error-state-button-secondary:active {
  background: rgba(99, 102, 241, 0.2);
  transform: scale(0.98);
}

/* Image Error State */
.image-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #666;
  text-align: center;
  background: #f9fafb;
  border-radius: 8px;
  min-height: 200px;
}

.image-error-icon {
  font-size: 2rem;
  color: #ef4444;
  margin-bottom: 0.5rem;
}

.image-error-message {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.image-error-button {
  padding: 0.5rem 1rem;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 44px;
  touch-action: manipulation;
}

.image-error-button:hover,
.image-error-button:active {
  background: #4f46e5;
  transform: scale(0.98);
}

/* Loading Error State */
.loading-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  color: #991b1b;
}

.loading-error-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.loading-error-message {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

/* Network Error State */
.network-error {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  color: #92400e;
}

.network-error-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.network-error-message {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
  text-align: center;
  min-height: 40vh;
}

.empty-state-icon {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: #9ca3af;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state-title {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
}

.empty-state-message {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  color: #666;
  margin-bottom: 1.5rem;
  max-width: 400px;
  line-height: 1.6;
}

/* Retry Button */
.retry-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: clamp(0.5rem, 2vw, 0.75rem) clamp(1rem, 3vw, 1.5rem);
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  touch-action: manipulation;
}

.retry-button:hover,
.retry-button:active {
  background: #4f46e5;
  transform: scale(0.98);
}

.retry-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.retry-button .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Mobile-specific error states */
@media (max-width: 768px) {
  .error-state {
    padding: 2rem 1rem;
  }
  
  .error-state-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .error-state-button {
    width: 100%;
  }
  
  .empty-state {
    padding: 2rem 1rem;
  }
}

