:root {
  --primary: #1e453e;
  --accent: #ffa10b;
  --soft-bg: #f9f9f9;
  --glass: rgba(255, 255, 255, 0.95);
  --lunch-bg: #fffdf5;
  --lunch-border: #ffecb3;
  --dinner-bg: #f0f4f8;
  --dinner-border: #cfd8dc;
}

@font-face {
  font-family: "Futura";
  src: local("Futura"), local("Futura-Medium");
}

.weekly-menu-wrap {
  background: var(--soft-bg);
  padding-bottom: 250px;
  font-family: "Futura", sans-serif;
}

/* HERO ACTIONS */
.hero-actions {
  text-align: center;
  margin-top: 15px;
}

@keyframes goldPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(255, 160, 0, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 25px rgba(255, 160, 0, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(255, 160, 0, 0.4);
  }
}

.chef-select-btn {
  background: linear-gradient(135deg, #ffd700, #ffa000);
  color: #1e453e;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 160, 0, 0.3);
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: goldPulse 2s infinite ease-in-out;
}
.chef-select-btn:hover {
  animation: none;
  transform: translateY(-2px) scale(1.05);
}
.chef-select-btn.reset-mode {
  background: #546e7a;
  color: white;
  box-shadow: 0 4px 15px rgba(84, 110, 122, 0.3);
  animation: none;
}

/* HERO */
.plan-hero {
  background: linear-gradient(135deg, var(--primary), #2c5e55);
  color: white;
  padding: 40px 15px 50px 15px;
  text-align: center;
  border-radius: 0 0 40px 40px;
  margin-bottom: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.plan-hero h1 {
  font-weight: 800;
  font-size: 2rem;
  margin: 0 0 5px 0;
}
.plan-hero p {
  opacity: 0.9;
  font-size: 0.95rem;
  margin: 0;
}

/* GRID - 1 COLUMN LIST VIEW FOR DAYS */
.week-grid {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Reduced gap for density */
  padding: 0 10px; /* Maximize width */
  max-width: 1000px;
  margin: 0 auto;
}

.day-col {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.day-header {
  background: var(--primary);
  color: white;
  padding: 10px;
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

/* DAY BODY - FORCE 2 COLUMNS ALWAYS */
.day-body {
  display: grid;
  grid-template-columns: 1fr 1fr; /* ALWAYS 2 Cols */
  border-bottom: 1px solid #eee;
}

.meal-section {
  padding: 5px; /* Minimal padding */
}
.meal-section.lunch {
  background: var(--lunch-bg);
  border-right: 1px dashed rgba(0, 0, 0, 0.1);
}
.meal-section.dinner {
  background: var(--dinner-bg);
}

/* Compact Meal Title */
.meal-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 900;
  margin: 5px 0 8px 0;
  text-align: center;
  letter-spacing: 0.5px;
}
.meal-title span {
  display: none;
} /* Hide icon to save space */
.meal-title small {
  display: none;
} /* Hide time to save space */
.meal-title.lunch {
  color: #f57f17;
}
.meal-title.dinner {
  color: #455a64;
}

/* CARDS - COMPACT MODE */
.dish-card {
  background: white;
  border-radius: 10px;
  padding: 0;
  margin-bottom: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.1s;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dish-card.selected {
  border-color: var(--accent);
  background: #fff8e1;
  box-shadow: 0 4px 12px rgba(255, 161, 11, 0.25);
}

.img-container {
  position: relative;
  overflow: hidden;
  height: 70px; /* Fixed small height */
  width: 100%;
}
.dish-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.chef-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--accent);
  color: var(--primary);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 0 0 6px 0;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.dish-info {
  padding: 8px 6px;
}
.dish-info h5 {
  font-size: 0.8rem;
  margin: 0;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.25;
  /* Allow full expansion */
  white-space: normal;
  overflow: visible;
}

.dish-check {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--accent);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s;
  z-index: 3;
  font-weight: bold;
}
.dish-card.selected .dish-check {
  opacity: 1;
  transform: scale(1);
}

/* --- WORLD CLASS FOOTER DESIGN --- */
.plan-footer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    backdrop-filter: blur(25px) saturate(180%);
    padding: 15px 25px;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1), 0 1px 1px rgba(255,255,255,0.5) inset;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    align-items: center;
    justify-content: space-between;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.6);
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Summary Block */
.summary-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.total-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    font-weight: 600;
}
.total-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: #333;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

/* Savings Tag */
.savings-tag {
    background: #e6f4ea;
    color: #1e7e34;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    visibility: hidden; /* Managed by JS */
}

/* Checkout Button */
.checkout-btn {
    background: #ffa10b; /* Brand Yellow */
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 161, 11, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 160px;
}
.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 161, 11, 0.5);
    background: #ffaa22;
}
.checkout-btn:active {
    transform: translateY(1px);
}

/* Delivery Toggle - Pill Design */
.delivery-toggle {
    display: flex;
    background: rgba(0,0,0,0.05); /* Light gray track */
    padding: 4px;
    border-radius: 50px; /* Pill shape */
    position: relative;
    border: 1px solid rgba(0,0,0,0.02);
}

.d-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.d-btn.active {
    background: #fff;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
}
/* Subtle color indication for delivery when active */
.d-btn:last-child.active {
    color: #d97706; /* Darker yellow/orange for text */
    background: #fff8e1; /* Very light yellow bg */
    border-color: #ffecb3;
}

/* Mobile Adjustments */
@media(max-width: 768px) {
    .plan-footer {
        flex-direction: column;
        bottom: 0px;
        left: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        padding: 20px 20px 30px 20px; /* Safe area for bottom */
        gap: 20px;
        width: 100%;
        max-width: 100%;
        -webkit-backdrop-filter: blur(30px) saturate(180%);
        backdrop-filter: blur(30px) saturate(180%);
        background: rgba(255, 255, 255, 0.92); /* More opaque on mobile */
    }
    
    .summary-block {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        align-items: baseline;
    }
    
    .delivery-toggle {
        width: 100%;
        justify-content: space-between;
    }
    .d-btn {
        flex: 1; /* Equal width buttons */
        text-align: center;
    }
    
    .checkout-btn {
        width: 100%;
        padding: 18px; /* Larger touch target */
        font-size: 1.1rem;
    }
}

.today-badge {
  background: #ff5722;
  color: white;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7em;
  vertical-align: middle;
  margin-left: 5px;
}
.day-col.current {
  border: 2px solid var(--primary);
}
.meal-section.locked {
  background: #eee;
}
.lock-msg {
  font-size: 0.8em;
  color: #d32f2f;
  font-weight: normal;
}

.dish-card.disabled {
  opacity: 0.6;
  pointer-events: none; /* Block clicks CSS-wise too */
  filter: grayscale(100%);
}
.overlay-lock {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
