/* Единый виртуальный класс: лобби + Daily Prebuilt + доска WBO */

:root {
  --vr-accent: #6366F1;
  --vr-soft: #EEF2FF;
  --vr-muted: #9CA3AF;
  --vr-border: #E5E7EB;
  --vr-green: #10B981;
  --vr-red: #EF4444;
  --vr-chrome: #111827;
  --vr-chrome-h: 48px;
}

.vr-shell,
.vr-shell *,
.vr-classroom,
.vr-classroom * {
  box-sizing: border-box;
}

/* ——— Лобби ——— */
.vr-shell {
  min-height: 100vh;
  background: #F5F3EE;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
}

.vr-shell.is-hidden {
  display: none;
}

.vr-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.vr-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.vr-subtitle { color: var(--vr-muted); font-size: 14px; margin: 0 0 24px; }

.vr-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--vr-muted);
  letter-spacing: .05em;
  margin: 0 0 8px;
}

.vr-device-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--vr-border);
  font-size: 14px;
}
.vr-device-row:last-child { border-bottom: none; }

.vr-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--vr-muted);
}
.vr-status-dot.ok  { background: var(--vr-green); }
.vr-status-dot.err { background: var(--vr-red); }

.vr-device-name { flex: 1; }
.vr-device-hint { font-size: 12px; color: var(--vr-muted); }

.vr-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
}
.vr-check-row input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--vr-accent);
}

.vr-materials {
  padding: 10px 14px;
  background: var(--vr-soft);
  border-radius: 8px;
  font-size: 14px;
}
.vr-materials a { color: var(--vr-accent); font-weight: 600; }

.vr-enter-btn {
  display: block;
  width: 100%;
  margin-top: 24px;
  background: var(--vr-accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity .15s;
}
.vr-enter-btn:disabled { opacity: .5; cursor: not-allowed; }
.vr-enter-btn:not(:disabled):hover { opacity: .87; }

.vr-no-room {
  padding: 14px;
  background: #FEF3C7;
  border-radius: 8px;
  font-size: 14px;
  color: #92400E;
  text-align: center;
  margin-top: 24px;
}

.vr-divider {
  margin: 20px 0;
  border: none;
  border-top: 1px solid var(--vr-border);
}

.vr-hint {
  font-size: 12px;
  color: var(--vr-muted);
  text-align: center;
  margin-top: 8px;
}

.vr-rec-btn {
  margin-top: 12px;
  width: 100%;
  background: var(--vr-red);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.vr-rec-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
}

/* ——— Classroom shell ——— */
.vr-classroom {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #0B0F19;
  flex-direction: column;
  color: #fff;
}

.vr-classroom.is-live {
  display: flex;
}

body.vr-class-live {
  overflow: hidden;
  padding-bottom: 0 !important;
}

body.vr-class-live .lms-tabbar {
  display: none !important;
}

.vr-chrome {
  flex: 0 0 var(--vr-chrome-h);
  height: var(--vr-chrome-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--vr-chrome);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vr-chrome__title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28vw;
  margin-right: auto;
  opacity: .9;
}

.vr-chrome__modes {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 3px;
}

.vr-mode-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
}
.vr-mode-btn.is-active {
  background: #fff;
  color: #111827;
}

.vr-chrome__rec {
  appearance: none;
  border: none;
  background: var(--vr-red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.vr-chrome__rec:disabled {
  opacity: .75;
  cursor: not-allowed;
}

.vr-chrome__leave {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.vr-chrome__leave:hover {
  background: rgba(255, 255, 255, 0.08);
}

.vr-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 2fr 3fr;
  grid-template-rows: 1fr;
}

.vr-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #000;
  overflow: hidden;
}

.vr-panel--board {
  background: #1a1d27;
}

#vr-video,
#vr-board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

#vr-video iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}

.vr-board-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.5;
}

/* Desktop modes */
.vr-classroom.mode-split .vr-stage {
  grid-template-columns: 2fr 3fr;
}
.vr-classroom.mode-split .vr-panel--video,
.vr-classroom.mode-split .vr-panel--board {
  display: block;
}

.vr-classroom.mode-video .vr-stage {
  grid-template-columns: 1fr;
}
.vr-classroom.mode-video .vr-panel--board {
  display: none;
}
.vr-classroom.mode-video .vr-panel--video {
  display: block;
}

.vr-classroom.mode-board .vr-stage {
  grid-template-columns: 220px 1fr;
}
.vr-classroom.mode-board .vr-panel--video,
.vr-classroom.mode-board .vr-panel--board {
  display: block;
}

/* Mobile: вкладки вместо split */
.vr-mobile-tabs {
  display: none;
  flex: 0 0 44px;
  gap: 4px;
  padding: 6px 10px;
  background: var(--vr-chrome);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.vr-mobile-tab {
  flex: 1;
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}
.vr-mobile-tab.is-active {
  background: #fff;
  color: #111827;
}

@media (max-width: 768px) {
  .vr-chrome__modes {
    display: none;
  }

  .vr-chrome__title {
    max-width: 40vw;
  }

  .vr-mobile-tabs {
    display: flex;
  }

  .vr-classroom .vr-stage {
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr;
  }

  .vr-classroom.mobile-video .vr-panel--video {
    display: block;
  }
  .vr-classroom.mobile-video .vr-panel--board {
    display: none;
  }

  .vr-classroom.mobile-board .vr-panel--board {
    display: block;
  }
  .vr-classroom.mobile-board .vr-panel--video {
    display: none;
  }
}
