/* /visiphone — Portalis Visiphone, a Portalis Ltd service, so it runs in
   Portalis OS (portalis/os.css): one window under the top bar, the picture
   in a sunken well, the contacts and dialogs as small windows over it. the
   picture inside is drawn by visiphone.js. */

.vp {
  width: min(720px, calc(100% - 24px));
  margin: 3.4em auto 1em;
}
.vp .os-build { margin: 10px 0 0; }
.vp .os-build a { color: rgba(255, 255, 255, 0.8); }

/* the menu bar and its drop-downs */
.vp .os-win { position: relative; }
.vp__menu { display: flex; gap: 1px; padding: 2px; border-bottom: 1px solid var(--os-sh); }
.vp__menu button { font: 12px/1.2 var(--os-ui); color: var(--os-ink); background: none; border: 1px solid transparent; padding: 2px 8px; cursor: default; }
.vp__menu button:hover, .vp__menu button.is-on, .vp__menu button:focus-visible { background: var(--os-sel); color: #fff; outline: none; }
.vp__drop {
  position: absolute;
  z-index: 50;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 2px;
  background: var(--os-face);
  border: 1px solid var(--os-dk);
  box-shadow: inset 1px 1px 0 #fff, 3px 3px 0 rgba(0, 10, 16, 0.4);
}
.vp__drop[hidden] { display: none; }
.vp__drop button { position: relative; text-align: left; font: 12px/1.2 var(--os-ui); color: var(--os-ink); background: none; border: 0; padding: 4px 22px 4px 24px; cursor: default; }
.vp__drop button:hover:not(:disabled), .vp__drop button:focus-visible { background: var(--os-sel); color: #fff; outline: none; }
.vp__drop button:disabled { color: var(--os-sh); text-shadow: 1px 1px 0 #fff; }
.vp__drop button.is-chk::before { content: "\2713"; position: absolute; left: 8px; }
.vp__drop hr { border: 0; border-top: 1px solid var(--os-sh); border-bottom: 1px solid #fff; margin: 3px 2px; }

/* the About box and Help */
.vp__about { display: flex; gap: 12px; align-items: flex-start; }
.vp__about img { flex: none; }
.vp__about p { margin: 0 0 8px; }
.vp__tips { margin: 0 !important; padding: 0 0 0 1.2em !important; list-style: disc; }
.vp__tips li { margin: 0 0 6px; padding: 0; }
.vp__tips li::before { content: none; }

/* the picture: a sunken well, 4:3, the canvas scaled up soft */
.vp__screen {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 6px 6px 0;
  background: #000;
  border: 1px solid var(--os-dk);
  box-shadow: 0 0 0 1px #fff;
  overflow: hidden;
}
.vp__screen canvas { display: block; width: 100%; height: 100%; }
.vp__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
}
.vp__cc {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 8%;
  margin: 0;
  text-align: center;
  font: 16px/1.45 var(--os-ui);
  color: #fff;
  z-index: 1;
  pointer-events: none;
  text-wrap: balance;
}
.vp__cc span { background: rgba(0, 0, 0, 0.75); padding: 1px 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* contacts and dialogs: small windows over the picture */
.vp__over { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; }
.vp__over[hidden] { display: none; }
.vp__over--dim { background: rgba(4, 20, 26, 0.45); }
.vp__mini { width: min(300px, 86%); }
.vp__mini .os-title { height: 24px; font-size: 12px; }
.vp__mini-b { padding: 8px 10px 10px; font-size: 12px; }
.vp__mini .os-acts { margin-top: 10px; }
.vp__list {
  list-style: none;
  margin: 0 !important;
  padding: 2px !important;
  background: #fff;
  border: 1px solid var(--os-line);
  max-height: 13em;
  overflow: auto;
}
.vp__list li { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 2px 5px; text-align: left; cursor: default; user-select: none; }
.vp__list li::before { content: none; }
.vp__list li.is-on { background: var(--os-sel); color: #fff; }
.vp__list li:focus-visible { outline: 1px dotted var(--os-gold2); outline-offset: -1px; }
.vp__list b { font-weight: normal; }
.vp__list em { font-style: normal; color: #7a8784; }
.vp__list li.is-on em { color: #c8f4fa; }
.vp__hint { margin: 6px 0 0; color: #5d6b6a; }
.vp__dlg-b p { margin: 0 0 8px; }
.vp__dlg-b label { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.vp__dlg-b label.is-off { color: var(--os-sh); }
.vp__dlg-b .vp__note { margin: 8px 0 0; color: #5d6b6a; font-size: 11px; }

/* what you typed: up top, in the halo's gold */
.vp__you {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 9%;
  margin: 0;
  text-align: center;
  font: 14px/1.45 var(--os-ui);
  color: var(--os-gold);
  z-index: 1;
  text-wrap: balance;
  pointer-events: none;
}
.vp__you span { background: rgba(0, 0, 0, 0.75); padding: 1px 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.vp__say { display: flex; gap: 6px; padding: 7px 6px 0; margin: 0; }
.vp__say .os-field { flex: 1; min-width: 0; }
.vp__say .os-btn { min-width: 72px; }

.vp__bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px 6px 6px; align-items: stretch; }
.vp__bar .os-btn { min-width: 72px; }
.vp__bar .os-btn[aria-pressed="true"] { background: linear-gradient(#dcdfd7, #eceee8); box-shadow: inset 1px 1px 0 var(--os-sh), inset 0 0 0 2px var(--os-gold); }
/* the level meter: the logo's cyan on ink */
.vp__scope {
  flex: 1 1 120px;
  min-width: 90px;
  height: 28px;
  background: var(--os-ink);
  border: 1px solid var(--os-dk);
  box-shadow: 0 0 0 1px #fff;
}

@media (max-width: 560px) {
  .vp__opt { display: none; }  /* picture quality only: the camera stays */
  .vp__cc { font-size: 13px; }
}
