/* ===================== ORDER STATE BAR COMPONENT ===================== */
/* Jawla pattern: Floating bottom bar */
.order-state-bar {
  position: fixed;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 90%;
  max-width: 400px;
  z-index: 110;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px var(--spacing-sm) calc(12px + var(--safe-area-bottom));
  border-radius: var(--radius-card);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-medium), opacity var(--transition-medium);
  will-change: transform, opacity;
}

.order-state-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.state-data-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-caption);
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.state-data-left .total-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.state-action-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
}

.state-action-center:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(184, 66, 30, 0.4);
}

.state-action-center:active {
  transform: translateY(0) scale(0.98);
}

.state-action-center:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.state-data-right {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--on-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.state-badge {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #271800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.order-state-bar[data-state="review"] .state-action-center {
  background: linear-gradient(135deg, var(--whatsapp-start), var(--whatsapp-end));
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.order-state-bar[data-state="review"] .state-action-center:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.order-state-bar[data-state="review"] .state-action-center:active {
  transform: translateY(0) scale(0.98);
  filter: brightness(1.05);
}

body.state-bar-active .menu-list,
body.state-bar-active .receipt-scroll {
  padding-bottom: calc(120px + var(--safe-area-bottom)) !important;
}
