/*
=============================================================
  FILE 3: css/screens.css
  PURPOSE: Styles specific to each screen.
  CUSTOMISE: Edit each section to change how screens look.
=============================================================
*/

/* ══════════════════════════════════════════════════════
   WELCOME SCREEN
   The first thing customers see after scanning QR code
   ══════════════════════════════════════════════════════ */

#screen-welcome {
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle glow behind the restaurant name */
#screen-welcome::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 50% 30%,
    rgba(200, 169, 110, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* ── CUSTOMISE: Change 0.1 to 0.2 for a stronger glow ── */

.welcome-ornament {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto var(--space-md);
}

.welcome-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 700;        /* ← bold */
  font-style: italic;      /* ← italic */
  letter-spacing: 0.08em;
  color: #C8A96E;          /* ← gold colour hardcoded so it always shows */
  line-height: 1;
  margin-bottom: 0.45rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(200, 169, 110, 0.3); /* ← soft glow */
}

/* ── CUSTOMISE: Change letter-spacing for wider/narrower name ── */

.welcome-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-lg);
}

.welcome-table-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(200, 169, 110, 0.08);
  border: 1px solid rgba(200, 169, 110, 0.25);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: var(--space-lg);
}

.welcome-table-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

.welcome-desc {
  font-size: 0.88rem;
  color: #bdccda;
  line-height: 1.75;
  max-width: 300px;
  margin: 0 auto var(--space-lg);
  position: relative;
  z-index: 1;
}

.welcome-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
}

/* ══════════════════════════════════════════════════════
   MENU SCREEN
   ══════════════════════════════════════════════════════ */

#screen-menu {
  background: var(--onyx);
}

/* Cart button in the top bar */
.cart-topbar-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(200, 169, 110, 0.1);
  border: 1px solid rgba(200, 169, 110, 0.25);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 500;
  transition: var(--transition);
}

.cart-topbar-btn:hover {
  background: rgba(200, 169, 110, 0.18);
}

.cart-topbar-count {
  background: var(--gold);
  color: var(--onyx);
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* ── CATEGORY TABS ─────────────────────────────────── */
.category-tabs {
  display: flex;
  gap: 0;
  background: var(--charcoal);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 var(--space-md);
  overflow-x: auto;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex-shrink: 0;
  padding: 0.9rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  white-space: nowrap;
  transition: var(--transition);
}

.category-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.category-tab:hover:not(.active) {
  color: var(--white);
}

/* ── MENU CONTENT AREA ─────────────────────────────── */
.menu-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  /* Extra bottom padding so last item is not behind sticky bar */
  padding-bottom: 7rem;
}

.menu-section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 0.2rem;
}

.menu-section-count {
  font-size: 0.72rem;
  color: var(--silver);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-md);
}

.menu-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ── INDIVIDUAL MENU ITEM ──────────────────────────── */
.menu-item {
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1rem var(--space-md);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
  position: relative;
}

.menu-item.in-cart {
  border-color: rgba(200, 169, 110, 0.35);
}

.menu-item-info {
  flex: 1;
  min-width: 0;
}

.menu-item-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

/* ── CUSTOMISE: Change font-size to 1rem for bigger item names ── */

.menu-item-desc {
  font-size: 0.75rem;
  color: var(--silver);
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

/* ── DIETARY TAGS ──────────────────────────────────── */
.item-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}

.tag-veg   { background: rgba(45,122,79,0.18);  color: #5DC48A; }
.tag-spicy { background: rgba(139,32,32,0.18);  color: #F07070; }
.tag-chef  { background: rgba(200,169,110,0.14); color: var(--gold); }

/* ── ADD TO CART CONTROLS ──────────────────────────── */
.menu-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.menu-item-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gold);
  white-space: nowrap;
}

.add-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(200, 169, 110, 0.1);
  border: 1px solid rgba(200, 169, 110, 0.3);
  color: var(--gold);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}

.add-btn:hover {
  background: var(--gold);
  color: var(--onyx);
}

.qty-control {
  display: flex;
  align-items: center;
  background: var(--smoke);
  border: 1px solid var(--ash);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.qty-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1rem;
  transition: var(--transition);
}

.qty-btn:hover {
  background: rgba(200, 169, 110, 0.15);
}

.qty-num {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
  min-width: 22px;
  text-align: center;
}

/* ── STICKY ORDER BAR ──────────────────────────────── */
.order-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem var(--space-md) 1.5rem;
  background: linear-gradient(to top, rgba(15,15,15,1) 60%, transparent);
  z-index: 90;
}

.order-bar-inner {
  background: var(--gold);
  border-radius: var(--radius-pill);
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
  max-width: 480px;
  margin: 0 auto;
}

.order-bar-inner:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.order-bar-inner:active {
  transform: scale(0.98);
}

.order-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.order-bar-bubble {
  background: var(--onyx);
  color: var(--gold);
  border-radius: var(--radius-pill);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.order-bar-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--onyx);
}

.order-bar-total {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--onyx);
}

/* ══════════════════════════════════════════════════════
   CART SCREEN
   ══════════════════════════════════════════════════════ */

.cart-content {
  flex: 1;
  padding: var(--space-md);
  padding-bottom: 10rem;
  overflow-y: auto;
}

.cart-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-info       { flex: 1; }
.cart-item-name       { font-size: 0.9rem; font-weight: 500; color: var(--white); margin-bottom: 0.2rem; }
.cart-item-unit-price { font-size: 0.75rem; color: var(--silver); }

.cart-item-subtotal {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
  white-space: nowrap;
}

.remove-item-btn {
  background: none;
  border: none;
  color: var(--ash);
  font-size: 1rem;
  padding: 4px;
  transition: var(--transition);
}

.remove-item-btn:hover { color: #F07070; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
}

.cart-total-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
}

.cart-total-amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--white);
}

.cart-action-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ══════════════════════════════════════════════════════
   ORDER CONFIRMED SCREEN
   ══════════════════════════════════════════════════════ */

#screen-confirm {
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.confirm-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(45, 122, 79, 0.15);
  border: 2px solid rgba(45, 122, 79, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--space-md);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0%   { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

.confirm-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.confirm-subtitle {
  font-size: 0.88rem;
  color: var(--silver);
  line-height: 1.7;
  max-width: 280px;
  margin: 0 auto var(--space-lg);
}

.order-ref-box {
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem 2rem;
  margin-bottom: var(--space-lg);
  display: inline-block;
}

.order-ref-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 0.25rem;
}

.order-ref-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--gold);
}

.confirm-action-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
}

/* ══════════════════════════════════════════════════════
   MY ORDERS SCREEN
   ══════════════════════════════════════════════════════ */

.orders-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  padding-bottom: 7rem;
}

.order-round {
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.order-round-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.order-round-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
}

.order-round-time {
  font-size: 0.7rem;
  color: var(--ash);
}

.order-round-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--pearl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.order-round-item:last-of-type {
  border-bottom: none;
}

.order-item-qty {
  color: var(--silver);
  margin-right: 0.4rem;
}

.running-total-box {
  background: rgba(200, 169, 110, 0.07);
  border: 1px solid rgba(200, 169, 110, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--space-md) 0;
}

.running-total-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
}

.running-total-amount {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--gold);
}

.orders-action-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-sm);
}

/* ══════════════════════════════════════════════════════
   BILL SCREEN
   ══════════════════════════════════════════════════════ */

#screen-bill {
  background: var(--onyx);
}

.bill-header {
  text-align: center;
  padding: 2.5rem var(--space-md) var(--space-md);
  background: var(--charcoal);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bill-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.bill-subtitle {
  font-size: 0.78rem;
  color: var(--silver);
}

.bill-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  padding-bottom: 8rem;
}

.bill-section-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: var(--space-sm);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bill-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  font-size: 0.85rem;
  color: var(--pearl);
}

.bill-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: var(--space-sm) 0;
}

.bill-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
}

.bill-total-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
}

.bill-total-amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--white);
}

/* ── TIP SELECTOR ───────────────────────────────────── */
.tip-options {
  display: flex;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.tip-btn {
  flex: 1;
  padding: 0.7rem 0.4rem;
  background: var(--smoke);
  border: 1px solid var(--ash);
  border-radius: var(--radius-md);
  color: var(--silver);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
}

.tip-btn.selected {
  background: rgba(200, 169, 110, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

.tip-btn:hover:not(.selected) {
  border-color: var(--silver);
  color: var(--white);
}

.grand-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  margin-top: var(--space-sm);
}

.grand-total-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
}

.grand-total-amount {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--gold);
}

/* Pay button pinned to bottom */
.bill-pay-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem var(--space-md) 1.5rem;
  background: linear-gradient(to top, rgba(15,15,15,1) 60%, transparent);
}