/* WhatsApp Status Generator - Custom Styles */

/* Category Tabs */
.category-tab {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid #D1D5DB;
  color: #6B7280;
}

.category-tab:hover {
  border-color: #128C7E;
  color: #128C7E;
}

.category-tab.active {
  background-color: #128C7E;
  color: white;
  border-color: #128C7E;
}

/* Suggestion Cards */
.suggestion-card {
  transform: scale(1);
  transition: transform 0.2s;
}

.suggestion-card:hover {
  transform: scale(1.05);
}

/* Loading States */
.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Offline Styles */
body.offline::after {
  content: "You're offline - Some features may be limited";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #F59E0B;
  color: white;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.875rem;
  z-index: 40;
}

/* WhatsApp Color Variables */
:root {
  --whatsapp-dark: #075E54;
  --whatsapp-primary: #128C7E;
  --whatsapp-light: #25D366;
  --whatsapp-accent: #DCF8C6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background-color: #F3F4F6;
}

::-webkit-scrollbar-thumb {
  background-color: #9CA3AF;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #6B7280;
}

/* Animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

.slide-out {
  animation: slideOut 0.3s ease-out;
}

/* PWA Install Banner */
.install-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 50;
  background: linear-gradient(135deg, #128C7E, #25D366);
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  #suggestions-grid {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .category-tab {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
  }

  /* Mobile optimized sections */
  .app-section {
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  /* History items mobile layout */
  .history-item {
    flex-direction: column;
    align-items: flex-start;
    space-y: 3;
  }

  .history-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }

  /* Brand cards mobile layout */
  .brand-card {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 1rem 0;
  }
  
  header .container {
    padding: 0 1rem;
  }

  /* Smaller navigation on mobile */
  .nav-container {
    padding: 0 8px;
  }

  .nav-item {
    min-width: 60px;
    padding: 6px 8px;
  }

  .nav-icon {
    font-size: 18px;
  }

  .nav-label {
    font-size: 11px;
  }

  /* Tighter spacing on mobile */
  .app-section {
    padding: 0.5rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1F2937;
    color: white;
  }
  
  .bg-white {
    background-color: #374151 !important;
  }
  
  .text-gray-800 {
    color: #E5E7EB !important;
  }
  
  .border-gray-300 {
    border-color: #4B5563 !important;
  }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(18, 140, 126, 0.5);
}

/* Custom button styles */
.btn-primary {
  background: linear-gradient(135deg, #128C7E, #25D366);
  color: white;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: #6B7280;
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: #4B5563;
}

/* Image preview styles */
#generated-image {
  max-width: 28rem;
  margin: 0 auto;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 2px solid #E5E7EB;
}

/* Loading overlay improvements */
#loading-overlay {
  backdrop-filter: blur(4px);
}

/* Card hover effects */
.card-hover {
  transition: all 0.2s;
}

.card-hover:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #128C7E, #25D366);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Success/Error states */
.state-success {
  border-color: #10B981;
  background-color: #ECFDF5;
  color: #047857;
}

.state-error {
  border-color: #EF4444;
  background-color: #FEF2F2;
  color: #DC2626;
}

/* Bottom Navigation Styles */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  padding-bottom: env(safe-area-inset-bottom, 8px);
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 16px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  min-width: 64px;
}

.nav-item:hover {
  background: rgba(37, 211, 102, 0.1);
  transform: translateY(-1px);
}

.nav-item.active {
  background: rgba(37, 211, 102, 0.15);
  color: #128C7E;
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
  color: #128C7E;
}

.nav-label {
  font-size: 12px;
  font-weight: 500;
  color: #6B7280;
  transition: color 0.3s ease;
}

.nav-item.active .nav-label {
  color: #128C7E;
}

/* App Sections */
.app-container {
  min-height: calc(100vh - 120px);
}

.app-section {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.app-section.active {
  display: block;
}

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

/* Safe Area Support */
body {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Navigation Active State Animation */
.nav-item::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #128C7E;
  border-radius: 2px;
  opacity: 0;
  transition: all 0.3s ease;
}

.nav-item.active::before {
  opacity: 1;
}

/* Image Upload Styles */
#upload-area {
  transition: all 0.3s ease;
}

#upload-area:hover {
  border-color: #128C7E;
  background-color: #F0FDF4;
}

#upload-area.drag-over {
  border-color: #128C7E;
  background-color: #ECFDF5;
  transform: scale(1.02);
}

#image-preview img {
  max-height: 200px;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.upload-progress {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Generation mode indicator */
.generation-mode {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.generation-mode.text-to-image {
  background-color: #EBF8FF;
  color: #2563EB;
}

.generation-mode.image-to-image {
  background-color: #F0FDF4;
  color: #059669;
}