/* ═══════════════════════════════════════════════════════
   TayzoPrompter - Pace Mode Collaborative Simulation Styles
   ═══════════════════════════════════════════════════════ */

#pace-collab {
  background: radial-gradient(circle at 50% 100%, rgba(32, 61, 98, 0.08), transparent 70%), #06080d;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

/* Device stage container */
.pace-stage {
  max-width: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  position: relative;
  margin: 60px auto 0 auto;
  border-radius: 28px;
  padding: 24px;
  box-sizing: border-box;
}

/* Generic mock window shells */
.mock-device {
  background: #04060a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background-clip: padding-box;
  box-sizing: border-box;
}

/* Device Header / Titlebars */
.mock-titlebar {
  align-items: center;
  background: #0d0f14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-shrink: 0;
  height: 40px;
  padding: 0 16px;
  position: relative;
}

/* macOS traffic lights */
.mock-dots {
  display: flex;
  gap: 8px;
}
.mock-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.mock-dot.red { background: #ff5f56; }
.mock-dot.yellow { background: #ffbd2e; }
.mock-dot.green { background: #27c93f; }

.mock-title {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  left: 50%;
  letter-spacing: 0.02em;
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.mock-badge {
  align-items: center;
  background: rgba(135, 200, 248, 0.1);
  border: 1px solid rgba(135, 200, 248, 0.25);
  border-radius: 20px;
  color: #87c8f8;
  display: flex;
  font-family: var(--font-title);
  font-size: 8px;
  font-weight: 700;
  gap: 4px;
  letter-spacing: 0.1em;
  margin-left: auto;
  padding: 3px 8px;
  text-transform: uppercase;
}
.mock-badge .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #87c8f8;
  animation: pulse-badge 1.8s infinite;
}

@keyframes pulse-badge {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* 1. Main Talent Prompter Screen */
.talent-device {
  height: 380px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 480px;
  z-index: 2;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: flex-end;
}
.talent-device .device-inner {
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.talent-device.highlighted .device-inner {
  border-color: rgba(135, 200, 248, 0.35);
  box-shadow: 0 0 40px rgba(135, 200, 248, 0.12), 0 40px 80px rgba(0, 0, 0, 0.85);
}

.talent-viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #04060a;
}

.talent-canvas {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 130px 48px;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.talent-text {
  font-family: var(--font-body);
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.4);
  text-align: left;
}
.talent-text .pw {
  display: inline-block;
  padding: 0 4px;
  transition: color 0.3s ease;
}
.talent-text .pw.active-pace {
  color: #ffffff;
}

/* Guide assets */
.talent-device .focus-arrow {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  color: #87c8f8;
  opacity: 0.85;
}
.talent-device .guide-line {
  position: absolute;
  left: 44px;
  right: 44px;
  top: 50%;
  border-top: 1.5px dashed rgba(135, 200, 248, 0.35);
  transform: translateY(-50%);
  z-index: 9;
}

/* Toast alert overlay */
.pace-toast {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(13, 15, 20, 0.9);
  border: 1px solid rgba(135, 200, 248, 0.25);
  padding: 8px 16px;
  border-radius: 30px;
  color: #87c8f8;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.pace-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* 2. Phone Remote Operator Device */
.operator-device {
  height: 380px;
  flex: 0 0 auto;
  max-width: 0;
  opacity: 0;
  transform: translate3d(0, 40px, 0) scale(0.95);
  overflow: hidden;
  z-index: 5;
  border: 0px solid #111115; /* phone frame bezel starts collapsed */
  border-radius: 36px; /* modern smartphone rounded corners */
  transition: max-width 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.operator-device.visible {
  max-width: 296px; /* content 280px + phone bezel 16px */
  opacity: 1;
  border-width: 8px; /* thick premium phone bezel */
  transform: translate3d(0, 0, 0) scale(1);
}
.operator-device.highlighted {
  border-color: #272a33;
  box-shadow: 0 0 35px rgba(91, 127, 255, 0.1), 0 30px 60px rgba(0, 0, 0, 0.85);
}

.operator-content {
  flex: 1;
  background: #0a0a0f; /* rp002 bg-primary */
  display: flex;
  flex-direction: column;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

/* Emulating rp002 screens */
.operator-view {
  display: none;
  flex: 1;
  flex-direction: column;
  height: 100%;
}
.operator-view.active {
  display: flex;
}

/* WPM / Font Adjust Layout elements (Emulating rp002 styles.css) */
.collab-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.collab-btn {
  flex: 1;
  background: #222240; /* rp002 bg-elevated */
  border: none;
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 10px;
  box-sizing: border-box;
  transition: background 0.15s, transform 0.1s;
}
.collab-btn:active {
  transform: scale(0.96);
}
.collab-btn.active-play {
  background: #5b7fff; /* rp002 accent */
}
.collab-btn svg {
  fill: currentColor;
}
.collab-btn .btn-lbl {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.85;
}

/* Mode Segmented Controls */
.collab-segmented {
  display: flex;
  background: #0a0a0f;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.collab-segment {
  flex: 1;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 6px;
  cursor: pointer;
  text-align: center;
}
.collab-segment.active {
  background: #5b7fff;
  color: #ffffff;
}

/* Slider values adjust panel */
.collab-slider-panel {
  background: #141420; /* bg-secondary */
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}
.collab-slider-lbl {
  font-family: var(--font-body);
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.collab-slider-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #222240;
  border-radius: 8px;
  padding: 4px;
}
.collab-adjust {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.collab-adjust-val {
  font-family: var(--font-body);
  font-size: 11px;
  color: #ffffff;
  font-weight: 600;
  min-width: 42px;
  text-align: center;
}

/* Sidebar Preview Panel */
.collab-preview {
  background: #1a1a2e; /* rp002 bg-card */
  border-radius: 10px;
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 65%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 65%, transparent 100%);
}
.collab-preview-scroll {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.collab-preview-text {
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255,255,255,0.4);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}
.collab-preview-text .pw {
  display: inline;
}
.collab-preview-text .pw.active-pace {
  color: #ffffff;
  position: relative;
  z-index: 1;
}
.collab-preview-text .pw.active-pace::before {
  content: '';
  position: absolute;
  top: -1px; left: -2px; right: -2px; bottom: -1px;
  background: rgba(91, 127, 255, 0.15);
  border: 1px solid rgba(91, 127, 255, 0.4);
  border-radius: 3px;
  z-index: -1;
}

/* Settings mock screen */
.operator-settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 4px;
}
.settings-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-header-lbl {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
}
.settings-rail {
  width: 100%;
  height: 6px;
  background: #222240;
  border-radius: 3px;
  position: relative;
}
.settings-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #5b7fff;
  position: absolute;
  top: 50%;
  transform: translateY(-50%) translateX(-50%);
  transition: left 0.3s ease;
}
.settings-fill {
  height: 100%;
  background: rgba(91, 127, 255, 0.5);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Mini Touch screen */
.operator-touch-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  justify-content: center;
}
.touch-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 10px;
}
.touch-btn {
  height: 80px;
  border-radius: 16px;
  background: #222240;
  border: none;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.touch-btn svg {
  fill: currentColor;
}
.touch-btn:active {
  transform: scale(0.95);
}
.touch-btn.active {
  background: #5b7fff;
}
.touch-btn-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.touch-row-large {
  display: flex;
}
.touch-btn-large {
  flex: 1;
  height: 90px;
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.06);
}


/* 3. Remote Laptop Browser Monitor */
.monitor-device {
  height: 380px; /* Unified height */
  flex: 0 0 auto;
  max-width: 0;
  opacity: 0;
  transform: translate3d(0, 40px, 0) scale(0.95);
  overflow: hidden;
  z-index: 1;
  border: 0px solid rgba(255, 255, 255, 0.08);
  transition: max-width 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.monitor-device.visible {
  max-width: 402px; /* content 400px + border 2px */
  opacity: 0.85;
  border-width: 1px;
  transform: translate3d(0, 0, 0) scale(1);
}

.browser-header {
  background: #141420;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
}
.browser-controls {
  display: flex;
  gap: 6px;
}
.browser-arrow {
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
}
.browser-address {
  flex: 1;
  background: #0a0a0f;
  border-radius: 6px;
  padding: 4px 12px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-body);
  font-size: 9px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-viewport {
  flex: 1;
  background: #04060a;
  position: relative;
  overflow: hidden;
}
.browser-canvas {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 90px 24px;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}
.browser-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.4);
  text-align: left;
}
.browser-text .pw {
  display: inline-block;
  padding: 0 2px;
}
.browser-text .pw.active-pace {
  color: #ffffff;
}
.monitor-device .focus-arrow {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
  z-index: 10;
  color: #87c8f8;
  opacity: 0.85;
}
.monitor-device .guide-line {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 50%;
  border-top: 1px dashed rgba(135, 200, 248, 0.25);
  transform: translateY(-50%);
  z-index: 9;
}


/* Tap Gesture Animation overlay */
.tap-indicator {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(91, 127, 255, 0.25);
  border: 1.5px solid #ffffff;
  pointer-events: none;
  z-index: 99;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  display: none;
}
.tap-indicator.animating {
  display: block;
  animation: tap-pulse 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tap-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
}


/* ── Responsive rules ── */
.device-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
}



@media (max-width: 768px) {
  .pace-stage {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 12px;
  }
  .talent-device,
  .monitor-device.visible,
  .operator-device.visible {
    width: 100%;
    max-width: 440px;
    flex: none;
    height: 340px;
  }
  
  .device-inner {
    width: 100% !important; /* Force fit inside smaller viewport shells */
  }
  .talent-text {
    font-size: 1.35rem;
  }
  .talent-canvas {
    padding: 90px 24px;
  }
  
  .collab-slider-lbl {
    font-size: 9px;
  }
  .collab-adjust-val {
    min-width: 32px;
    font-size: 10px;
  }
  .collab-adjust {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }
}
