/* The default video surface contains only two equal feeds and their controls. */
html:has(body.call-screen) {
  height: 100%;
  overflow: hidden;
  background: #111;
}

body.call-screen {
  --call-safe-top: env(safe-area-inset-top, 0px);
  --call-safe-bottom: env(safe-area-inset-bottom, 0px);
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #111;
}

.call-screen .header,
.call-screen .mobile-tabs,
.call-screen .intro-line,
.call-screen .workspace,
.call-screen .trust-line,
.call-screen footer,
.call-screen .screen-bottom,
.call-screen .local-tools,
.call-screen .self-badge,
.call-screen #qualityBadge,
.call-screen #myCountryBadge,
.call-screen #locationText {
  display: none;
}

.call-screen .app {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.call-screen #videoSurface {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.call-screen #videoSurface[hidden],
.call-screen #peopleSurface[hidden],
.call-screen #adOverlay[hidden],
.call-screen [hidden] {
  display: none !important;
}

.call-screen .video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  width: 100%;
  height: auto;
  flex: 1 1 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.call-screen .video-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: #090b0c;
  animation: none !important;
  filter: none !important;
}

.call-screen .video-card::before,
.call-screen .video-card::after,
.call-screen .video-card.connection-reveal::before,
.call-screen .video-card.connection-reveal::after {
  display: none !important;
  content: none !important;
  animation: none !important;
}

.call-screen .video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #090b0c;
  animation: none !important;
  filter: none !important;
}

.call-screen .tv-effect {
  background: #292929;
  transition: opacity .25s;
}

.call-screen .tv-effect canvas {
  opacity: .55;
  mix-blend-mode: normal;
  filter: grayscale(1) contrast(1.45);
}

.call-screen .signal-color,
.call-screen .signal-line,
.call-screen .scanlines,
.call-screen .signal-orbit,
.call-screen .screen-eyebrow,
.call-screen .mini-flags {
  display: none;
  animation: none;
}

.call-screen #remotePlaceholder {
  padding: 58px 14px 78px;
  gap: 0;
  background: #0001;
  justify-content: center;
}

.call-screen #remoteTitle,
.call-screen #remoteSubtitle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.call-screen .waiting-avatar {
  width: clamp(105px, 15vw, 156px);
  height: auto;
  aspect-ratio: 1.45;
  flex: none;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
  color: #494949;
}

.call-screen .waiting-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.call-screen #onlinePresence {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: clamp(24px, 6vh, 58px);
  font-size: clamp(15px, 2vw, 22px);
  font-weight: 400;
  line-height: 1.3;
  color: #f7f7f7;
  text-shadow: 0 1px 3px #0009;
}

.call-screen .presence-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: #79fb05;
  box-shadow: none;
}

.call-screen .video-top {
  display: none;
}

.call-screen .video-top button {
  pointer-events: auto;
}

.call-screen #settingsButton {
  position: static;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  backdrop-filter: none;
  color: #ffffffa8;
  filter: drop-shadow(0 1px 2px #0008);
}

.call-screen #settingsButton .icon {
  width: 27px;
  height: 27px;
  stroke-width: 1.6;
}

.call-screen #reportButton {
  width: 44px;
  height: 44px;
  border: 0;
  background: #0002;
  border-radius: 8px;
  padding: 11px;
  backdrop-filter: none;
}

.call-screen #reportButton .icon {
  width: 22px;
  height: 22px;
}

.call-screen #reportButton:disabled {
  visibility: visible;
  opacity: .45;
}

.call-screen #reportButton > span {
  display: none;
}

.call-screen #connectionBadge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 104px);
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  font-size: 11px;
  background: #0005;
  border: 0;
  padding: 5px 9px;
  backdrop-filter: none;
  pointer-events: none;
}

.call-screen .remote-card[data-phase="ready"] #connectionBadge,
.call-screen .remote-card[data-phase="idle"] #connectionBadge,
.call-screen .remote-card[data-phase="connected"] #connectionBadge {
  display: none;
}

.call-screen .preferences-bar {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  z-index: 6;
}

.call-screen .preferences-bar > label,
.call-screen .preferences-bar > button,
.call-screen .self-choice,
.call-screen .country-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  min-width: 0;
  margin: 0;
  padding: 0 8px;
  border: 1px solid #ffffff80;
  border-radius: 8px;
  background: #68686866;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
}

.call-screen .preferences-bar select {
  min-width: 0;
  width: auto;
  max-width: 70%;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-overflow: ellipsis;
  cursor: pointer;
}

.call-screen .preferences-bar select option {
  background: #232323;
  color: #fff;
}

.call-screen .choice-value {
  font-size: 25px;
  line-height: 1;
}

.call-screen .preferences-bar select.choice-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  opacity: 0;
}

.call-screen .preferences-bar label:focus-within {
  outline: 2px solid #baff81;
  outline-offset: -2px;
}

.call-screen .local-placeholder {
  padding: 20px 18px 146px;
  background: #101214;
}

.call-screen .camera-circle {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  transform: none;
  background: #ffffff0b;
  color: #bebebe;
  box-shadow: none;
}

.call-screen .camera-circle .icon {
  width: 24px;
  height: 24px;
  transform: none;
}

.call-screen .local-placeholder h2 {
  font-size: 17px;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 12px 0 6px;
}

.call-screen .local-placeholder p {
  font-size: 12px;
  line-height: 1.4;
  color: #aaa;
  margin: 0;
  max-width: 260px;
}

.call-screen #previewButton {
  margin-top: 12px;
  min-height: 44px;
  border-radius: 7px;
  background: #ffffff10;
  color: #fff;
}

.call-screen .local-guidance {
  display: none;
}

.call-screen .local-guidance p {
  margin: 0 0 8px;
}

.call-screen .local-guidance button,
.call-screen .local-guidance a {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  pointer-events: auto;
}

.call-screen .local-guidance .safety-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.call-screen #cameraToolbar {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  min-height: 0;
  padding: 0;
  background: #111;
}

.call-screen .toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: calc(56px + var(--call-safe-bottom));
  padding: 6px 8px calc(6px + var(--call-safe-bottom));
}

.call-screen #cameraToolbar button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  height: 44px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: #0002;
  color: #ffffffb8;
  box-shadow: none;
  backdrop-filter: none;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 1px 2px #0008;
  transform: none;
}

.call-screen #cameraToolbar button:hover,
.call-screen #settingsButton:hover {
  background: #ffffff16;
  color: #fff;
}

.call-screen #cameraToolbar .icon {
  width: 25px;
  height: 25px;
  stroke-width: 1.7;
}

.call-screen #cameraToolbar #startButton {
  flex: 0 1 auto;
  min-width: 44px;
  padding: 8px;
  background: #157c4da3;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  text-shadow: none;
}

.call-screen #startButton::after {
  display: none;
  animation: none;
}

.call-screen #cameraToolbar #startButton .icon {
  width: 22px;
  height: 22px;
}

.call-screen #cameraToolbar #startButton > span {
  display: none;
}

.call-screen #stopButton > span:not(.stop-square) {
  display: none;
}

.call-screen #stopButton .stop-square {
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 3px;
  background: currentColor;
}

.call-screen #cameraToolbar button:disabled {
  opacity: .45;
}

.call-screen #unmuteRemote {
  display: none;
}

.call-screen #partnerBadge {
  display: none;
}

.call-screen #partnerActions {
  display: none;
}

/* A requested section replaces the call; it never floats over both feeds. */
.call-screen #modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: calc(20px + var(--call-safe-top)) max(20px, calc((100vw - 680px) / 2)) calc(24px + var(--call-safe-bottom));
  border: 0;
  border-radius: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #181a1b;
  color: #f1f1f1;
  box-shadow: none;
}

.call-screen #modal::backdrop {
  background: #181a1b;
  backdrop-filter: none;
}

.call-screen #modal .dialog-header {
  min-height: 44px;
  margin-bottom: 24px;
}

.call-screen #closeDialog {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #eee;
  background: #ffffff0b;
}

.call-screen #modal .dialog-copy {
  color: #c3c3c3;
}

.call-screen #modal.profile-screen,
.call-screen #modal:has(.profile-screen) {
  background: radial-gradient(ellipse at 64% 24%, #5a514a 0, transparent 47%),
    radial-gradient(ellipse at 26% 73%, #3d241d 0, transparent 53%), #201c19;
}

.call-screen .profile-screen .dialog-copy,
.call-screen #modal.profile-screen .dialog-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100% - 90px);
}

.call-screen .birth-fields {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 8px;
  margin: 10px 0 24px;
}

.call-screen #birthDay,
.call-screen #birthMonth,
.call-screen #birthYear {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 10px;
  border: 1px solid #ffffff5c;
  border-radius: 8px;
  padding-right: 34px;
  background: #ffffff0a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%23e6d6ff' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.call-screen .birth-fields select:has(option[value=""]:checked) {
  color: #bfaed3;
  font-weight: 400;
}

.call-screen .profile-screen .dialog-primary,
.call-screen #modal.profile-screen .dialog-primary {
  min-height: 58px;
  margin-top: 16px;
  border-radius: 7px;
  background: #24876a;
  color: white;
  font-size: 18px;
}

.call-screen .profile-screen .dialog-primary:disabled,
.call-screen #modal.profile-screen .dialog-primary:disabled {
  background: #28473d;
  color: #aaa;
}

.call-screen .settings-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.call-screen .settings-menu button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #ffffff20;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff08;
  color: #eee;
  font-size: 14px;
}

.call-screen #peopleSurface {
  position: fixed;
  inset: 0;
  height: 100%;
  width: 100%;
  padding: calc(18px + var(--call-safe-top)) max(18px, calc((100vw - 1100px) / 2)) calc(24px + var(--call-safe-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  background: #141517;
  border: 0;
  border-radius: 0;
}

.call-screen .people-toolbar {
  gap: 12px;
  flex-wrap: wrap;
}

.call-screen.panel-open #videoSurface {
  visibility: hidden;
}

.call-screen .toast {
  position: static;
  inset: auto;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0 8px 8px;
  padding: 8px 10px;
  overflow: visible;
  clip: auto;
  transform: none;
  white-space: normal;
  border: 1px solid #ffffff20;
  border-radius: 7px;
  background: #262626;
  color: #f4f4f4;
  box-shadow: none;
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

/* Sponsor content occupies the remote feed only and can always be skipped. */
.call-screen #adOverlay {
  padding: 55px 20px 70px;
  align-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  background: #242629;
}

.call-screen .ad-content {
  width: 100%;
  max-width: 460px;
}

.call-screen .ad-mark {
  display: none;
}

.call-screen .ad-content h2 {
  display: block;
  margin: 12px 0 8px;
  max-width: 100%;
  overflow: visible;
  font-size: clamp(20px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: -.5px;
}

.call-screen .ad-content > p {
  display: block;
  max-width: 100%;
  margin: 0 0 12px;
  overflow: visible;
  font-size: 13px;
  line-height: 1.4;
}

.call-screen .ad-actions {
  max-width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.call-screen .ad-actions > * {
  flex: 1 1 120px;
  min-height: 44px;
  padding: 10px;
  border-radius: 7px;
  font-size: 13px;
}

.call-screen .ad-label {
  max-width: 100%;
  font-size: 10px;
}

.call-screen .ad-note {
  max-width: 100%;
  font-size: 11px;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .call-screen .video-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .call-screen .remote-card .video-top {
    top: calc(5px + var(--call-safe-top));
  }

  .call-screen .local-card .video-top {
    top: 5px;
  }

  .call-screen #remotePlaceholder {
    padding-top: calc(32px + var(--call-safe-top));
    padding-bottom: 72px;
  }

  .call-screen .waiting-avatar {
    width: clamp(100px, 30vw, 130px);
  }

  .call-screen #onlinePresence {
    margin-top: clamp(24px, 6.5dvh, 52px);
    font-size: clamp(15px, 3.8vw, 20px);
  }

  .call-screen .preferences-bar {
    left: 7px;
    right: 7px;
    bottom: 7px;
    gap: 7px;
  }

  .call-screen .preferences-bar > label,
  .call-screen .preferences-bar > button {
    height: 44px;
    padding: 0 5px;
    font-size: 12px;
    gap: 7px;
  }

  .call-screen .preferences-bar select {
    font-size: 12px;
    max-width: 68%;
  }

  .call-screen .local-guidance {
    left: 14px;
    right: 14px;
    font-size: 12px;
    line-height: 1.4;
  }

  .call-screen .toolbar-actions {
    padding-left: 5px;
    padding-right: 5px;
  }

  .call-screen #cameraToolbar #startButton {
    min-width: 44px;
    padding: 8px;
    font-size: 13px;
  }

  .call-screen #adOverlay {
    padding: 49px 17px 64px;
    align-items: flex-start;
  }

  .call-screen .ad-content h2 {
    font-size: 23px;
  }

  .call-screen .ad-content > p {
    font-size: 12px;
  }

  .call-screen .ad-actions > * {
    font-size: 12px;
    flex-basis: 105px;
  }

  .call-screen .people-tabs {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) and (max-height: 600px) {
  .call-screen #remotePlaceholder {
    padding: 40px 10px 62px;
  }

  .call-screen .waiting-avatar {
    width: 82px;
  }

  .call-screen #onlinePresence {
    margin-top: 14px;
    font-size: 13px;
  }

  .call-screen .local-guidance {
    font-size: 11px;
    line-height: 1.3;
  }

  .call-screen .local-guidance p {
    margin-bottom: 4px;
  }

  .call-screen .local-placeholder {
    padding: 10px 14px 132px;
    justify-content: flex-start;
  }

  .call-screen .local-placeholder h2,
  .call-screen .local-placeholder p,
  .call-screen .camera-circle {
    display: none;
  }

  .call-screen #previewButton {
    margin-top: 0;
  }
}

@media (min-width: 701px) {
  .call-screen .preferences-bar {
    left: 16px;
    right: 16px;
    bottom: calc(14px + var(--call-safe-bottom));
  }

  .call-screen .toolbar-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .call-screen .local-guidance {
    left: 20px;
    right: 20px;
    bottom: calc(78px + var(--call-safe-bottom));
    max-width: 600px;
    font-size: 14px;
  }

  .call-screen .toast {
    margin-left: 16px;
    margin-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .call-screen .tv-effect {
    transition: none;
  }
}

@media (max-width: 700px) and (orientation: landscape) {
  .call-screen .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
  }

  .call-screen #remotePlaceholder {
    padding: 24px 10px 64px;
  }

  .call-screen .waiting-avatar {
    width: 82px;
  }

  .call-screen #onlinePresence {
    margin-top: 14px;
    font-size: 13px;
  }

  .call-screen .local-placeholder {
    padding: 12px;
    justify-content: center;
  }
}

.call-screen .remote-feed-active .tv-effect { display: none; }
.call-screen .local-placeholder { padding: 20px; }
@media (orientation: landscape) and (max-height: 400px) {
 .call-screen .local-placeholder .camera-circle { display:none; }
 .call-screen #remotePlaceholder { padding:14px 8px 58px; }
 .call-screen .waiting-avatar { width:80px; }
 .call-screen #onlinePresence { margin-top:12px; font-size:13px; }
}

.call-screen #modal { z-index: 10; }
.call-screen.panel-open #videoSurface,
.call-screen.panel-open #videoSurface * { visibility: hidden !important; }
.call-screen .remote-card:not(.remote-feed-active) #remoteVideo { visibility: hidden; }

.call-screen #modal[open].profile-screen {
 display:grid; grid-template-rows:minmax(12px,1fr) auto auto minmax(12px,1fr); row-gap:18px;
}
.call-screen #modal.profile-screen .dialog-header { grid-row:2; justify-content:center; margin:0; }
.call-screen #modal.profile-screen #dialogTitle { text-align:center; font-size:24px; font-weight:700; }
.call-screen #modal.profile-screen #closeDialog { position:fixed; top:calc(12px + var(--call-safe-top)); right:12px; }
.call-screen #modal.profile-screen #dialogBody { grid-row:3; }
.call-screen #modal.profile-screen .profile-form { min-height:0; }
.call-screen #modal.profile-screen .profile-form > p:first-child { display:none; }
.call-screen .birth-fields { border:0; padding:0; margin:0 0 18px; }
.call-screen .birth-fields legend { padding:0 0 12px; font-size:17px; color:#eee; }
.call-screen .birth-fields .dialog-field { margin:0; }
.call-screen #modal.profile-screen .checkbox-row { font-size:13px; line-height:1.5; }
.call-screen #adultContinue { text-transform:uppercase; }

/* On-device nudity protection covers the partner's video completely. */
.call-screen .safety-cover {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: #0b0710;
  color: #fff;
  text-align: center;
}

.call-screen .safety-cover strong {
  font-size: 18px;
}

.call-screen .safety-cover span {
  max-width: 320px;
  color: #ffffffcc;
  font-size: 14px;
  line-height: 1.4;
}

/* Safe start: the partner's first frames stay blurred until they are checked. */
.call-screen .remote-card.safe-start #remoteVideo {
  filter: blur(26px) saturate(.6) !important;
}

.call-screen .remote-card.safe-start.remote-feed-active::before {
  content: none;
}
