/* ==========================================
   LOVABLE MOBILE PHONE SIMULATOR
   ========================================== */

.mobile-simulation-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  min-height: calc(100vh - 100px);
}

/* Smartphone Hardware Frame (Charcoal Bezel) */
.phone-frame {
  width: 360px;
  height: 720px;
  background: var(--charcoal);
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), inset 0 0 2px rgba(255,255,255,0.2);
  position: relative;
  border: 4px solid rgba(28, 28, 28, 0.8);
}

/* Speaker and Camera notch */
.phone-notch {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 24px;
  background: var(--charcoal);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.phone-speaker {
  width: 48px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.phone-camera {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

/* Smartphone screen */
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg-app); /* Warm cream base screen */
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.1);
}

/* Status Bar */
.phone-status-bar {
  height: 40px;
  padding: 12px 24px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--charcoal);
  z-index: 10;
  background: var(--bg-app);
}

.status-bar-icons {
  display: flex;
  gap: 6px;
}

/* Viewport Scroll Container */
.phone-viewport {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px 20px 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hide scrollbar in virtual phone screen */
.phone-viewport::-webkit-scrollbar {
  display: none;
}

.phone-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.phone-back-btn {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Profiles & job cards inside phone */
.mechanic-profile-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
}

.mechanic-jobs-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.mobile-job-card {
  border: 1px solid var(--border-color);
  background: var(--bg-app);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-fast);
}

.mobile-job-card:hover {
  border-color: var(--border-interactive);
}

.mobile-job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.mobile-job-vehicle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
}

.mobile-job-service {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.mobile-job-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Inspection Checklist Inside simulator */
.inspection-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#mobile-progress-text {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--charcoal);
}

.progress-bar-bg {
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--charcoal);
  width: 0%;
  transition: width 0.3s ease;
}

/* Checklist items list */
.checklist-item-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.checklist-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.checklist-item-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--charcoal);
}

.checklist-item-section {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Pass, Warn, Fail segmented control buttons */
.checklist-status-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.status-btn {
  padding: 6px 0;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.status-btn[data-status="pass"]:hover {
  border-color: var(--color-pass);
  color: var(--color-pass);
}

.status-btn[data-status="warn"]:hover {
  border-color: var(--color-warn);
  color: var(--color-warn);
}

.status-btn[data-status="fail"]:hover {
  border-color: var(--color-fail);
  color: var(--color-fail);
}

/* Selected button states */
.status-btn.selected[data-status="pass"] {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--color-pass);
  color: var(--color-pass);
  font-weight: 600;
}

.status-btn.selected[data-status="warn"] {
  background: rgba(217, 119, 6, 0.08);
  border-color: var(--color-warn);
  color: var(--color-warn);
  font-weight: 600;
}

.status-btn.selected[data-status="fail"] {
  background: rgba(220, 38, 38, 0.08);
  border-color: var(--color-fail);
  color: var(--color-fail);
  font-weight: 600;
}

.checklist-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 12px;
}

/* Mechanic tool action panel (mic and camera scan) */
.mechanic-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.tool-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-btn);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--charcoal);
  transition: all var(--transition-fast);
}

.tool-action-btn:hover {
  border-color: var(--border-interactive);
  background: var(--bg-hover);
}

/* Barcode items tags inside checklist */
#scanned-parts-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scanned-part-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  font-size: 0.72rem;
  border-radius: var(--radius-pill);
}

.scanned-part-badge i {
  color: var(--color-fail);
  cursor: pointer;
}

/* Mic Recording Waves */
.voice-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  width: 32px;
}

.wave-bar {
  width: 3px;
  height: 4px;
  background: var(--color-info);
  border-radius: var(--radius-pill);
  animation: bounceWave 0.6s ease-in-out infinite alternate;
}

.wave-bar:nth-child(2) {
  animation-delay: 0.15s;
  height: 12px;
}
.wave-bar:nth-child(3) {
  animation-delay: 0.3s;
  height: 8px;
}
.wave-bar:nth-child(4) {
  animation-delay: 0.45s;
  height: 14px;
}

@keyframes bounceWave {
  from { height: 4px; }
  to { height: 20px; }
}

/* Barcode Camera Simulator Overlay */
.scanner-viewport-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000; /* Camera black-out */
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 40px 20px 24px 20px;
}

.scanner-viewfinder {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.scanner-box {
  width: 200px;
  height: 100px;
  position: relative;
  z-index: 5;
}

.scanner-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: #fff;
  border-style: solid;
  border-width: 0;
}

.scanner-corner-tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.scanner-corner-tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.scanner-corner-bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.scanner-corner-br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

.scanner-laser {
  position: absolute;
  left: 5%;
  right: 5%;
  height: 2px;
  background: var(--color-fail);
  top: 30%;
  animation: sweepLaser 2s linear infinite alternate;
  box-shadow: 0 0 8px var(--color-fail);
  z-index: 6;
}

@keyframes sweepLaser {
  from { top: 30%; }
  to { top: 70%; }
}

.scanner-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  padding: 12px;
  line-height: 1.4;
}

/* Virtual home bar indicator */
.phone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--charcoal);
  border-radius: 2px;
  z-index: 10;
}
