.call-controls {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid rgba(38, 48, 40, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 8px 22px rgba(28, 39, 31, .06);
}

.call-control {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.call-control:hover { background: #e8efe8; color: var(--olive-dark); transform: translateY(-1px); }
.call-control:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; }
.call-control svg { width: 17px; height: 17px; }

.call-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(12, 17, 14, .72);
  backdrop-filter: blur(16px);
}

.call-modal.hidden { display: none; }

.call-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(820px, 100%);
  min-height: min(590px, calc(100dvh - 44px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 26px;
  background: #111713;
  color: #f5f7f2;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .38);
}

.call-dialog-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 18px;
}

.call-dialog-top .eyebrow { margin: 0 0 7px; color: #b9c7b6; }
.call-dialog-top h2 { margin: 0; color: #fff; font: 600 clamp(1.2rem, 2vw, 1.65rem)/1.15 var(--font-sans, Arial, sans-serif); letter-spacing: -.03em; }
.call-status { min-height: 1.3em; margin: 7px 0 0; color: #b9c7b6; font-size: .84rem; }

.call-modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: transparent;
  color: #e9eee8;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.call-modal-close:hover { background: rgba(255, 255, 255, .1); }

.call-stage {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 320px;
  margin: 0 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 20px;
  background: radial-gradient(circle at 50% 25%, #26352b 0, #18231c 42%, #0c110e 100%);
}

.call-remote-video { width: 100%; height: 100%; min-height: 320px; object-fit: cover; background: #0c110e; }
.call-local-video { position: absolute; right: 16px; bottom: 16px; width: min(25%, 180px); aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid rgba(255, 255, 255, .34); border-radius: 13px; background: #29362d; box-shadow: 0 12px 30px rgba(0, 0, 0, .32); }
.call-stage.audio-mode .call-remote-video, .call-stage.audio-mode .call-local-video { display: none; }

.call-audio-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 11px;
  color: #dfe9dd;
  text-align: center;
}

.call-audio-avatar {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: #405744;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 600;
}

.call-audio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.call-audio-label { margin: 0; color: #aebdaf; font-size: .77rem; letter-spacing: .13em; text-transform: uppercase; }

.call-incoming-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 15px;
  background: rgba(14, 20, 16, .84);
  backdrop-filter: blur(14px);
}

.call-incoming-card.hidden { display: none; }
.call-incoming-card p { margin: 0; color: #dce6da; font-size: .85rem; }
.call-incoming-actions { display: flex; gap: 8px; }

.call-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #f5f7f2;
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.call-action-button:hover { background: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.call-action-button.primary { border-color: #b5c99f; background: #b5c99f; color: #152017; }
.call-action-button.primary:hover { background: #c9dcb7; }
.call-action-button.danger { border-color: #b87872; background: #a7554e; color: #fff; }
.call-action-button svg { width: 16px; height: 16px; }

.call-actions { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px 26px 24px; }
.call-actions .call-action-button { min-width: 42px; padding: 0 15px; }
.call-actions .call-action-button[hidden] { display: none; }
.call-actions .call-action-button.hangup { min-width: 104px; }

@media (max-width: 640px) {
  .call-controls { gap: 2px; padding: 2px; }
  .call-control { width: 31px; height: 31px; }
  .call-control svg { width: 16px; height: 16px; }
  .call-modal { padding: 10px; }
  .call-dialog { min-height: calc(100dvh - 20px); border-radius: 20px; }
  .call-dialog-top { padding: 20px 18px 14px; }
  .call-stage { min-height: 250px; margin: 0 10px; border-radius: 16px; }
  .call-remote-video { min-height: 250px; }
  .call-local-video { right: 10px; bottom: 10px; width: 34%; }
  .call-incoming-card { right: 10px; bottom: 10px; left: 10px; align-items: flex-start; flex-direction: column; }
  .call-incoming-actions { width: 100%; }
  .call-incoming-actions .call-action-button { flex: 1; }
  .call-actions { padding: 16px 14px 18px; }
  .call-actions .call-action-button { min-width: 38px; padding: 0 12px; }
  .call-actions .call-action-button.hangup { min-width: 92px; }
}
