/* Small overrides on top of Bootstrap 5.3 */

.brand-icon {
  width: 32px;
  height: 32px;
  display: block;
}

.code-display {
  letter-spacing: .25em;
  text-align: center;
}

/* Role selector cards built on btn-check */
.role-card {
  border-width: 2px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.role-card .role-desc {
  color: var(--bs-secondary-color);
}
.btn-check:checked + .role-card .role-desc,
.btn-check:checked + .role-card .bi {
  color: inherit;
  opacity: .9;
}
.btn-check:focus-visible + .role-card {
  box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .35);
}

/* Video area */
.video-frame video {
  object-fit: contain;
  background: #000;
}

/* Numbered "how it works" steps */
.step-number {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}

/* Status alert transitions */
#status {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.eyebrow {
  letter-spacing: .06em;
}

/* "Your connection details" card: gradient so it is obviously the user's own side */
.card-you {
  --you-start: #1f6feb;
  --you-end: #6f42c1;
  background: linear-gradient(135deg, var(--you-start) 0%, var(--you-end) 100%);
  color: #fff;
}
[data-bs-theme="dark"] .card-you {
  --you-start: #1b4fa8;
  --you-end: #4c2a8c;
}
.card-you .card-header {
  border-bottom-color: rgba(255, 255, 255, .25);
  color: #fff;
}
.card-you .form-label,
.card-you .form-text,
.card-you .card-you-intro {
  color: rgba(255, 255, 255, .85);
}
.card-you .form-control {
  background: rgba(255, 255, 255, .95);
  color: #142033;
  border-color: rgba(255, 255, 255, .6);
}
.card-you .form-control:focus {
  box-shadow: 0 0 0 .25rem rgba(255, 255, 255, .35);
}
.card-you .you-badge {
  background: rgba(255, 255, 255, .2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .45);
}
.card-you .copy-btn {
  border-color: rgba(255, 255, 255, .6);
}

/* Pointer overlay drawn over the video picture */
.pointer-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}
.video-frame.interactive .pointer-overlay {
  pointer-events: auto;
  cursor: none;
  touch-action: none;
}
.ratio > .pointer-overlay {
  width: auto;
  height: auto;
}

/* Document Picture-in-Picture pop-out preview */
.pip-body {
  margin: 0;
  background: #000;
  overflow: hidden;
}
.pip-body .video-frame {
  position: absolute;
  inset: 0;
  border-radius: 0 !important;
}
.pip-body .video-frame::before {
  display: none;
}

/* Address picker inside the identity card */
.card-you .form-select {
  background-color: rgba(255, 255, 255, .95);
  color: #142033;
  border-color: rgba(255, 255, 255, .6);
}

/* "Other person's address" machine picker */
.peer-pick-menu {
  min-width: min(24rem, calc(100vw - 2rem));
  max-height: 22rem;
  overflow-y: auto;
}
.peer-pick-menu .dropdown-item {
  white-space: normal;
}
.peer-pick-menu .peer-pick-name {
  overflow-wrap: anywhere;
}
.peer-pick-menu .dropdown-item .mono {
  font-family: var(--bs-font-monospace);
}

.footer-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}
.form-switch .form-check-input {
  cursor: pointer;
}

.voice-tools .form-check-input {
  width: 2.6em;
  height: 1.3em;
  margin-top: .1em;
}
.voice-tools .form-check-label {
  padding-left: .35rem;
}

/* Pop-out preview toolbar: shows on hover, top-right corner */
.pip-toolbar {
  position: absolute;
  top: .5rem;
  right: .5rem;
  display: flex;
  gap: .25rem;
  z-index: 10;
  opacity: 0;
  transition: opacity .2s ease;
}
.pip-body:hover .pip-toolbar,
.pip-toolbar:focus-within {
  opacity: 1;
}
.pip-btn {
  --bs-btn-bg: rgba(0, 0, 0, .65);
  --bs-btn-border-color: rgba(255, 255, 255, .35);
  --bs-btn-hover-bg: rgba(0, 0, 0, .85);
  --bs-btn-hover-border-color: rgba(255, 255, 255, .6);
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Bootstrap's display utilities (d-flex etc.) are !important and defined after its
   own [hidden] rule, so an element with both stays visible. Restate the rule here,
   after bootstrap.min.css, so the hidden attribute always wins. */
[hidden] {
  display: none !important;
}
