/* Additions for the static build: cart drawer, toasts, reservation success. */

:root {
  --ink: #0f0d0c;
  --cream: #f4ebdd;
  --gold: #c9984a;
  --gold-soft: #e3bd77;
  --line: rgba(201, 152, 74, 0.18);
  --panel: #191512;
}

.es-hide { display: none !important; }

/* cart badge on the header button */
.es-cart-btn { position: relative; }
.es-count {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  box-shadow: 0 0 0 2px #0f0d0c;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(160deg, #e3bd77, #c9984a 55%, #a97c33);
  color: #1a1208;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* drawer */
.es-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
}
.es-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
  animation: esFade 0.22s ease both;
}
.es-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 27rem;
  height: 100%;
  background: #12100e;
  border-inline-start: 1px solid var(--line);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  animation: esSlide 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes esFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes esSlide { from { transform: translateX(var(--es-from, 100%)); } to { transform: translateX(0); } }
[dir="rtl"] .es-panel { --es-from: -100%; }

.es-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.es-head h2 { font-size: 1rem; font-weight: 600; color: var(--cream); margin: 0; }
.es-close {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 152, 74, 0.25);
  color: #d8c9b2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
}
.es-body { flex: 1; overflow-y: auto; padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: 0.75rem; }
.es-empty { text-align: center; color: #a89a86; padding: 2.5rem 0.5rem; font-size: 0.9rem; }
.es-empty strong { display: block; color: var(--cream); font-size: 1rem; margin-bottom: 0.35rem; }

.es-item { display: flex; gap: 0.75rem; padding: 0.65rem; border: 1px solid rgba(201, 152, 74, 0.12); border-radius: 1rem; background: var(--panel); }
.es-item img { width: 64px; height: 64px; border-radius: 0.7rem; object-fit: cover; flex: none; background: #241d17; }
.es-item-main { flex: 1; min-width: 0; }
.es-item-name { font-size: 0.85rem; font-weight: 600; color: var(--cream); }
.es-item-price { font-size: 0.8rem; color: var(--gold-soft); margin-top: 0.15rem; font-variant-numeric: tabular-nums; }
.es-qty { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.45rem; }
.es-qty button {
  width: 1.7rem; height: 1.7rem; border-radius: 0.55rem; border: 1px solid rgba(201, 152, 74, 0.25);
  color: var(--gold-soft); background: transparent; cursor: pointer; font-size: 0.9rem; line-height: 1;
}
.es-qty span { min-width: 1.4rem; text-align: center; font-size: 0.85rem; color: var(--cream); font-variant-numeric: tabular-nums; }
.es-remove { margin-inline-start: auto; align-self: flex-start; color: #8a7a63; background: none; border: 0; cursor: pointer; font-size: 0.75rem; }

.es-foot { border-top: 1px solid var(--line); padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: 0.6rem; }
.es-line { display: flex; justify-content: space-between; font-size: 0.82rem; color: #a89a86; }
.es-line b { color: var(--cream); font-weight: 600; font-variant-numeric: tabular-nums; }
.es-total { font-size: 0.95rem; color: var(--cream); }
.es-total b { color: var(--gold-soft); font-size: 1.05rem; }
.es-note { width: 100%; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(201, 152, 74, 0.2); border-radius: 0.85rem; padding: 0.6rem 0.75rem; color: var(--cream); font-size: 0.85rem; outline: none; resize: none; }
.es-warn { font-size: 0.72rem; color: #d79a6a; }
.es-order {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.8rem; border-radius: 0.85rem; border: 0; cursor: pointer;
  background: linear-gradient(160deg, #e3bd77, #c9984a 55%, #a97c33);
  color: #1a1208; font-weight: 600; font-size: 0.9rem; text-decoration: none;
}
.es-order[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* toast */
.es-toast {
  position: fixed;
  z-index: 90;
  inset-inline: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 5.5rem);
  margin-inline: auto;
  width: fit-content;
  max-width: 90vw;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(25, 21, 18, 0.96);
  border: 1px solid rgba(201, 152, 74, 0.35);
  color: var(--cream);
  font-size: 0.82rem;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.8);
  animation: esFade 0.2s ease both;
}

/* reservation */
.es-slot {
  border-radius: 0.75rem;
  border: 1px solid rgba(201, 152, 74, 0.18);
  color: #c9bda9;
  padding: 0.5rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  background: transparent;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.es-slot:hover { border-color: rgba(201, 152, 74, 0.45); }
.es-slot-on {
  border-color: rgba(201, 152, 74, 0.75) !important;
  background: rgba(201, 152, 74, 0.16);
  color: var(--gold-soft);
  font-weight: 600;
}
.es-slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.es-slot-empty { margin-top: 0.75rem; font-size: 0.8rem; color: #8a7a63; line-height: 1.7; }
.es-slot-empty b { display: block; color: #c9bda9; }

.es-success {
  border-radius: 1.5rem;
  border: 1px solid rgba(201, 152, 74, 0.18);
  background: var(--panel);
  padding: 1.5rem;
  text-align: center;
}
.es-success-icon {
  width: 3rem; height: 3rem; margin: 0 auto 0.9rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201, 152, 74, 0.14); color: var(--gold-soft);
  border: 1px solid rgba(201, 152, 74, 0.35);
}
.es-success h2 { font-size: 1.05rem; font-weight: 600; color: var(--cream); margin: 0 0 0.4rem; }
.es-success p { font-size: 0.85rem; color: #a89a86; line-height: 1.7; margin: 0 0 1.1rem; }
.es-success .es-detail {
  margin: 0 0 1.1rem; padding: 0.85rem; border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(201, 152, 74, 0.14);
  font-size: 0.8rem; color: #c9bda9; text-align: start; display: grid; gap: 0.35rem;
}
.es-success .es-detail div { display: flex; justify-content: space-between; gap: 0.75rem; }
.es-success .es-detail b { color: var(--cream); font-weight: 600; }
.es-link-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.8rem; border-radius: 0.85rem; text-decoration: none;
  background: linear-gradient(160deg, #e3bd77, #c9984a 55%, #a97c33);
  color: #1a1208; font-weight: 600; font-size: 0.9rem;
}
.es-ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; margin-top: 0.55rem; padding: 0.75rem; border-radius: 0.85rem;
  border: 1px solid var(--line); background: transparent; color: var(--cream);
  font-size: 0.85rem; cursor: pointer; text-decoration: none;
}
.es-mobile-sheet { position: fixed; inset: 0; z-index: 70; }
.es-mobile-sheet .es-panel { max-width: none; }
.es-mobile-sheet nav { display: flex; flex-direction: column; padding: 0.5rem 1rem 1.5rem; gap: 0.25rem; }
.es-mobile-sheet nav a { padding: 0.8rem 0.5rem; color: var(--cream); font-size: 0.95rem; text-decoration: none; border-bottom: 1px solid rgba(201, 152, 74, 0.1); }

/* the app shell scrolled inside <main> with a fixed header; keep the header pinned
   now that the page itself scrolls */
#root > div > header {
  position: sticky;
  top: 0;
  z-index: 40;
}
