/* 
 * Pay-Quick Interactive Demo Styles
 * Mobile-first, works inside hero section
 */

/* Container */
.demo-container {
  max-width: 340px;
  margin: 2rem auto 0;
}

/* Step Indicator */
.demo-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 0.5rem;
}

.demo-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.demo-step-dot.active {
  background: #0d6efd;
  color: white;
}

.demo-step-dot.completed {
  background: #198754;
  color: white;
}

.demo-step-line {
  width: 30px;
  height: 2px;
  background: #e9ecef;
  transition: background 0.3s ease;
}

.demo-step-line.active {
  background: #198754;
}

.demo-steps-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 500;
  color: #495057;
  margin-bottom: 1rem;
  padding: 0 0.25rem;
}

/* Phone Frame */
.demo-phone {
  background: #1a1a1a;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    inset 0 0 0 2px #333;
}

.demo-phone-notch {
  width: 80px;
  height: 24px;
  background: #1a1a1a;
  border-radius: 0 0 16px 16px;
  margin: 0 auto -12px;
  position: relative;
  z-index: 10;
}

.demo-phone-screen {
  background: #ffffff;
  border-radius: 24px;
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

/* Step transitions */
.demo-step {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.demo-step.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.demo-step.exit-left {
  transform: translateX(-20px);
}

/* Step 1: QR Scan */
.demo-qr-icon {
  color: #0d6efd;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.demo-text-muted {
  color: #495057;
  font-size: 0.9rem;
}

.demo-btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.demo-btn:hover {
  transform: translateY(-1px);
}

.demo-btn:active {
  transform: translateY(0);
}

/* Step 2: Menu */
.demo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.demo-table-badge {
  background: #0d6efd;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.demo-venue-name {
  font-weight: 600;
  color: #333;
}

.demo-menu-items {
  flex: 1;
  overflow-y: auto;
}

.demo-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.demo-menu-item:hover {
  background: #e9ecef;
}

.demo-menu-item.added {
  animation: itemAdded 0.3s ease;
}

@keyframes itemAdded {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); background: #d1e7dd; }
  100% { transform: scale(1); }
}

.demo-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.demo-item-name {
  font-weight: 600;
  font-size: 1rem;
  color: #212529;
}

.demo-item-price {
  color: #495057;
  font-size: 0.9rem;
  font-weight: 500;
}

.demo-add-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-add-btn.added {
  background: #198754;
  border-color: #198754;
  color: white;
}

/* Cart Summary */
.demo-cart-summary {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.demo-cart-items {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  min-height: 1.5rem;
}

.demo-cart-item {
  display: inline-block;
  background: #e7f1ff;
  color: #0d6efd;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Step 3: Checkout */
.demo-back-btn {
  cursor: pointer;
  color: #0d6efd;
  font-size: 0.875rem;
}

.demo-back-btn:hover {
  text-decoration: underline;
}

.demo-checkout-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.demo-order-summary {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.demo-order-line {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  font-size: 1rem;
  color: #212529;
}

.demo-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.35rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fff3cd;
  border-radius: 12px;
}

.demo-payment-method {
  margin-bottom: 1rem;
}

.demo-payment-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  color: #212529;
}

.demo-payment-option.selected {
  border-color: #0d6efd;
  background: #e7f1ff;
}

.demo-pay-btn {
  margin-top: auto;
}

.demo-pay-btn.loading {
  pointer-events: none;
  position: relative;
}

.demo-pay-btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  right: 1rem;
  top: 50%;
  margin-top: -10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Step 4: KDS */
.demo-kds-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.demo-kds-header {
  background: #212529;
  color: white;
  padding: 0.75rem 1rem;
  margin: -1.5rem -1rem 1rem;
  font-weight: 600;
}

.demo-kds-card {
  background: white;
  border: 2px solid #198754;
  border-radius: 12px;
  overflow: hidden;
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.demo-kds-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.demo-kds-table {
  font-weight: 700;
  font-size: 1rem;
  color: #212529;
}

.demo-kds-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #ffc107;
  color: #000;
  transition: all 0.3s ease;
}

.demo-kds-status.preparing {
  background: #0dcaf0;
  color: #000;
}

.demo-kds-status.ready {
  background: #198754;
  color: white;
}

.demo-kds-items {
  padding: 0.75rem 1rem;
}

.demo-kds-item {
  padding: 0.375rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: #212529;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.demo-kds-time {
  padding: 0.5rem 1rem;
  background: #d1e7dd;
  color: #0f5132;
  font-size: 0.9rem;
  font-weight: 600;
}

.demo-kds-message {
  text-align: center;
  margin: 1.5rem 0;
  color: #198754;
  font-size: 1rem;
  font-weight: 500;
}

.demo-restart-btn {
  margin-top: auto;
}

/* Step content centering for step 1 */
.demo-step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .demo-container {
    max-width: 360px;
  }
  
  .demo-phone-screen {
    min-height: 460px;
  }
}
