.semnall-call-dialog {
  width: min(440px, calc(100vw - 28px));
  max-width: 440px;
  margin: 7vh auto;
}

.semnall-call.modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: #07111f;
  min-height: 480px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  color: #f8fafc;
}

.semnall-call.wo_calling_modals > img,
.semnall-call.wo_calling_modals:after {
  border-radius: 28px;
}

.semnall-call.wo_calling_modals:after {
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.42), rgba(7, 17, 31, 0.86));
  backdrop-filter: blur(22px);
}

.semnall-call .modal-header,
.semnall-call .modal-body,
.semnall-call .modal-footer {
  border: 0;
  background: transparent;
  text-align: center;
}

.semnall-call .modal-header {
  padding: 28px 24px 0;
}

.semnall-call .modal-body {
  padding: 8px 28px 0;
}

.semnall-call .modal-title {
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}

.semnall-call .modal-body p,
.semnall-call .semnall-call-livestatus {
  color: rgba(248, 250, 252, 0.78);
  font-size: 15px;
  line-height: 1.5;
  margin: 10px 0 0;
}

.semnall-call-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.semnall-call-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
}

.semnall-call-ringing .semnall-call-dot {
  animation: semnall-dot 1.4s ease-out infinite;
}

.semnall-call .avatar {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 8px auto 18px;
}

.semnall-call .avatar img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.semnall-call .avatar svg {
  width: 42px;
  height: 42px;
  margin: 0;
  position: absolute;
  right: 6px;
  bottom: 8px;
  border: 3px solid #07111f;
  background: #16a34a;
}

.semnall-call-ringing .avatar:before,
.semnall-call-ringing .avatar:after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  animation: semnall-pulse 1.8s ease-out infinite;
}

.semnall-call-ringing .avatar:after {
  animation-delay: 0.55s;
}

.semnall-call.wo_calling_modals .modal-footer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  padding: 28px 20px 32px;
}

.semnall-call.wo_calling_modals .modal-footer .btn {
  width: auto;
  min-width: 108px;
  max-width: 150px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}

.semnall-call.wo_calling_modals .modal-footer .btn svg {
  width: 64px;
  height: 64px;
  padding: 16px;
  border-radius: 50%;
  background: #e11d48;
  color: #fff;
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.35);
}

.semnall-call.wo_calling_modals .modal-footer .answer-call svg {
  background: #16a34a;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.35);
}

.semnall-call-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.semnall-call-live #me,
.semnall-call-live #remote-media audio,
.semnall-call-live #remote-media video,
.semnall-call-live #me audio,
.semnall-call-live #me video {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.semnall-call-live #remote-media {
  min-height: 0;
}

.semnall-call-live #remote-media h3 {
  color: rgba(248, 250, 252, 0.78);
  font-size: 14px;
  font-weight: 500;
  padding: 0;
  margin: 8px 0 0;
}

.semnall-call-tool {
  width: auto;
  min-width: 76px;
  border: 0;
  background: transparent;
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.semnall-call-tool svg,
.semnall-video-controls .semnall-call-tool svg {
  width: 56px;
  height: 56px;
  padding: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.semnall-call-tool.is-off svg,
.semnall-video-controls .semnall-call-tool.is-off svg {
  background: #fff;
  color: #0f172a;
}

.semnall-call-live .semnall-call-tool svg {
  width: 64px;
  height: 64px;
  padding: 16px;
}

body.semnall-video-call {
  background: #070b14;
}

body.semnall-video-call .header-container,
body.semnall-video-call footer,
body.semnall-video-call .second-footer,
body.semnall-video-call .ad-placement-header-footer,
body.semnall-video-call .left-sidebar {
  display: none !important;
}

body.semnall-video-call .content-container {
  margin-top: 0;
  padding: 0;
  max-width: none;
  width: 100%;
}

body.semnall-video-call .video-con.semnall-video {
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
  background: #070b14;
}

.semnall-video-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(56, 189, 248, 0.16), transparent 32%),
    #070b14;
}

#livekit-remote,
#livekit-remote video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

#livekit-remote .semnall-tile {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0b1220;
}

#livekit-remote.is-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 8px 108px;
  overflow: auto;
}

#livekit-remote.is-grid .semnall-tile {
  position: relative;
  inset: auto;
  min-height: 140px;
  height: 100%;
  border-radius: 16px;
}

.semnall-expand-toggle {
  display: none;
}

#semnall-call-shell {
  display: none;
}

body.semnall-call-shell-open #semnall-call-shell {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 20040;
  width: 100%;
  height: 100dvh;
  background: #070b14;
}

#semnall-invite-sheet,
#semnall-incoming-invite {
  position: fixed;
  inset: 0;
  z-index: 20070;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: rgba(2, 6, 23, 0.62);
}

.semnall-invite-card {
  width: min(440px, 100%);
  max-height: min(78dvh, 720px);
  overflow: auto;
  padding: 18px;
  border-radius: 24px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.semnall-invite-card h3 {
  margin: 0;
  font-size: 22px;
}

.semnall-invite-card p {
  color: rgba(248, 250, 252, 0.78);
}

.semnall-invite-card input {
  width: 100%;
  margin: 8px 0 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.semnall-invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.semnall-invite-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.semnall-invite-send,
.semnall-invite-accept,
.semnall-invite-decline,
.semnall-invite-close {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}

.semnall-invite-send,
.semnall-invite-accept {
  background: #16a34a;
  color: #fff;
}

.semnall-invite-decline,
.semnall-invite-close {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.semnall-invite-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

#livekit-remote h3 {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 28vh 24px 0;
  color: #fff;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}

.semnall-video-wait {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
}

.semnall-video-wait h3 {
  padding: 0;
}

.semnall-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  animation: semnall-spin 0.8s linear infinite;
}

.semnall-video-top {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.semnall-video-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.62);
  color: #fff;
  backdrop-filter: blur(14px);
}

.semnall-video-person img,
.semnall-avatar-fallback {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #1e293b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.semnall-video-person strong,
.semnall-video-person span {
  display: block;
  text-align: left;
}

.semnall-video-person strong {
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.semnall-video-person span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.semnall-video-top .semnall-call-timer {
  margin: 0;
  background: rgba(7, 17, 31, 0.62);
  backdrop-filter: blur(14px);
}

#livekit-local:empty {
  display: none;
}

#livekit-local {
  position: absolute;
  right: 18px;
  bottom: 112px;
  width: min(188px, 32vw);
  aspect-ratio: 3 / 4;
  z-index: 4;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

#livekit-local video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  background: #020617;
}

.semnall-video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.semnall-video-controls .end_vdo_call {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  width: auto;
  min-width: 92px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
}

.semnall-video-controls .end_vdo_call svg {
  width: 64px;
  height: 64px;
  margin: 0;
  padding: 16px;
  border-radius: 50%;
  background: #e11d48;
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.38);
}

#livekit-remote .btn,
.semnall-call-live #remote-media .btn {
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  padding: 10px 16px;
}

#semnall-call-summary {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.semnall-summary-card {
  width: min(480px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 26px 22px 20px;
  border-radius: 28px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.semnall-summary-kicker {
  margin: 0;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.semnall-summary-card h2 {
  margin: 6px 0 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.semnall-duration {
  margin: 8px 0 0;
  font-size: 42px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.semnall-summary-label {
  margin: 22px 0 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.semnall-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.semnall-person img,
.semnall-person .semnall-avatar-fallback {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
}

.semnall-person strong {
  font-size: 16px;
}

.semnall-you {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #86efac;
  font-size: 12px;
  font-weight: 700;
  vertical-align: 1px;
}

.semnall-rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
}

.semnall-rate-row > span {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
}

.semnall-stars {
  display: flex;
  gap: 6px;
}

.semnall-stars button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.35);
  font-size: 18px;
  line-height: 1;
}

.semnall-stars button.is-on {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.5);
}

.semnall-summary-card textarea {
  width: 100%;
  min-height: 74px;
  margin-top: 8px;
  padding: 12px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.semnall-summary-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.semnall-summary-actions button,
.semnall-summary-note {
  border-radius: 999px;
  font-weight: 700;
}

.semnall-summary-actions button {
  border: 0;
  padding: 11px 16px;
}

.semnall-summary-skip {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.semnall-summary-send {
  background: #fff;
  color: #0f172a;
}

.semnall-summary-send:disabled {
  opacity: 0.55;
}

.semnall-summary-note {
  margin: 12px 0 0;
  color: #cbd5e1;
  font-size: 14px;
}

body.semnall-summary-open {
  overflow: hidden;
}

@keyframes semnall-pulse {
  0% { transform: scale(0.86); opacity: 0.7; }
  100% { transform: scale(1.18); opacity: 0; }
}

@keyframes semnall-dot {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.65); }
  100% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}

@keyframes semnall-spin {
  to { transform: rotate(360deg); }
}

body.semnall-call-minimized {
  overflow: auto;
}

body.semnall-call-minimized .modal-backdrop {
  display: none !important;
}

body.semnall-call-minimized.semnall-video-call .header-container,
body.semnall-call-minimized.semnall-video-call footer,
body.semnall-call-minimized.semnall-video-call .second-footer,
body.semnall-call-minimized.semnall-video-call .left-sidebar {
  display: block !important;
}

body.semnall-call-minimized.semnall-video-call .content-container {
  margin-top: 78px;
}

body.semnall-call-minimized .semnall-video-stage,
body.semnall-call-minimized #semnall-call-shell {
  position: fixed;
  inset: auto 8px calc(8px + env(safe-area-inset-bottom)) auto;
  z-index: 20050;
  width: min(220px, calc(100vw - 16px));
  height: 300px;
  min-height: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

body.semnall-call-minimized .semnall-video-top,
body.semnall-call-minimized .semnall-add-toggle,
body.semnall-call-minimized .semnall-min-toggle,
body.semnall-call-minimized .semnall-cam-toggle {
  display: none !important;
}

body.semnall-call-minimized .semnall-expand-toggle {
  display: inline-flex;
}

body.semnall-call-minimized #re-talking-modal {
  display: block !important;
  position: fixed !important;
  inset: auto 8px calc(8px + env(safe-area-inset-bottom)) auto !important;
  width: min(360px, calc(100vw - 16px));
  height: auto;
  z-index: 20050;
  overflow: hidden;
  padding: 0 !important;
}

body.semnall-call-minimized #re-talking-modal .modal-dialog {
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
}

body.semnall-call-minimized #re-talking-modal .semnall-call.modal-content {
  min-height: 0;
  height: auto;
  border-radius: 22px;
}

body.semnall-call-minimized #re-talking-modal .avatar,
body.semnall-call-minimized #re-talking-modal .semnall-call-kicker,
body.semnall-call-minimized #re-talking-modal .semnall-call-livestatus {
  display: none;
}

body.semnall-call-minimized #re-talking-modal .modal-body {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0.01;
  pointer-events: none;
}

body.semnall-call-minimized #re-talking-modal .modal-header,
body.semnall-call-minimized #re-talking-modal .modal-footer {
  padding: 10px 12px;
}

body.semnall-call-minimized .semnall-video-controls .semnall-call-tool svg,
body.semnall-call-minimized .semnall-video-controls .end_vdo_call svg,
body.semnall-call-minimized #re-talking-modal .semnall-call-tool svg {
  width: 42px;
  height: 42px;
  padding: 10px;
}

@media (max-width: 640px) {
  #calling-modal,
  #re-calling-modal,
  #re-talking-modal {
    padding: 0 !important;
  }

  .semnall-call-dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
  }

  .semnall-call.modal-content {
    min-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .semnall-call.wo_calling_modals > img,
  .semnall-call.wo_calling_modals:after {
    border-radius: 0;
  }

  .semnall-call .modal-title,
  .semnall-summary-card h2 {
    font-size: 24px;
  }

  body.semnall-video-call .video-con.semnall-video,
  .semnall-video-stage {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
  }

  #livekit-local {
    width: 92px;
    right: 10px;
    bottom: calc(108px + env(safe-area-inset-bottom));
    border-radius: 14px;
  }

  .semnall-video-controls {
    left: 8px;
    right: 8px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
    flex-wrap: wrap;
  }

  .semnall-video-controls .semnall-call-tool svg,
  .semnall-call-live .semnall-call-tool svg,
  .semnall-video-controls .end_vdo_call svg {
    width: 52px;
    height: 52px;
    padding: 13px;
  }

  #semnall-call-summary {
    padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
    align-items: stretch;
  }

  .semnall-summary-card {
    width: 100%;
    max-height: 100%;
    overflow: auto;
  }

  #semnall-invite-sheet,
  #semnall-incoming-invite {
    padding: 0;
    align-items: stretch;
  }

  .semnall-invite-card {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  body.semnall-call-minimized #re-talking-modal,
  body.semnall-call-minimized .semnall-video-stage,
  body.semnall-call-minimized #semnall-call-shell {
    left: 8px;
    right: 8px;
    width: auto;
    height: auto;
    min-height: 84px;
  }

  body.semnall-call-minimized .semnall-video-stage,
  body.semnall-call-minimized #semnall-call-shell {
    height: 168px;
  }

  .semnall-stars button {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .semnall-call-ringing .avatar:before,
  .semnall-call-ringing .avatar:after,
  .semnall-call-ringing .semnall-call-dot,
  .semnall-spinner {
    animation: none;
  }
}
