/* Custom styles for Mojo Hyderabad Wala Restaurant */
:root {
  --primary-color: #D97706; /* Warm orange */
  --primary-dark: #92400E; /* Dark amber */
  --secondary-color: #059669; /* Fresh green */
  --accent-color: #DC2626; /* Deep red */
  --warning-color: #F59E0B;
  --success-color: #059669;
  --error-color: #DC2626;
  --cream: #FEF7ED; /* Warm cream background */
  --light-orange: #FED7AA; /* Light orange */
  --text-dark: #451A03; /* Dark brown text */
  --text-medium: #92400E; /* Medium brown text */
  --border-light: #FED7AA;
}

/* Restaurant-themed body styling */
body {
  background-color: var(--cream);
  color: var(--text-dark);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Override Bootstrap primary colors with better specificity */
.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  color: white !important;
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb, 122, 102, 35), 0.25) !important;
}

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

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

.navbar-dark .navbar-brand {
  color: white !important;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: white !important;
}

/* Card styling with warm theme */
.card {
  background-color: white;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.1);
}

.card-header {
  background-color: var(--light-orange);
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-light);
}

/* Smooth transitions - but disable for buttons to prevent flashing */
*:not(.btn):not(.btn-primary) {
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

/* Remove transitions from buttons to prevent color flashing */
.btn,
.btn-primary {
  transition: none !important;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Menu item cards with restaurant theme */
.menu-item-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  border: 1px solid var(--border-light);
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.menu-item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -3px rgba(217, 119, 6, 0.2), 0 4px 6px -2px rgba(217, 119, 6, 0.1);
}

.menu-item-card .card-title {
  color: var(--text-dark);
  font-weight: 600;
}

.menu-item-card .card-text {
  color: var(--text-medium);
}

.price-tag {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.1rem;
}

/* Additional button styles */
.btn-success {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-success:hover {
  background-color: #047857;
  border-color: #047857;
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Hero section styling */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0;
}

.hero-section h1, .hero-section p {
  color: white;
}

/* Cart badge */
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--error-color);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Status badges */
.status-pending { background-color: var(--warning-color); }
.status-confirmed { background-color: var(--primary-color); }
.status-preparing { background-color: #8B5CF6; }
.status-ready { background-color: var(--success-color); }
.status-delivered { background-color: var(--gray-800); }
.status-cancelled { background-color: var(--error-color); }

/* Image upload preview */
.image-preview {
  max-width: 200px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px dashed var(--gray-200);
}

/* Responsive tables */
.table-responsive {
  overflow-x: auto;
}

@media (max-width: 768px) {
  .table-responsive table {
    font-size: 14px;
  }
  
  .table-responsive th,
  .table-responsive td {
    padding: 8px 4px;
  }
}

/* Order status timeline */
.status-timeline {
  position: relative;
  padding-left: 30px;
}

.status-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.status-timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.status-timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-300);
}

.status-timeline-item.active::before {
  background: var(--primary-color);
}

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

/* PWA Install prompt */
.install-prompt {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(100px);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
}

.install-prompt.show {
  transform: translateY(0);
}

.install-prompt button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  margin-left: 12px;
}

.install-prompt button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Offline indicator */
.offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--error-color);
  color: white;
  text-align: center;
  padding: 8px;
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1001;
}

.offline-indicator.show {
  transform: translateY(0);
}

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

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .menu-item-card {
    border: 2px solid;
  }
  
  button {
    border: 2px solid;
  }
}

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

/* H5 element styling - reduced font size and spacing */
h5 {
  font-size: 0.9rem !important;
  margin-bottom: 0.3rem !important;
  margin-top: 0.3rem !important;
  line-height: 1.2 !important;
}

.modal-title h5,
.card-header h5,
h5.modal-title,
h5.card-title {
  font-size: 0.85rem !important;
  margin-bottom: 0.2rem !important;
  margin-top: 0.2rem !important;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-50: #1F2937;
    --gray-100: #374151;
    --gray-200: #4B5563;
  }
}
