/* What floats over an open invitation (effects.js, NC.InviteFx): one click-through layer over the page — above its
   content, below its float bar (z-index 20), its cover (30) and the studio's toasts and dialogs. */

.nci-fx {
  position: absolute;
  inset: 0;
  z-index: 15;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 320ms ease;
}

/* A guest is watching a video on the page: nothing falls or drifts over it. */
.nci-fx.is-hushed {
  opacity: 0;
}

/* The page under the layer is a stacking context of its own, so the couple's free elements (z-index 10 and up)
   stay under it instead of rising through it. */
.nci-guest-screen,
.nci-screen {
  isolation: isolate;
}

.nci-fx-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.nci-fx-barrage {
  position: absolute;
  inset: 0;
  transition: opacity 280ms ease;
}

.nci-fx-barrage.is-muted {
  opacity: 0;
}

/* One wish: a dark pill with white type, readable over a photo, a dark cover or a cream page alike. It drifts across
   the screen, so it may be far wider than it: a long wish is read as it passes. No frosted glass while it moves:
   blurring what is behind a moving pill, every frame, is hard work for a phone. */
.nci-fx-bubble {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-sizing: border-box;
  max-width: 400%;
  height: 30px;
  padding: 3px 13px 3px 3px;
  border-radius: 999px;
  background: rgba(30, 24, 20, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 18px -10px rgba(0, 0, 0, 0.5);
  color: #fff;
  font: 400 13px/1.3 Jost, 'Noto Sans SC', system-ui, sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
  will-change: transform;
  transition: opacity 220ms ease;
}

/* With reduced motion it stays where it is, as frosted glass: it fits the screen, on up to three lines. */
.nci-fx-bubble.is-still {
  background: rgba(30, 24, 20, 0.58);
  -webkit-backdrop-filter: blur(6px) saturate(1.15);
  backdrop-filter: blur(6px) saturate(1.15);
  align-items: flex-start;
  max-width: calc(100% - 24px);
  height: auto;
  min-height: 30px;
  padding: 3px 13px 3px 3px;
  border-radius: 16px;
  white-space: normal;
}

.nci-fx-bubble.is-still .nci-fx-txt {
  display: -webkit-box;
  padding: 3px 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

/* Over a form it is gone at once; it comes back gently once past it. */
.nci-fx-bubble.is-hidden {
  opacity: 0;
  transition-duration: 60ms;
}

.nci-fx-av {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fx-accent, #a8664f);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.nci-fx-txt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.nci-fx-name {
  display: inline-block;
  max-width: 12em;
  margin-right: 6px;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  opacity: 0.85;
}

.nci-fx-name::after {
  content: ' ·';
}

/* ── A video the couple added (invite.js Elements) ── For guests a player; in the editor and the preview a still
   with a play mark, which plays nothing. */
.nci-el--video {
  overflow: hidden;
  background: #1c1815;
}

.nci--view .nci-el--video {
  pointer-events: auto;
}

.nci-el-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1c1815;
}

.nci-el-still {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.nci-el-still img,
.nci-el-still video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.nci-el-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(20, 16, 14, 0.5);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.nci-el-play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -5px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}
