/* Screen sharing and other desktop/mobile refinements. */
/* Screen share (DM MVP) */
.screen-invite {
  position: fixed; left: 50%; top: 72px; transform: translateX(-50%); z-index: 40;
  max-width: min(420px, calc(100vw - 24px)); width: 100%;
  background: #fff; border: 1px solid #ebebeb; border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 14px 16px;
}
.screen-invite.hidden { display: none !important; }
.screen-invite-body { display: flex; flex-direction: column; gap: 12px; }
.screen-invite-body strong { font-size: 14px; line-height: 1.4; color: var(--text-strong, #1b1d21); }
.screen-invite-actions { display: flex; justify-content: flex-end; gap: 8px; }
.screen-stage {
  position: fixed; inset: 0; z-index: 35; background: rgba(12, 14, 18, .92);
  display: flex; flex-direction: column; padding: 12px;
}
.screen-stage.hidden { display: none !important; }
/* Sharer: compact floating preview — chat stays usable underneath */
.screen-stage.is-sharer {
  inset: auto;
  right: 16px;
  bottom: 16px;
  width: min(480px, calc(100vw - 24px));
  height: min(320px, calc(100vh - 96px));
  padding: 8px;
  border-radius: 12px;
  background: rgba(18, 20, 24, .96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .08);
}
.screen-stage.is-sharer .screen-stage-bar { padding: 2px 2px 8px; }
.screen-stage.is-sharer .screen-stage-label { font-size: 12px; }
.screen-stage.is-sharer .screen-stage-bar .btn { padding: 4px 10px; font-size: 12px; }
.screen-stage-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 4px 4px 12px; color: #fff; flex: none;
}
.screen-stage-label { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-video {
  flex: 1; min-height: 0; width: 100%; border-radius: 8px; background: #000;
  object-fit: contain;
}
.mobile-tour {
  position: fixed;
  inset: 0;
  z-index: 80;
}
.mobile-tour.hidden { display: none !important; }
.mobile-tour-block { position: absolute; inset: 0; }
.mobile-tour.is-gesture .mobile-tour-block { pointer-events: none; }
.mobile-tour-spot {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(16, 24, 40, .48);
  outline: 2px solid #fff;
}
.mobile-tour-gesture {
  position: fixed;
  z-index: 2;
  top: 42%;
  width: 56px;
  height: 56px;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.mobile-tour-gesture.is-left { left: 10px; }
.mobile-tour-gesture.is-right { right: 10px; }
.mobile-tour-gesture.is-right .mobile-tour-gesture-arrow svg { transform: scaleX(-1); }
.mobile-tour-gesture-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #1a1d26;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .22);
}
.mobile-tour-gesture.is-left .mobile-tour-gesture-arrow { animation: tour-nudge-right 1.15s ease-in-out infinite; }
.mobile-tour-gesture.is-right .mobile-tour-gesture-arrow { animation: tour-nudge-left 1.15s ease-in-out infinite; }
@keyframes tour-nudge-right {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(18px); }
}
@keyframes tour-nudge-left {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-18px); }
}
.mobile-tour-card {
  position: fixed;
  z-index: 3;
  left: 16px;
  right: 16px;
  background: #fff;
  color: #1a1d26;
  border-radius: 22px;
  padding: 22px 20px 16px;
  box-shadow: 0 18px 50px rgba(16, 24, 40, .22);
  text-align: center;
}
.mobile-tour.is-welcome .mobile-tour-card {
  top: 50%;
  transform: translateY(-50%);
}
.mobile-tour-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
  border-radius: 50%;
  font-size: 28px;
}
.mobile-tour-card h1,
.mobile-tour-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.2;
}
#mobile-tour-welcome:not([hidden]),
#mobile-tour-bye:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
#mobile-tour-welcome .btn.wide,
#mobile-tour-bye .btn.wide { width: 100%; }
#mobile-tour-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  font-size: 22px;
  line-height: 1.25;
  text-align: center;
}
.mobile-tour-heading-line { display: block; }
.mobile-tour-card h2 { font-size: 20px; text-align: left; }
.mobile-tour-card p {
  margin: 0 0 14px;
  color: #5c6570;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
}
.mobile-tour-bye-lead {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2px 0 10px !important;
  text-align: center !important;
  color: #1a1d26 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}
.mobile-tour-bye-line { display: block; }
.mobile-tour-bye {
  margin: 0 0 16px !important;
  text-align: center !important;
  color: #3f4350 !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
}
.mobile-tour-caption {
  margin: 16px 0 10px !important;
  text-align: center !important;
  color: #8b8e98 !important;
  font-size: 13px !important;
}
.mobile-tour-never {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: #1a1d26;
  font-size: 15px;
}
.mobile-tour-never input { width: 18px; height: 18px; margin: 0; }
#mobile-tour-bye .mobile-tour-never { margin-top: 18px; }
.mobile-tour-card .btn.wide { margin-top: 8px; }
.mobile-tour-skip {
  appearance: none;
  border: 0;
  background: transparent;
  color: #5c6570;
  font: inherit;
  font-size: 15px;
  padding: 10px 8px;
  cursor: pointer;
}
.mobile-tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.mobile-tour-actions .btn { min-width: 112px; }
.mobile-tour-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 10px;
}
.mobile-tour-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d5d8e0;
  display: block;
}
.mobile-tour-dots i.is-on { background: #3b6cff; }
@media (prefers-reduced-motion: reduce) {
  .mobile-tour-gesture-arrow { animation: none !important; }
}
@media (max-width: 560px) {
  .screen-stage.is-sharer {
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
    height: min(240px, 40vh);
  }
}
