/* Client Mobile View Styles */

.client-layout {
  min-height: 100vh;
  background: linear-gradient(180deg, #ecfdf5 0%, #f1f5f9 45%, #e2e8f0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  font-family: var(--font-sans);
}

.client-container {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 auto;
}

/* Header */
.client-header {
  background: #064e3b;
  color: white;
  padding: 16px 20px;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 15px rgba(6, 78, 59, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.client-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-brand-icon {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.client-brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.client-brand-sub {
  font-size: 0.75rem;
  color: #a7f3d0;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #34d399;
  box-shadow: 0 0 6px #34d399;
}

/* Main Ticket Card */
.ticket-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ticket-header-pill {
  margin-bottom: 12px;
}

.queue-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.my-queue-number {
  font-size: 4.2rem;
  font-weight: 900;
  color: var(--primary-dark);
  line-height: 1;
  letter-spacing: 2px;
  margin: 10px 0 16px 0;
  text-shadow: 0 2px 10px rgba(5, 150, 105, 0.15);
}

/* Dynamic Status Box */
.status-box {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.3s ease;
}

/* WAITING STATE */
.status-box.state-waiting {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.waiting-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #92400e;
}

.waiting-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-item {
  background: white;
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid #fef3c7;
}

.stat-item-label {
  font-size: 0.8rem;
  color: #78350f;
  font-weight: 500;
}

.stat-item-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #b45309;
  line-height: 1.2;
}

.stat-item-serving .stat-item-value {
  color: var(--primary);
}

/* SERVING STATE (CALLED) */
.status-box.state-serving {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.4);
  animation: pulse-serving-card 1.5s infinite;
}

@keyframes pulse-serving-card {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); }
  50% { transform: scale(1.02); box-shadow: 0 0 35px rgba(16, 185, 129, 0.8); }
}

.serving-call-header {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.serving-counter-target {
  font-size: 2.4rem;
  font-weight: 900;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin: 6px 0;
}

.serving-instruction {
  font-size: 0.95rem;
  color: #ecfdf5;
  font-weight: 500;
}

/* COMPLETED STATE */
.status-box.state-completed {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.completed-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #166534;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.completed-desc {
  font-size: 0.9rem;
  color: #15803d;
}

/* SKIPPED STATE */
.status-box.state-skipped {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.skipped-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #991b1b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.skipped-desc {
  font-size: 0.9rem;
  color: #b91c1c;
}

/* Search / Check Queue Section */
.search-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-field {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  outline: none;
}

.search-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Footer info */
.client-footer {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 10px;
  padding-bottom: 20px;
}

/* Header Actions & Language Toggle */
.client-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 2px;
}

.btn-lang-pill {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-lang-pill.active {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Language Selection Modal on Scan */
.client-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 20, 14, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.client-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.client-modal-card {
  background: #ffffff;
  border-radius: var(--radius-2xl);
  padding: 32px 24px;
  width: 100%;
  max-width: 390px;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3), 0 0 30px rgba(16, 185, 129, 0.2);
  border: 2px solid rgba(16, 185, 129, 0.3);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.client-modal-overlay.active .client-modal-card {
  transform: translateY(0) scale(1);
}

.modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #10b981, #047857);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #064e3b;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.95rem;
  color: #475569;
  margin-bottom: 24px;
  line-height: 1.4;
}

.lang-options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lang-select-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.lang-select-btn:hover,
.lang-select-btn:focus {
  border-color: #10b981;
  background: #ecfdf5;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.18);
}

.lang-select-btn .flag-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.lang-btn-text {
  display: flex;
  flex-direction: column;
}

.lang-btn-text strong {
  font-size: 1.1rem;
  color: #0f172a;
}

.lang-btn-text span {
  font-size: 0.8rem;
  color: #64748b;
}

