/* ═══════════════════════════════════════════════════════
   ARTCAFFE TABLE ORDERING STYLES
   Uses existing terracotta color palette from styles.css
   ═══════════════════════════════════════════════════════ */

/* ─── Table Info Banner ──────────────────────────────── */
#table-banner {
  background: var(--terracotta);
  color: white;
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 112;
  font-family: 'Gotham-Condensed-Bold';
}

#table-banner .table-location-name {
  font-family: 'Gotham-Condensed-Book';
  font-size: 0.8rem;
  opacity: 0.85;
}

/* ─── Cart Bottom Bar ────────────────────────────────── */
#cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 2.5px solid var(--terracotta);
  padding: 0.6rem 1rem;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
  align-items: center;
  justify-content: space-between;
}

#cart-bar .btn-view-cart {
  background: var(--terracotta);
  color: white;
  font-family: 'Gotham-Condensed-Bold';
  border: none;
  padding: 0.4rem 1.2rem;
  border-radius: 3px;
  font-size: 0.95rem;
}

/* ─── Add to Cart Buttons ────────────────────────────── */
.add-to-cart-btn {
  background: var(--terracotta);
  color: white;
  font-family: 'Gotham-Condensed-Bold';
  font-size: 0.85rem;
  border: none;
  border-radius: 3px;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.25rem 0;
  transition: background 0.2s, transform 0.1s;
}

.add-to-cart-btn:hover {
  background: var(--maroon);
}

.add-to-cart-btn:active {
  transform: scale(0.97);
}

/* Table row add button (inline for drinks/table displays) */
.add-to-cart-row-btn {
  background: var(--terracotta);
  color: white;
  font-family: 'Gotham-Condensed-Bold';
  font-size: 0.75rem;
  border: none;
  border-radius: 3px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
  transition: background 0.2s;
}

.add-to-cart-row-btn:hover {
  background: var(--maroon);
}

/* ─── Cart Offcanvas ─────────────────────────────────── */
#cartOffcanvas {
  font-family: 'Gotham-Condensed-Book';
  max-width: 90vw;
  width: 400px;
}

#cartOffcanvas .offcanvas-header {
  background: var(--terracotta);
  color: white;
}

#cartOffcanvas .offcanvas-title {
  font-family: 'Gotham-Condensed-Bold';
}

.cart-item {
  border-bottom: 1px solid var(--secondary-color);
  padding: 0.6rem 0;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-qty-btn {
  font-family: 'Gotham-Condensed-Bold';
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-footer {
  border-top: 2px solid var(--terracotta);
  padding-top: 0.8rem;
}

#cart-submit-btn {
  background: var(--terracotta);
  color: white;
  font-family: 'Gotham-Condensed-Bold';
  font-size: 1.1rem;
  border: none;
  border-radius: 3px;
  width: 100%;
  padding: 0.6rem;
  transition: background 0.2s;
}

#cart-submit-btn:hover:not(:disabled) {
  background: var(--maroon);
}

#cart-submit-btn:disabled {
  opacity: 0.5;
}

/* ─── Order Status Offcanvas ─────────────────────────── */
#orderStatusOffcanvas {
  font-family: 'Gotham-Condensed-Book';
  max-width: 90vw;
  width: 400px;
}

#orderStatusOffcanvas .offcanvas-header {
  background: var(--terracotta);
  color: white;
}

#orderStatusOffcanvas .offcanvas-title {
  font-family: 'Gotham-Condensed-Bold';
}

.order-status-card {
  transition: box-shadow 0.2s;
}

.order-status-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ─── Call Waiter FAB ────────────────────────────────── */
#call-waiter-fab {
  position: fixed;
  bottom: 4.5rem;
  right: 1rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--terracotta);
  color: white;
  border: none;
  box-shadow: 0 2px 10px rgba(155, 52, 35, 0.4);
  z-index: 999;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

#call-waiter-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(155, 52, 35, 0.5);
}

/* ─── My Orders / Status Button ──────────────────────── */
#my-orders-fab {
  position: fixed;
  bottom: 4.5rem;
  right: 4.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--light-terracotta);
  color: var(--terracotta);
  border: none;
  box-shadow: 0 2px 10px rgba(155, 52, 35, 0.3);
  z-index: 999;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

#my-orders-fab:hover {
  transform: scale(1.05);
}

/* ─── Change Table Modal ─────────────────────────────── */
#changeTableModal .modal-header {
  background: var(--terracotta);
  color: white;
}

#changeTableModal .modal-title {
  font-family: 'Gotham-Condensed-Bold';
}

#confirm-change-table {
  background: var(--terracotta);
  color: white;
  font-family: 'Gotham-Condensed-Bold';
  border: none;
}

/* ─── Past Orders Section ───────────────────────────── */
.past-orders-section {
  border-top: 1px solid var(--secondary-color);
  padding-top: 0.5rem;
}

.past-orders-toggle {
  font-family: 'Gotham-Condensed-Bold';
  transition: background 0.2s;
}

.past-orders-toggle:hover {
  background: var(--light-terracotta) !important;
}

.past-orders-toggle i.fa-chevron-down {
  transition: transform 0.3s;
}

.past-orders-toggle[aria-expanded="true"] i.fa-chevron-down {
  transform: rotate(180deg);
}

#past-orders-list .order-status-card {
  background: #fafafa;
}

/* ─── Body padding when cart bar is visible ───────────── */
body.ordering-mode {
  padding-bottom: 55px;
}

/* ─── Added item flash animation ─────────────────────── */
@keyframes addFlash {
  0% { box-shadow: 0 0 0 0 rgba(155, 52, 35, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(155, 52, 35, 0); }
  100% { box-shadow: 0 0 0 0 rgba(155, 52, 35, 0); }
}

.add-flash {
  animation: addFlash 0.4s ease-out;
}
