/* Custom CSS for WhatsApp Shop Angola */



/* CSS Variables for New Colors */
:root {
  --primary: #128C7E;
  --primary-dark: red;
  --primary-light: #25D366;
  --whatsapp-green: #25D366;
  --primary-tint: #E0F2F1;
  --bg-primary: #f9fafb;
}

/* GUARANTEED WHATSAPP GREEN CLASSES - OVERRIDE EVERYTHING */
.bg-whatsapp-green {
  background-color: #25D366 !important;
}

.text-whatsapp-green {
  color: #25D366 !important;
}

.border-whatsapp-green {
  border-color: #25D366 !important;
}

/* .hover\:bg-green-600:hover {
  background-color: #16a34a !important;
} */

.bg-green-500 {
  background-color: #22c55e !important;
}

.bg-green-600 {
  background-color: #16a34a !important;
}

/* Additional WhatsApp button styles */
.btn-whatsapp,
.bg-whatsapp-green {
  background-color: #25D366 !important;
  color: white !important;
}

/* .btn-whatsapp:hover,
.bg-whatsapp-green:hover {
  background-color: #1ea752 !important;
} */

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f9fafb !important;
  scroll-behavior: smooth;
}

/* WhatsApp-style animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

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

/* Card styles with borders instead of shadows */
.product-card {
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

/* .product-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
} */

/* Fully rounded button styles */
.btn-primary {
  /* background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); */
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border-radius: 50px; /* Fully rounded */
}

/* .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(18, 140, 126, 0.3);
} */

.btn-whatsapp {
  background: linear-gradient(135deg, var(--whatsapp-green) 0%, #1ea752 100%) !important;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border-radius: 50px;
}

/* .btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
} */

.btn-primary:active,
.btn-whatsapp:active {
  transform: translateY(0);
}

.btn-primary::before,
.btn-whatsapp::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

/* .btn-primary:hover::before,
.btn-whatsapp:hover::before {
  left: 100%;
} */

/* All buttons should be fully rounded */
button, .btn {
  border-radius: 50px !important;
}

input[type="submit"], 
input[type="button"],
.button {
  border-radius: 50px !important;
}

/* Navigation styles */
.nav-item {
  transition: all 0.2s ease;
  border-radius: 8px;
}

/* .nav-item:hover {
  background-color: rgba(18, 140, 126, 0.1);
} */

.nav-item.active {
  background-color: rgba(18, 140, 126, 0.1);
}

/* Form styles */
.form-input {
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
  border-radius: 50px;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 140, 126, 0.1);
  outline: none;
}

.form-input:invalid {
  border-color: #ef4444;
}

.form-input:invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Badge animations */
.cart-badge {
  animation: pulse 2s infinite;
}

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

/* Toast notification styles - Bounce Animation */
#toast{
  display: none;
}

.toast-notification {
  min-width: 120px;
  max-width: 200px;
  backdrop-filter: blur(10px);
  transform-origin: center;
}

/* Scale classes for bounce animation */
.scale-0 {
  transform: scale(0) !important;
}

.scale-100 {
  transform: scale(1) !important;
}

.scale-110 {
  transform: scale(1.1) !important;
}

/* Transition duration classes */
.duration-200 {
  transition-duration: 200ms !important;
}

/* Transform transition with bounce easing */
.transition-transform {
  transition-property: transform !important;
  transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

/* Bounce animation keyframes for fallback */
@keyframes bounceIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes bounceOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

.bounce-in {
  animation: bounceIn 0.3s ease-out forwards;
}

.bounce-out {
  animation: bounceOut 0.3s ease-in forwards;
}

/* Responsive images */
.responsive-img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.responsive-img:hover {
  transform: scale(1.02);
}

/* Status indicators */
.status-waiting {
  background-color: #fef3c7;
  color: #92400e;
}

.status-progress {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-delivery {
  background-color: #e9d5ff;
  color: #7c3aed;
}

.status-completed {
  background-color: #d1fae5;
  color: #065f46;
}

/* Timeline styles */
.timeline {
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 32px;
  bottom: 32px;
  width: 2px;
  background-color: #e5e7eb;
}

.timeline-item {
  position: relative;
  padding-left: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #e5e7eb;
  z-index: 1;
}

.timeline-item.active::before {
  background-color: var(--whatsapp-green);
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.2);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .mobile-sticky {
    position: sticky;
    top: 0;
    z-index: 40;
  }
  
  .mobile-full {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }
  
  .mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* WhatsApp-style messaging bubble */
.message-bubble {
  background: linear-gradient(135deg, var(--whatsapp-green) 0%, #d4f7dc 100%);
  border-radius: 18px 18px 4px 18px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-bubble::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid var(--whatsapp-green);
  border-bottom: 8px solid transparent;
}

/* Search input enhancement */
.search-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 20px;
  padding-left: 44px;
}

/* Admin panel styles */
.admin-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.admin-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.admin-stat {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.admin-stat.green {
  background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--primary-dark) 100%) !important;
}

.admin-stat.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.admin-stat.yellow {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Table styles */
.admin-table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.admin-table th {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
}

.admin-table tr:hover {
  background-color: rgba(37, 211, 102, 0.05);
}

/* Modal styles */
.modal-overlay {
  backdrop-filter: blur(4px);
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  animation: fadeIn 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

/* Utility classes */
.text-primary {
  color: black;
}

.bg-primary {
  background-color: var(--bg-primary) !important;
}

.bg-primary-tint {
  background-color: var(--primary-tint) !important;
}

/* .border-primary {
  border-color: var(--primary) !important;
} */

.shadow-primary {
  box-shadow: 0 10px 25px rgba(18, 140, 126, 0.3);
}

.shadow-whatsapp {
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-whatsapp,
  .bg-whatsapp-green {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1f2937;
    --bg-secondary: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
  }
}

/* Focus management for accessibility */
.focus\:ring-primary:focus {
  --tw-ring-color: rgba(18, 140, 126, 0.5);
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-tint);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-tint);
}

::-webkit-scrollbar {
  display: none;
}