/* Prejoin (green room) — CORE */
.prejoin { min-height: 100vh; display: flex; flex-direction: column; background: var(--light-bg); }
.pj-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 32px 64px; padding: 16px 32px 40px; flex-wrap: wrap;
}
.pj-left { flex: 0 1 740px; min-width: 300px; display: flex; flex-direction: column; gap: 12px; }

.pj-preview {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  background: #202124; color: #fff;
  box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 2px 6px 2px rgba(60,64,67,.15);
}
.pj-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scaleX(-1); /* mirrored self preview */
  opacity: 0; transition: opacity .2s;
}
.pj-preview.cam-on .pj-video { opacity: 1; }
.pj-off {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  transition: opacity .2s;
}
.pj-preview.cam-on .pj-off { opacity: 0; pointer-events: none; }
.pj-off-text { font-family: var(--font); font-size: 24px; color: #fff; text-align: center; padding: 0 24px; }
.pj-name-chip {
  position: absolute; top: 16px; left: 16px; max-width: calc(100% - 32px);
  font-family: var(--font); font-size: 14px; font-weight: 500; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pj-name-chip[hidden] { display: none; }
.pj-level {
  position: absolute; left: 16px; bottom: 24px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-strong); display: flex; align-items: center; justify-content: center; gap: 3px;
}
.pj-level[hidden] { display: none; }
.pj-level span { width: 4px; height: 14px; border-radius: 2px; background: #fff; transform: scaleY(.2); transition: transform 80ms linear; }

.pj-controls {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; gap: 24px;
}
.pj-round {
  position: relative; width: 56px; height: 56px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.75); color: #fff; background: transparent;
  transition: background-color .15s, border-color .15s;
}
.pj-round:hover { background: rgba(255,255,255,.15); }
.pj-round.off { background: var(--btn-off); border-color: var(--btn-off); }
.pj-round.off:hover { background: var(--btn-off-hover); }
.pj-round:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pj-warn {
  position: absolute; top: -4px; right: -4px; font-size: 20px; color: #fbbc04;
  background: #202124; border-radius: 50%;
}
.pj-warn[hidden] { display: none; }

.pj-perm {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 14px; border-radius: 8px; background: #fef7e0; color: #3c4043; font-size: 13px; line-height: 18px;
}
.pj-perm[hidden] { display: none; }
.pj-perm .msr { font-size: 18px; color: #e37400; }
.pj-perm strong { color: #202124; font-weight: 500; }

.pj-devices { display: flex; gap: 8px; flex-wrap: wrap; }
/* Device dropdown buttons (Meet green-room style pills). */
.pj-device {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 8px 0 12px; border-radius: 20px; border: 1px solid var(--light-border);
  color: var(--light-text-2); background: #fff; cursor: pointer; text-align: left;
  font: 500 14px/20px var(--font); transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.pj-device:hover:not(:disabled) { background: var(--light-hover); }
.pj-device[aria-expanded="true"] { border-color: var(--light-blue); box-shadow: inset 0 0 0 1px var(--light-blue); background: #e8f0fe; color: var(--light-blue-text); }
.pj-device:focus-visible { outline: 2px solid var(--light-blue); outline-offset: 2px; }
.pj-device:disabled { cursor: default; opacity: .6; }
.pj-device > .msr { font-size: 20px; flex: none; }
.pj-device-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; font-size: 13px; }
.pj-device-caret { flex: none; transition: transform .15s; }
.pj-device[aria-expanded="true"] .pj-device-caret { transform: rotate(180deg); }

/* The opened device list (rendered by landing-widgets openMenu). */
.lp-menu.pj-device-menu { max-width: min(420px, calc(100vw - 16px)); max-height: 50vh; overflow-y: auto; padding: 8px 0; }
.pj-device-menu .lp-menu-item { min-height: 44px; padding: 0 16px 0 12px; }
.pj-device-menu .lp-menu-item .msr { width: 24px; color: var(--light-blue-text); }
.pj-device-menu .lp-menu-item.is-checked { color: var(--light-blue-text); background: #e8f0fe; }
.pj-device-menu .lp-menu-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pj-right { flex: 0 1 360px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.pj-title { font-family: var(--font); font-weight: 400; font-size: 28px; line-height: 36px; color: var(--light-text); }
.pj-who { font-size: 14px; color: var(--light-text-2); min-height: 20px; }
.pj-form { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 320px; margin-top: 8px; }
.pj-name-field { position: relative; width: 100%; text-align: left; }
.pj-name-label {
  position: absolute; top: -8px; left: 10px; padding: 0 4px; background: #fff;
  font-size: 12px; color: var(--light-text-2);
}
.pj-name-field:focus-within .pj-name-label { color: var(--light-blue); }
.pj-name-field input {
  width: 100%; height: 52px; padding: 0 14px; border-radius: 4px; border: 1px solid #80868b;
  font-size: 16px; color: var(--light-text); background: #fff; outline: 0;
}
.pj-name-field input:focus { border-color: var(--light-blue); box-shadow: inset 0 0 0 1px var(--light-blue); }
.pj-join { min-width: 160px; height: 48px; border-radius: 24px; font-size: 15px; }

.pj-link { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 16px; }
.pj-link-label { font-size: 12px; color: var(--light-text-2); }
.pj-link-btn {
  display: inline-flex; align-items: center; gap: 8px; max-width: 320px;
  padding: 6px 12px; border-radius: 16px; color: var(--light-blue-text); font-size: 13px;
}
.pj-link-btn:hover { background: rgba(26,115,232,.06); }
.pj-link-btn .msr { font-size: 18px; }
.pj-link-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .pj-main { padding: 8px 16px 32px; gap: 24px; }
  .pj-left { flex-basis: 100%; }
  .pj-right { flex-basis: 100%; }
}
@media (max-width: 560px) {
  .pj-devices { flex-direction: column; }
  .pj-round { width: 48px; height: 48px; }
  .pj-off-text { font-size: 18px; }
}
