/**
 * RMG-NexGN Rozana - Family Market Mode & Voice Support Styles
 * Sprint S1.0.2 & Patch S1.0.2-P1
 * Mobile-First Responsive Design matched to Visual Reference
 */

:root {
  --market-primary: #4F46E5;
  --market-accent: #7C3AED;
  --market-rose: #E11D48;
  --market-success: #10B981;
  --market-warning: #F59E0B;
  --market-danger: #DC2626;
  --market-border: #E2E8F0;
  --market-surface: #FFFFFF;
  --market-surface-alt: #F8FAFC;
  --market-text-main: #0F172A;
  --market-text-muted: #64748B;
}

/* =========================================================================
   CONTAINER & LAYOUT
   ========================================================================= */
.rz-market-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px;
  width: 100%;
}

@media (max-width: 768px) {
  .rz-market-wrapper {
    padding: 12px 14px 90px 14px;
  }
}

/* Dual Layout Grid: Mobile Device Preview & Desktop Dashboard Reflow */
.rz-market-grid-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1024px) {
  .rz-market-grid-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Phone Mockup Frame */
.rz-market-phone-shell {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 36px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 820px;
}

@media (max-width: 500px) {
  .rz-market-phone-shell {
    border-radius: 0;
    border: none;
    box-shadow: none;
    max-width: 100%;
    min-height: 100vh;
  }
}

/* Phone Status Bar */
.rz-market-phone-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px 4px 20px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  background: #FFFFFF;
}

/* Phone Top Header */
.rz-market-appbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px 12px 18px;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
}

.rz-market-appbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
}

/* Date Banner */
.rz-market-date-banner {
  padding: 12px 18px 6px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #334155;
}

/* 3 KPI Metric Badges (Screen 2) */
.rz-market-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 6px 18px 14px 18px;
}

.rz-market-kpi-pill {
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: transform 0.15s ease;
}

.rz-market-kpi-pill:hover {
  transform: translateY(-1px);
}

.rz-market-kpi-pill.total {
  background: #EFF6FF;
  border-color: #DBEAFE;
  color: #1D4ED8;
}

.rz-market-kpi-pill.completed {
  background: #ECFDF5;
  border-color: #D1FAE5;
  color: #047857;
}

.rz-market-kpi-pill.pending {
  background: #FFFBEB;
  border-color: #FEF3C7;
  color: #B45309;
}

.rz-market-kpi-num {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.rz-market-kpi-text {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: capitalize;
}

/* =========================================================================
   GRAND TOTAL OF EXPENSES & EXPENSE PROMPT STYLES
   ========================================================================= */
.rz-market-grand-total-card {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border: 1px solid #BBF7D0;
  border-radius: 14px;
  padding: 10px 14px;
  margin: 0 18px 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.rz-market-grand-total-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #10B981;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.rz-market-grand-total-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.rz-market-grand-total-sub {
  font-size: 0.72rem;
  color: #15803D;
  font-weight: 600;
  margin-top: 2px;
}

.rz-market-grand-total-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #047857;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.rz-market-expense-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #047857;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rz-market-expense-pill:hover {
  background: #D1FAE5;
  border-color: #6EE7B7;
  transform: translateY(-1px);
}

.rz-chip-btn {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rz-chip-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
  border-color: #94A3B8;
  transform: translateY(-1px);
}

/* Search Bar & Voice Mic Button (Screen 2) */
.rz-market-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 12px 18px;
}

.rz-market-search-input-wrap {
  position: relative;
  flex: 1;
}

.rz-market-search-input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  font-size: 0.84rem;
  color: #0F172A;
  outline: none;
  transition: all 0.15s ease;
}

.rz-market-search-input-wrap input:focus {
  border-color: #7C3AED;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.rz-market-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 14px;
  pointer-events: none;
}

.rz-market-voice-trigger-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED 0%, #6366F1 100%);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.rz-market-voice-trigger-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.4);
}

/* Filter Pills (Screen 2) */
.rz-market-filter-tabs {
  display: flex;
  gap: 8px;
  padding: 0 18px 12px 18px;
  overflow-x: auto;
}

.rz-market-filter-pill {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  border: none;
  background: #F1F5F9;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.rz-market-filter-pill.active {
  background: #2563EB;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* Checklist Items Container */
.rz-market-item-list {
  padding: 0 18px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}

/* Item Card (Touch First, Large Target, Draggable) */
.rz-market-item-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
  user-select: none;
}

.rz-market-item-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.rz-market-item-card.is-completed {
  background: #F8FAFC;
  border-color: #E2E8F0;
  opacity: 0.85;
}

/* Drag Handle Grip */
.rz-market-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  cursor: grab;
  user-select: none;
  touch-action: none;
  padding: 4px 4px 4px 0;
  font-size: 15px;
  line-height: 1;
  letter-spacing: -2px;
  font-weight: 900;
  transition: color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.rz-market-drag-handle:hover {
  color: #4F46E5;
  transform: scale(1.15);
}

.rz-market-drag-handle:active {
  cursor: grabbing;
}

/* Card Dragging States */
.rz-market-item-card.is-dragging {
  opacity: 0.4;
  background: #EEF2FF;
  border: 2px dashed #6366F1 !important;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
  transform: scale(0.98);
}

.rz-market-item-card.drag-over-above {
  border-top: 3px solid #4F46E5 !important;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.rz-market-item-card.drag-over-below {
  border-bottom: 3px solid #4F46E5 !important;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* Custom Checkbox */
.rz-market-checkbox-wrap {
  cursor: pointer;
  padding-top: 2px;
}

/* Small Icon Badge in Main Checklist Card */
.rz-market-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.rz-market-item-card:hover .rz-market-icon-badge {
  transform: scale(1.08);
  background: #EEF2FF;
  border-color: #C7D2FE;
}

.rz-market-item-card.is-completed .rz-market-icon-badge {
  opacity: 0.55;
  filter: grayscale(0.6);
  background: #F1F5F9;
}

.rz-market-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  background: #FFFFFF;
}

.rz-market-item-card.is-completed .rz-market-checkbox {
  background: #10B981;
  border-color: #10B981;
  color: #FFFFFF;
}

.rz-market-checkbox-tick {
  display: none;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.rz-market-item-card.is-completed .rz-market-checkbox-tick {
  display: block;
}

/* Item Content */
.rz-market-item-body {
  flex: 1;
  min-width: 0;
}

.rz-market-item-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}

.rz-market-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.25;
}

.rz-market-item-card.is-completed .rz-market-item-title {
  text-decoration: line-through;
  color: #94A3B8;
}

.rz-market-item-note {
  font-size: 0.78rem;
  color: #64748B;
  margin-top: 2px;
}

.rz-market-item-completed-by {
  font-size: 0.72rem;
  font-weight: 600;
  color: #059669;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Category Pill Badges */
.rz-market-cat-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.rz-market-cat-pill.dairy {
  background: #E0F2FE;
  color: #0284C7;
}

.rz-market-cat-pill.grocery {
  background: #DCFCE7;
  color: #16A34A;
}

.rz-market-cat-pill.self {
  background: #F3E8FF;
  color: #9333EA;
}

.rz-market-cat-pill.medical {
  background: #EDE9FE;
  color: #4F46E5;
}

.rz-market-cat-pill.payment {
  background: #E0F2FE;
  color: #0369A1;
}

.rz-market-cat-pill.household {
  background: #FEF3C7;
  color: #D97706;
}

/* Item Action Dropdown */
.rz-market-item-actions-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 14px;
  border-radius: 4px;
}

.rz-market-item-actions-btn:hover {
  color: #0F172A;
  background: #F1F5F9;
}

/* Item Meta Column on Right (Category & Direct Hard Delete) */
.rz-market-item-meta-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
  margin-left: 8px;
}

.rz-market-direct-delete-btn {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.2;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.rz-market-direct-delete-btn:hover {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

.rz-market-direct-delete-btn:active {
  transform: scale(0.95);
}

/* Bottom Sticky Actions (Screen 2) */
.rz-market-bottom-actions {
  display: flex;
  gap: 10px;
  padding: 12px 18px 16px 18px;
  background: #FFFFFF;
  border-top: 1px solid #F1F5F9;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.rz-market-btn-manual {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #7C3AED;
  background: #FFFFFF;
  color: #7C3AED;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.rz-market-btn-manual:hover {
  background: #FAF5FF;
}

.rz-market-btn-going {
  flex: 1.6;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
  transition: all 0.15s ease;
}

.rz-market-btn-going:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.45);
}

/* =========================================================================
   VOICE INPUT MODAL (SCREEN 3: "Speak Your Task")
   ========================================================================= */
.rz-voice-modal-dialog {
  max-width: 420px;
  width: 90%;
  background: #FFFFFF;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.rz-voice-mic-container {
  padding: 30px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Concentric Glowing Rings */
.rz-voice-pulse-ring-outer {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.rz-voice-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.25) 0%, rgba(236, 72, 153, 0.1) 70%, transparent 100%);
  animation: rzVoicePulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.rz-voice-pulse-ring.layer2 {
  inset: -15px;
  animation: rzVoicePulse 2s cubic-bezier(0, 0, 0.2, 1) infinite 0.6s;
  opacity: 0.6;
}

.rz-voice-mic-circle {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 50%, #EC4899 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
  position: relative;
  z-index: 2;
}

@keyframes rzVoicePulse {
  0% { transform: scale(0.85); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 0.4; }
  100% { transform: scale(0.85); opacity: 0.9; }
}

/* Audio Waveform Bars */
.rz-voice-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  margin: 12px 0 16px 0;
}

.rz-waveform-bar {
  width: 3.5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8B5CF6, #3B82F6);
  animation: rzWaveBar 1.2s ease-in-out infinite;
}

.rz-waveform-bar:nth-child(1) { height: 10px; animation-delay: 0.1s; }
.rz-waveform-bar:nth-child(2) { height: 18px; animation-delay: 0.2s; }
.rz-waveform-bar:nth-child(3) { height: 26px; animation-delay: 0.3s; }
.rz-waveform-bar:nth-child(4) { height: 14px; animation-delay: 0.4s; }
.rz-waveform-bar:nth-child(5) { height: 30px; animation-delay: 0.2s; }
.rz-waveform-bar:nth-child(6) { height: 20px; animation-delay: 0.5s; }
.rz-waveform-bar:nth-child(7) { height: 12px; animation-delay: 0.15s; }

@keyframes rzWaveBar {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1.2); }
}

/* Voice Suggestions Pill List */
.rz-voice-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0 20px 20px 20px;
}

.rz-voice-suggestion-chip {
  padding: 9px 14px;
  border-radius: 999px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.rz-voice-suggestion-chip:hover {
  background: #EDE9FE;
  border-color: #C4B5FD;
  color: #6D28D9;
}

/* =========================================================================
   VOICE CONFIRMATION MODAL (SCREEN 4: "Confirm Voice Task")
   ========================================================================= */
.rz-confirm-preview-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px;
  margin: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.rz-confirm-preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #FEE2E2;
  color: #DC2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.rz-confirm-table {
  width: 100%;
  padding: 0 20px;
  margin-bottom: 20px;
  text-align: left;
  font-size: 0.82rem;
}

.rz-confirm-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #F1F5F9;
}

.rz-confirm-label {
  color: #64748B;
  font-weight: 600;
}

.rz-confirm-val {
  color: #0F172A;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================================
   TASK ADDED FEEDBACK MODAL (SCREEN 5: "Task Added!")
   ========================================================================= */
.rz-task-added-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #10B981;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 20px auto 14px auto;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}

/* =========================================================================
   SAFE CLEAR MODAL (SCREEN 6: "Clear Today's Market List?")
   ========================================================================= */
.rz-clear-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 20px;
}

.rz-clear-stat-box {
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.rz-clear-stat-box.completed {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.rz-clear-stat-box.pending {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.rz-clear-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.rz-clear-stat-lbl {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
}

/* =========================================================================
   GOING TO MARKET MODE (FULLSCREEN SHOPPING TRIP MODE)
   ========================================================================= */
/* =========================================================================
   FULLSCREEN OVERLAY: "I'M GOING TO MARKET" FOCUSED TRIP MODE (PREMIUM)
   ========================================================================= */
.rz-going-market-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, #1E293B 0%, #0F172A 60%, #020617 100%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  color: #FFFFFF;
  overflow-y: auto;
  animation: rzGoingFadeIn 0.22s ease;
}

@keyframes rzGoingFadeIn {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.rz-going-market-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.rz-going-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rz-going-header-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.rz-going-header-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #F8FAFC;
  line-height: 1.2;
}

.rz-going-header-sub {
  font-size: 0.76rem;
  color: #94A3B8;
  margin-top: 2px;
}

.rz-going-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rz-going-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #F87171;
  transform: scale(1.08);
}

/* Sub-header Bar with Stats & Animated Progress */
.rz-going-market-subbar {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 76px;
  z-index: 9;
}

.rz-going-counter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.rz-going-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38BDF8;
  box-shadow: 0 0 10px #38BDF8;
  animation: rzPulseGlow 1.8s infinite;
}

@keyframes rzPulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.rz-going-percent-badge {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  transition: all 0.3s ease;
}

.rz-going-progress-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.rz-going-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38BDF8 0%, #10B981 100%);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Checklist Items Container in High Contrast */
#goingTripListContainer {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

/* Individual Item Row in High Contrast Mode */
.rz-going-item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  position: relative;
}

.rz-going-item-row:hover {
  background: rgba(51, 65, 85, 0.65);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.rz-going-item-row:active {
  transform: scale(0.99);
}

.rz-going-item-row.done {
  opacity: 0.45;
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.15);
  box-shadow: none;
}

.rz-going-checkbox {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid rgba(148, 163, 184, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  background: rgba(15, 23, 42, 0.5);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.rz-going-item-row:hover .rz-going-checkbox {
  border-color: #38BDF8;
}

.rz-going-item-row.done .rz-going-checkbox {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-color: #10B981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.rz-going-checkbox-tick {
  line-height: 1;
}

/* Small Icon Badge */
.rz-going-item-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rz-going-item-row:hover .rz-going-item-icon-badge {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.12);
}

.rz-going-item-row.done .rz-going-item-icon-badge {
  opacity: 0.5;
  filter: grayscale(0.5);
}

/* Text info */
.rz-going-item-info {
  flex: 1;
  min-width: 0;
}

.rz-going-item-text {
  font-size: 1rem;
  font-weight: 700;
  color: #F8FAFC;
  line-height: 1.3;
  transition: color 0.15s ease;
}

.rz-going-item-row.done .rz-going-item-text {
  text-decoration: line-through;
  color: #64748B;
}

.rz-going-item-sub {
  font-size: 0.82rem;
  color: #94A3B8;
  margin-top: 3px;
}

/* Category Badge in Overlay */
.rz-going-item-cat-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.rz-going-item-cat-badge.cat-dairy {
  background: rgba(2, 132, 199, 0.18);
  color: #38BDF8;
  border-color: rgba(56, 189, 248, 0.35);
}

.rz-going-item-cat-badge.cat-grocery {
  background: rgba(22, 163, 74, 0.18);
  color: #4ADE80;
  border-color: rgba(74, 222, 128, 0.35);
}

.rz-going-item-cat-badge.cat-medical {
  background: rgba(124, 58, 237, 0.2);
  color: #C4B5FD;
  border-color: rgba(196, 181, 253, 0.35);
}

.rz-going-item-cat-badge.cat-payment {
  background: rgba(234, 179, 8, 0.2);
  color: #FDE047;
  border-color: rgba(253, 224, 71, 0.35);
}

.rz-going-item-cat-badge.cat-household {
  background: rgba(249, 115, 22, 0.2);
  color: #FB923C;
  border-color: rgba(251, 146, 60, 0.35);
}

.rz-going-item-cat-badge.cat-self {
  background: rgba(168, 85, 247, 0.2);
  color: #E9D5FF;
  border-color: rgba(233, 213, 255, 0.35);
}

/* Bottom Action Footer */
.rz-going-market-footer {
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.rz-going-finish-btn {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: block;
  padding: 15px 24px;
  font-size: 1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: none;
  border-radius: 14px;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.rz-going-finish-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.rz-going-finish-btn:active {
  transform: scale(0.99);
}

/* =========================================================================
   COMMAND CHEATSHEET & DESKTOP COMPANION SECTION
   ========================================================================= */
.rz-market-desktop-panel {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.rz-cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 900px) {
  .rz-cheatsheet-grid {
    grid-template-columns: 1fr;
  }
}

.rz-cheatsheet-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px;
}

.rz-cheatsheet-tag {
  display: inline-block;
  padding: 6px 10px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.74rem;
  color: #334155;
  font-weight: 600;
  margin-bottom: 6px;
  cursor: pointer;
  width: 100%;
  transition: all 0.15s ease;
}

.rz-cheatsheet-tag:hover {
  border-color: #7C3AED;
  color: #7C3AED;
  background: #FAF5FF;
}

.rz-cheatsheet-tag.danger {
  color: #DC2626;
  border-color: #FECACA;
  background: #FEF2F2;
}

.rz-cheatsheet-tag.danger:hover {
  border-color: #DC2626;
  background: #FEE2E2;
}

/* Bottom Feature Pillars Bar (Matched to Infographic Bottom) */
.rz-market-feature-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #E2E8F0;
}

.rz-feature-pillar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 12px;
}

.rz-feature-pillar-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  color: #FFFFFF;
}
