@tailwind base;
@tailwind components;
@tailwind utilities;

/* Theme variables - independent of device theme */
:root {
  /* Light theme as default */
  --color-bg-primary: #ffffff;
  --color-bg-primary-rgb: 255, 255, 255;
  --color-bg-secondary: #f3f4f6;
  --color-bg-secondary-rgb: 243, 244, 246;
  --color-text-primary: #111827;
  --color-text-primary-rgb: 17, 24, 39;
  --color-text-secondary: "black";
  --color-text-secondary-rgb: 75, 85, 99;
  --color-primary: #d97706;
  --color-primary-rgb: 217, 119, 6;
  --color-primary-hover: #b45309;
  --color-primary-hover-rgb: 180, 83, 9;
  --color-border: #e5e7eb;
  --color-border-rgb: 229, 231, 235;
  --color-success: #10b981;
  --color-success-rgb: 16, 185, 129;
  --color-warning: #f59e0b;
  --color-warning-rgb: 245, 158, 11;
  --color-error: #ef4444;
  --color-error-rgb: 239, 68, 68;
  
  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  
  /* Border radius */
  --radius-sm: 0.125rem;
  --radius: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  --shadow-none: 0 0 #0000;
}

/* Base styles */
html {
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-family);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--spacing-4) 0;
}

h1 { 
  font-size: var(--font-size-4xl);
  line-height: 1.1;
}

h2 { 
  font-size: var(--font-size-3xl);
  line-height: 1.15;
}

h3 { 
  font-size: var(--font-size-2xl);
  line-height: 1.2;
}

h4 { 
  font-size: var(--font-size-xl);
  line-height: 1.25;
}

h5 { 
  font-size: var(--font-size-lg);
  line-height: 1.3;
}

h6 {
  font-size: var(--font-size-base);
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

p {
  margin: 0 0 var(--spacing-4) 0;
  color: var(--color-text-primary);
}

small {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

em {
  font-style: italic;
}

/* Lists */
ul, ol {
  margin: 0 0 var(--spacing-4) 0;
  padding-left: var(--spacing-5);
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin-bottom: var(--spacing-2);
  color: var(--color-text-primary);
}

/* Code */
code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
  color: var(--color-text-primary);
  background-color: var(--color-bg-secondary);
  padding: 0.2em 0.4em;
  border-radius: var(--radius);
}

pre {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-4);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0 0 var(--spacing-4) 0;
}

pre code {
  padding: 0;
  background-color: transparent;
  border-radius: 0;
}

/* Blockquote */
blockquote {
  margin: 0 0 var(--spacing-4) 0;
  padding: var(--spacing-4) var(--spacing-6);
  border-left: 4px solid var(--color-border);
  color: var(--color-text-secondary);
  font-style: italic;
}

/* Horizontal rule */
hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--spacing-8) 0;
}

/* Selection */
::selection {
  background-color: rgba(var(--color-primary-rgb), 0.2);
  color: var(--color-text-primary);
}

/* Focus styles */
:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  *,
  *::before,
  *::after {
    text-shadow: none !important;
    box-shadow: none !important;
  }
  
  a,
  a:visited {
    text-decoration: underline;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
  }
  
  abbr[title]::after {
    content: " (" attr(title) ")";
  }
  
  pre,
  blockquote {
    border: 1px solid var(--color-border);
    page-break-inside: avoid;
  }
  
  thead {
    display: table-header-group;
  }
  
  tr,
  img {
    page-break-inside: avoid;
  }
  
  img {
    max-width: 100% !important;
  }
  
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  
  h2,
  h3 {
    page-break-after: avoid;
  }
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* Remove all dark: classes from your HTML and replace with direct classes */
/* Star Rating */
.star-rating {
    unicode-bidi: bidi-override;
    direction: rtl;
    text-align: center;
}

.star-rating > input {
    display: none;
}

.star-rating > label {
    display: inline-block;
    padding: 0.25rem;
    font-size: 1.5rem;
    color: #d1d5db;
    cursor: pointer;
}

.star-rating > input:checked ~ label,
.star-rating > input:checked ~ label:hover,
.star-rating > label:hover,
.star-rating > label:hover ~ label {
    color: #f59e0b;
}

.star-rating > label:hover ~ input:checked ~ label {
    color: #d1d5db;
}
/* Menu item hover effect */
.menu-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Price tag styling */
.price-tag {
  position: relative;
  padding-left: 1.5rem;
}

.price-tag::before {
  content: '₹';
  position: absolute;
  left: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8em;
  opacity: 0.8;
}

/* Vegetarian indicator */
.veg-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: #10b981;
  border-radius: 2px;
  position: relative;
  top: 1px;
  margin-right: 4px;
}

.veg-indicator::after {
  content: '';
  position: absolute; 
  top: -3px;
  left: -3px;
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background-color: #10b981;
  z-index: -1;
}