/* ================================
   UNIVERSAL THEME VARIABLES
================================ */
/* REPLACE THIS BLOCK IN YOUR CSS */

/* GLOBAL SCREEN LOCK */
html, body {
  max-width: 100%;
  overflow-x: hidden; /* Forces the browser to cut off any 'saggy' edges */
  position: relative;
  margin: 0;
  padding: 0;
}






#authModal {
    display: none; /* Removed !important so JS can open it */
}




:root {
  --bg-page: #ffffff;        /* MAIN PAGE BACKGROUND */
  --bg-dark: #000000;        /* Header, modals, footer */
  --bg-card: #0b0b0b;
  --bg-overlay: rgba(0,0,0,0.85);
  --accent: #ffd700;         /* Install Now */
  --text-dark: #000000;
  --text-light: #ffffff;
  --text-muted: #6b7280;
  --border-dark: #222;
}

/* ================================
   GLOBAL RESET
================================ */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Makes buttons feel better on iPhone */
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background: var(--bg-page);
  color: var(--text-dark);
  padding-top: 60px;
  overflow-x: hidden; /* Prevents side-to-side wiggle */
  width: 100%;
}

/* 1. MIRA'S KITCHEN HEADER - ALWAYS AT THE VERY TOP (0px) */
header {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 0 10px; 
  display: flex;
  justify-content: space-between;
  align-items: center; /* Changed to center for better visual alignment */

  position: fixed;
  top: 0;         
  left: 0;
  right: 0;
  height: 115px; /* Slightly slimmed down */

  z-index: 10001; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* Adjust the banner to start exactly after the new header height */
#installBanner {
  top: 56px;
}






/* 2. INSTALL BANNER - SITS DIRECTLY UNDER THE 120px HEADER */
#installBanner {
  position: fixed;
  top: 100px;      /* UPDATED: Starts where the taller header ends */
  left: 0;
  right: 0;
  height: 80px;   
  background: #000;
  color: #fff;
  display: none;  
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  z-index: 10000;
  border-bottom: 2px solid var(--accent);
}

/* 3. PUSH PAGE CONTENT DOWN ONLY WHEN BANNER SHOWS */
/* 120px (Header) + 80px (Banner) = 200px total padding */
body.has-install-banner {
  padding-top: 195px; 
}




/* NEW: Space for when there is NO banner */
body {
  padding-top: 130px; 
}




/* ================================
   MENU GRID (WHITE PAGE)
================================ */
#menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 15px;
  background: var(--bg-page);
}

/* ================================
   DISH CARDS (DARK CARDS)
================================ */
/* ================================
   DISH CARDS (RESPONSIVE MATH)
================================ */
.dish {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 10px; /* Reduced slightly for more breathing room */
  border: 1px solid var(--border-dark);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0; /* THE IPHONE FIX: Allows card to shrink below content size */
  width: 100%;
}

.dish img,
.menu-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
  flex-shrink: 0; /* Stops image from distorting on small screens */
}


.dish h4 {
  margin: 0 0 5px;
  font-size: 1rem;
  color: var(--text-light);
}

.dish p {
  margin: 0 0 8px;
  font-weight: bold;
  color: var(--accent);
}

.dish small {
  font-size: 0.75rem;
  color: #b5b5b5;
}

/* ================================
   UNIVERSAL BUTTONS
================================ */
button,
.auth-btn {
  background: var(--accent) !important;
  color: #000 !important;
  border: none !important;
  font-weight: 900;
  border-radius: 10px;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

/* ================================
   MODALS & OVERLAYS
================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  justify-content: center;

  /* FIX: align modal from top, not center */
  align-items: flex-start;

  z-index: 9000;

  /* Leave space for header + banner */
  padding: 140px 20px 20px;

  overflow-y: auto;
}

.modal-content {
  background: var(--bg-card);
  padding: 24px;
  width: 90%; /* Responsive width */
  max-width: 380px; /* Limits size on big screens */
  border-radius: 20px;
  border: 1px solid var(--border-dark);
  color: var(--text-light);
}


/* ================================
   INPUTS
================================ */
input,
select,
textarea {
  background: #000;
  color: #fff;
  border: 1px solid var(--border-dark);
  padding: 12px;
  border-radius: 8px;
}

input::placeholder {
  color: #777;
}

/* ================================
   ICONS / BADGES
================================ */
#userPic {
  width: 32px;
  border-radius: 50%;
}

#mailbox {
  position: relative;
  cursor: pointer;
  font-size: 20px;
}

#mailCount {
  position: absolute;
  top: -6px;
  right: -10px;
  background: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
}

/* ================================
   TOAST
================================ */
.toast-msg {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: #ef4444;
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: bold;
  z-index: 9999;
  animation: slideUpHigh 2.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes slideUpHigh {
  0% { opacity: 0; bottom: 5vh; }
  15% { opacity: 1; bottom: 40vh; }
  80% { opacity: 1; bottom: 70vh; }
  100% { opacity: 0; bottom: 95vh; }
}

/* ================================
   ACTIVE ORDER STATUS
================================ */
/* ================================
   ACTIVE ORDER STATUS (THE PILL)
================================ */
#active-order-status {
  display: none; 
  flex-direction: row; 
  align-items: center;
  justify-content: space-between;
  position: fixed;
  
  top: 125px; /* Pushed down from 70px to clear the header */
  
  left: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px); 
  color: #fff;
  border: 2px solid #ffd700; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 10000;
  padding: 10px 18px;
  border-radius: 50px; 
  animation: slideInDown 0.5s ease-out;
  pointer-events: none; 
}

/* This pushes the order bar even lower ONLY if the install banner is showing */
body.has-install-banner #active-order-status {
  top: 205px; 
}


  
  /* CRITICAL: Allows clicks to pass through the BAR but stay on the BUTTON */
  pointer-events: none; 
}

#active-order-status button, 
#active-order-status span {
  /* CRITICAL: Brings back clickability to the specific elements */
  pointer-events: auto !important; 
}

@keyframes slideInDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#order-msg {
  font-size: 11px !important; /* Slightly smaller for better mobile fit */
  font-weight: 700 !important;
  text-transform: uppercase;
  max-width: 60%; /* Prevents text from pushing the button off-screen */
}

#countdown {
  font-size: 18px !important;
  font-weight: 900 !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Add this for a nice click effect on the OK button */
#active-order-status button:active {
  transform: scale(0.92);
  opacity: 0.8;
}


.pointing-finger {
  display: inline-block;
  animation: bounceUp 1s infinite;
  font-size: 16px;
}

@keyframes bounceUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}





/* ================================
   FOOTER THEME (BLACK)
================================ */
footer {
  background: var(--bg-dark) !important;
  color: var(--text-light) !important;
  border-top: 2px solid var(--accent);
}

/* Footer text */
footer h2,
footer p,
footer strong,
footer span {
  color: var(--text-light) !important;
}

/* Footer buttons */
footer button {
  background: var(--accent) !important;
  color: #000 !important;
  border: none !important;
}





/* ================================
   USER PROFILE OVERLAY (BLACK THEME)
================================ */
#profileOverlay {
  background: var(--bg-dark) !important;
  color: var(--text-light) !important;
}

/* Top profile header */
#profileOverlay > div:first-child {
  background: var(--bg-dark) !important;
  color: var(--text-light) !important;
  border-bottom: 2px solid var(--accent);
}

/* Profile name & email */
#profName,
#profEmail {
  color: var(--text-light) !important;
}

/* Back button */
#profileOverlay button {
  background: var(--accent) !important;
  color: #000 !important;
  border: none !important;
  font-weight: 900;
}



/* ================================
   CHAT SECTION – FINAL THEME
================================ */

/* Chat container */
#chatBox {
  background: #f5f5f5 !important;
  border: 1px solid #ddd;
}

/* ADMIN MESSAGES (GREEN + WHITE TEXT) */
.msg-admin {
  background: #065f46 !important; /* deep green */
  color: #ffffff !important;
  border-radius: 16px;
  padding: 10px 14px;
  max-width: 85%;
  align-self: flex-start;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* USER MESSAGES (GRAY + YELLOW TEXT) */
.msg-user {
  background: #3a3a3a !important; /* dark gray */
  color: #ffd700 !important;     /* yellow text */
  border-radius: 16px;
  padding: 10px 14px;
  max-width: 85%;
  align-self: flex-end;
  margin-left: auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Images inside chat */
.chat-img {
  border-radius: 12px;
  margin-top: 6px;
}

/* Message badge (unread count) */
.msg-badge {
  background: #ffd700;
  color: #000;
  border: 2px solid #fff;
}




/* ================================
   ADMIN THEME VARIABLES
================================ */
:root {
  --admin-bg-page: #ffffff;
  --admin-bg-dark: #000000;
  --admin-bg-card: #0b0b0b;
  --admin-accent: #065f46; /* Admin green stays meaningful */
  --admin-warning: #fbbf24;
  --admin-danger: #ef4444;
  --admin-text-dark: #000;
  --admin-text-light: #fff;
  --admin-border: #ddd;
}



/* ================================
   ADMIN HEADER
================================ */
#adminDashboard header {
  background: var(--admin-bg-dark) !important;
  color: var(--admin-text-light) !important;
  border-bottom: 2px solid var(--admin-accent);
}

#adminDashboard header h1 {
  color: var(--admin-text-light);
}

#adminDashboard header button {
  background: var(--admin-danger) !important;
  color: #fff !important;
}

#cart-badge {
  position: absolute;
  top: -62%; 
  left: 50%;
  transform: translate(-50%, -50%);
  background: red;
  color: white;
  font-size: 17px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}









.admin-section {
  background: #0b0b0b;
  color: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid #222;
}

.admin-section h2 {
  margin-top: 0;
  color: #ffd700;
}

.admin-section label {
  display: block;
  margin: 10px 0;
  font-weight: 600;
}

.admin-section textarea,
.admin-section input[type="text"] {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #000;
  color: #fff;
  border: 1px solid #333;
}

.time-row {
  display: flex;
  gap: 10px;
}

.admin-save-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 10px;
}



/* Breathing Pulse for Promo Items */
@keyframes promoPulse {
  0% {
    border-color: #ffd700; /* Yellow */
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
  }
  50% {
    border-color: #ffffff; /* White */
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.02); /* Slight zoom in */
  }
  100% {
    border-color: #ffd700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
  }
}

/* Apply this class via JavaScript */
.promo-animate {
  animation: promoPulse 2s infinite ease-in-out;
  z-index: 1; /* Ensure it stays above non-promo items */
}



.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 20000;
  display: none; /* Controlled by JS */
  flex-direction: column;
  overflow-y: auto; /* Allows scrolling if history is long */
}




/* Add this to your style.css for a cleaner look */
.profile-close-btn {
  position: absolute;
  top: 20px;
  background: rgba(255, 255, 255, 0.2) !important; /* Semi-transparent white */
  backdrop-filter: blur(5px); /* Blurs the background behind the button */
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-close-btn:hover {
  background: rgba(255, 255, 255, 0.4) !important;
}



/* Ensure Profile Overlay covers the full screen correctly */
#profileOverlay {
  position: fixed;
  inset: 0;
  background: var(--bg-dark) !important; /* Uses your defined Black theme */
  color: var(--text-light) !important;
  z-index: 20000;
  display: none; /* Controlled by toggleProfile() script */
  flex-direction: column;
  overflow-y: auto; /* Allows scrolling through Order History */
}

/* Ensure buttons remain circular and centered */
#profileOverlay button {
  transition: transform 0.2s ease;
}

#profileOverlay button:active {
  transform: scale(0.9);
}



#highlightBox {
    transition: opacity 0.5s ease-in-out;
    min-height: 200px; /* Space for two paragraphs */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
}

#installPreloader h2 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}


#chatInput {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    word-break: break-word;
    max-height: 120px;
    min-height: 40px;
    
    /* Colors requested */
    background: #111111;     /* Dark background */
    color: #ffd700;          /* Golden Yellow text */
    
    border-radius: 8px;      /* Slight roundness to look better against the dark bg */
    overflow-y: auto;
}

/* Optional: change placeholder color to be visible on dark */
#chatInput::placeholder {
    color: rgba(255, 215, 0, 0.5); 
}


/* Restricts the size of images in the chat bubbles */
.chat-img {
    max-width: 100%;       /* Ensures it doesn't overflow the bubble */
    max-height: 180px;      /* Keeps the chat scannable */
    width: auto;
    height: auto;
    border-radius: 10px;
    margin-top: 5px;
    display: block;
    cursor: pointer;
    object-fit: cover;      /* Prevents image distortion */
    border: 1px solid rgba(0,0,0,0.1);
}

/* Optional: Add a slight hover effect to show it's clickable */
.chat-img:hover {
    opacity: 0.9;
}



/* Pulse animation for the User/Inbox icon */
.pulse-red {
  animation: pulse-red-animation 1.5s infinite;
  border-radius: 50%;
}

@keyframes pulse-red-animation {
  0% { box-shadow: 0 0 0 0px rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0px rgba(239, 68, 68, 0); }
}






/* --- Styles moved from index.html --- */
#recaptcha-container {
    position: relative;
    margin: 15px auto;
    display: flex;
    justify-content: center;
    z-index: 9999;
}

.brand-name { 
    font-family: 'Georgia', serif; 
    font-size: 1.5rem;
    font-weight: 900; 
    color: #ffffff; 
    margin: 0; 
    cursor: pointer;
    white-space: nowrap;
}

.section-title { 
    padding: 10px 15px; 
    font-size: 1.2rem; 
    color: #1e293b; 
    font-weight: 800; 
    border-bottom: 3px solid #065f46; 
    margin: 10px 15px; 
    display: inline-block; 
}

.chat-msg { margin-bottom: 10px; padding: 10px 14px; border-radius: 15px; max-width: 85%; font-size: 14px; position: relative; }
.msg-admin { background: #e2e8f0; align-self: flex-start; border-bottom-left-radius: 2px; }
.msg-user { background: #065f46; color: white; align-self: flex-end; margin-left: auto; border-bottom-right-radius: 2px; }

.auth-btn { width: 100%; padding: 12px; margin-bottom: 10px; border-radius: 8px; font-weight: bold; border: 1px solid #ddd; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; background: white; }

.msg-badge { position: absolute; top: -5px; right: -5px; background: #ef4444; color: white; font-size: 10px; padding: 2px 6px; border-radius: 10px; font-weight: bold; border: 2px solid white; }

.history-card { background: #f1f5f9; padding: 15px; border-radius: 12px; margin-bottom: 12px; border-left: 5px solid #065f46; cursor: pointer; }
