/* ========================================================
   Chatwoot Call UI Styles (Phase 3B-3B)
   Floating incoming call card & active call floating controller
   Works across Desktop (1440px) and Mobile (390px, 430px)
   ======================================================== */

#cw-call-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147483000;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Incoming Call Card */
.cw-incoming-card {
  position: fixed;
  pointer-events: auto;
  z-index: 2147483001;
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  animation: cw-slide-down 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

/* Desktop positioning */
@media (min-width: 769px) {
  .cw-incoming-card {
    top: 20px;
    right: 24px;
    width: 360px;
  }
}

/* Mobile positioning (390px, 430px) */
@media (max-width: 768px) {
  .cw-incoming-card {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: calc(100% - 24px);
    margin: 0 auto;
  }
}

.cw-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cw-pulse-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cw-pulse-icon::before,
.cw-pulse-icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: cw-pulse-wave 1.6s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
}

.cw-pulse-icon::after {
  animation-delay: 0.5s;
}

@keyframes cw-pulse-wave {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.cw-card-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cw-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.cw-card-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw-card-actions {
  display: flex;
  gap: 10px;
}

.cw-btn {
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: opacity 0.15s ease, transform 0.1s ease;
  padding: 0 16px;
  flex: 1;
}

.cw-btn:active {
  transform: scale(0.97);
}

.cw-btn-reject {
  background: #374151;
  color: #fca5a5;
}

.cw-btn-reject:hover {
  background: #4b5563;
}

.cw-btn-accept {
  background: #10b981;
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.cw-btn-accept:hover {
  background: #059669;
}

/* The agent's call waiting for the customer: a small window, the chat stays usable behind it */
.cw-outgoing-card {
  position: fixed;
  pointer-events: auto;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 24, 39, 0.96);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  animation: cw-slide-down 0.2s ease-out;
}

@media (min-width: 881px) {
  .cw-outgoing-card {
    top: 84px;
    right: 28px;
    width: 320px;
  }
}

@media (max-width: 880px) {
  .cw-outgoing-card {
    top: calc(64px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
  }
}

.cw-outgoing-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.cw-outgoing-text {
  flex: 1;
  min-width: 0;
}

.cw-outgoing-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-outgoing-status {
  color: #d1d5db;
  font-size: 13px;
  line-height: 18px;
}

.cw-outgoing-actions {
  flex: none;
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.cw-outgoing-actions:empty {
  display: none;
}

.cw-outgoing-btn {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: #374151;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.cw-outgoing-btn:hover {
  background: #4b5563;
}

.cw-outgoing-btn.is-cancel {
  color: #fca5a5;
}

.cw-outgoing-btn.is-primary {
  background: #086de0;
}

.cw-outgoing-btn.is-primary:hover {
  background: #075fc4;
}

.cw-outgoing-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Active Call Floating Controller */
.cw-active-call-bar {
  position: fixed;
  pointer-events: auto;
  z-index: 2147483002;
  background: rgba(17, 24, 39, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  border-radius: 24px;
  padding: 8px 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-sizing: border-box;
  animation: cw-slide-down 0.25s ease;
}

@media (min-width: 769px) {
  .cw-active-call-bar {
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 380px;
  }
}

@media (max-width: 768px) {
  .cw-active-call-bar {
    top: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: calc(100% - 20px);
  }
}

.cw-call-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cw-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  animation: cw-dot-pulse 1.4s infinite;
}

@keyframes cw-dot-pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.cw-call-label {
  font-size: 13px;
  font-weight: 500;
  color: #f3f4f6;
}

.cw-call-timer {
  font-size: 13px;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.5px;
}

.cw-call-actions {
  display: flex;
  gap: 8px;
}

#cw-call-notice { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 2147483003; padding: 10px 16px; border-radius: 12px; background: rgba(17, 24, 39, 0.96); color: #fff; font-size: 14px; white-space: nowrap; pointer-events: none; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4); }

/* The bar stays out of the way of the workbench's own controls (RC21b). In a chat it sits under the top blocks. On the list it takes its own place
   under the search box, moved there by cw-mobile.js. Elsewhere it sits above the bottom bar. Mute and hang up stay on it, and tapping the rest opens the call (RC22). */
html.cw-on-chat .cw-active-call-bar { top: 76px; left: 464px; transform: none; animation: none; }
@media (max-width: 880px) {
  html.cw-agent-slim .cw-active-call-bar { top: calc(62px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; bottom: auto; width: auto; min-width: 0; max-width: none; transform: none; flex-wrap: wrap; padding: 6px 14px; border-radius: 20px; animation: none; }
  html.cw-agent-slim .cw-active-call-bar .cw-call-left { min-height: 32px; cursor: pointer; flex: 1 1 auto; }
  html.cw-agent-slim .cw-active-call-bar .cw-local-degraded { flex: 1 1 100%; margin: 4px 0; }
  html.cw-agent-slim.cw-tabs-on:not(.cw-on-chat) .cw-active-call-bar, html.cw-agent-slim:has(.relative.items-center.w-full.p-4) .cw-active-call-bar { top: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  html.cw-agent-slim:has(.relative.items-center.w-full.p-4) .cw-active-call-bar { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
html.cw-agent-slim .cw-active-call-bar.is-in-list { position: static; flex: none; top: auto; right: auto; bottom: auto; left: auto; width: auto; min-width: 0; max-width: none; margin: 0 12px 8px; padding: 6px 14px; border-radius: 16px; transform: none; box-shadow: none; animation: none; }

.cw-call-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  touch-action: manipulation;
  background: #374151;
  color: #f3f4f6;
}

.cw-btn-mute.is-muted {
  background: #f3f4f6;
  color: #1c2024;
}

.cw-btn-hangup {
  background: #ef4444;
  color: #fff;
}

.cw-btn-hangup:hover {
  background: #dc2626;
}

.cw-output-slot {
  position: relative;
  display: inline-flex;
}

.cw-output-slot:empty {
  display: none;
}

.cw-output-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: 240px;
  padding: 4px;
  border-radius: 10px;
  background: #1c2024;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* The video panel is narrow and clips its contents, so its menu stays centred over the button. */
.cw-video-actions .cw-output-menu {
  right: auto;
  left: 50%;
  width: 200px;
  transform: translateX(-50%);
}

/* Voice shrunk: the green bar goes back to the call. Same place as before, a different colour. */
.cw-active-call-bar.is-return {
  background: #15803d;
  border-color: transparent;
}

.cw-active-call-bar.is-covered {
  display: none;
}

.is-return .cw-call-left {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  cursor: pointer;
}

.is-return .cw-call-label,
.is-return .cw-call-timer {
  color: #fff;
}

.is-return .cw-status-dot {
  background: #fff;
}

.is-return .cw-call-btn:not(.cw-btn-hangup) {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.is-return .cw-btn-mute.is-muted {
  background: #fff;
  color: #1c2024;
}

/* The audio bar sits at the top of the screen, so its menu opens downwards. */
.cw-active-call-bar .cw-output-menu {
  top: calc(100% + 8px);
  bottom: auto;
}

.cw-output-row {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f3f4f6;
  font-size: 13px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.cw-output-row:hover {
  background: rgba(255, 255, 255, 0.12);
}

.cw-output-row[aria-checked="true"] {
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
}

@keyframes cw-slide-down {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (min-width: 769px) {
  @keyframes cw-slide-down {
    from {
      transform: translate(-50%, -20px);
      opacity: 0;
    }
    to {
      transform: translate(-50%, 0);
      opacity: 1;
    }
  }
}

/* The call, full screen: the same layout and colours as the customer's call page (VisitorSupport.vue). */
.cw-call-screen {
  position: fixed;
  inset: 0;
  z-index: 2147483003;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  background: linear-gradient(165deg, #2f4fd8 0%, #5b3fd6 55%, #7a3ee0 100%);
  color: #fff;
  pointer-events: auto;
}

.cw-call-screen *,
.cw-call-screen *::before,
.cw-call-screen *::after {
  box-sizing: border-box;
}

/* Shrunk: one box with the customer's picture. Moved by finger or mouse, settles on the nearest side, never in the way of the reply box. */
.cw-active-video-panel.minimized {
  inset: auto;
  top: 0;
  left: 0;
  width: 112px;
  height: 150px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.cw-active-video-panel.minimized.is-dragging,
.cw-local-video.is-dragging {
  cursor: grabbing;
}

.cw-call-screen.is-settling,
.cw-local-video.is-settling {
  transition: transform 0.18s ease-out;
}

.cw-active-video-panel.minimized .cw-local-video,
.cw-active-video-panel.minimized .cw-video-header,
.cw-active-video-panel.minimized .cw-video-actions,
.cw-active-video-panel.minimized .cw-local-degraded,
.cw-active-video-panel.minimized .cw-call-name,
.cw-active-video-panel.minimized .cw-call-hint {
  display: none !important;
}

.cw-remote-video {
  position: absolute;
  inset: 0;
  background: #0b0d10;
}

.cw-remote-video video {
  object-fit: cover !important;
}

.cw-remote-off,
.cw-voice-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 12vh) 16px 16px;
  text-align: center;
}

.cw-remote-off {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(165deg, #2f4fd8 0%, #5b3fd6 55%, #7a3ee0 100%);
}

.cw-voice-center {
  flex: 1;
  min-height: 0;
}

.cw-call-avatar {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.cw-call-avatar::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 16px rgba(255, 255, 255, 0.06);
}

.cw-call-avatar svg {
  position: relative;
}

.cw-active-video-panel.minimized .cw-remote-off {
  justify-content: center;
  padding: 0;
}

.cw-active-video-panel.minimized .cw-call-avatar {
  width: 56px;
  height: 56px;
  margin: 0;
}

.cw-active-video-panel.minimized .cw-call-avatar::before {
  display: none;
}

.cw-active-video-panel.minimized .cw-call-avatar svg {
  width: 32px;
  height: 32px;
}

.cw-call-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-call-hint {
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

/* Own picture, moved around while full screen. */
.cw-local-video {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 96px;
  height: 136px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.cw-camera-off-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
}

.cw-video-header {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: calc(env(safe-area-inset-top, 0px) + 4px) 8px 4px;
  pointer-events: none;
}

.cw-video-header > * {
  pointer-events: auto;
}

.cw-video-timer {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.cw-video-min-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

/* One row at the bottom, always there: a round button and its word. The end button is the only solid colour. */
.cw-video-actions {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(4px, 3vw, 20px);
  padding: 16px 12px calc(env(safe-area-inset-bottom, 0px) + 24px);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
}

.is-voice .cw-video-actions {
  background: none;
}

.cw-call-item,
.cw-call-screen .cw-output-slot {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 60px;
}

.cw-call-item[hidden] {
  display: none;
}

.cw-call-screen .cw-output-slot:empty {
  display: none;
}

.cw-call-item-label {
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.cw-video-action-btn {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  -webkit-tap-highlight-color: transparent;
}

.cw-video-action-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.cw-video-action-btn.is-muted,
.cw-video-action-btn.is-muted:hover,
.cw-video-action-btn.is-lit,
.cw-video-action-btn.is-lit:hover {
  background: #fff;
  color: #1c2024;
}

.cw-video-action-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Greyed, but a press still says why. */
.cw-video-action-btn.is-unavailable,
.cw-video-action-btn.is-unavailable:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.45);
}

.cw-video-action-btn.cw-hangup,
.cw-video-action-btn.cw-hangup:hover {
  background: #ef4444;
  color: #fff;
}

.cw-video-action-btn:focus-visible,
.cw-video-min-btn:focus-visible,
.cw-mini-hangup:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.cw-mini-bar {
  display: none;
}

.cw-active-video-panel.minimized .cw-mini-bar {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px;
  font-size: 12px;
  pointer-events: none;
}

.cw-mini-time {
  align-self: flex-start;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  font-variant-numeric: tabular-nums;
}

.cw-mini-hangup {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

.cw-call-screen .cw-local-degraded {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 124px);
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  text-align: center;
  transform: translateX(-50%);
}

@media (max-width: 374px) {
  .cw-call-item,
  .cw-call-screen .cw-output-slot {
    width: 52px;
  }

  .cw-video-action-btn {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 390px) {
  .cw-video-actions {
    flex-wrap: nowrap;
    gap: 2px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .cw-call-item,
  .cw-call-screen .cw-output-slot {
    width: 48px;
  }

  .cw-video-action-btn {
    width: 44px;
    height: 44px;
  }
}

/* Non-fatal local capture notice: the call stays connected and the remote
   audio and video keep playing while this is shown. */
.cw-local-degraded {
  display: none;
  margin: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  line-height: 1.4;
}

/* Is sound getting through: one tap to start the customer's sound, and a hint when one side has had no sound at all.
   Above every call view, full screen, shrunk or the bar, and above the workbench's own notice. */
.cw-sound-alerts {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 2147483004;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}

.cw-sound-unlock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: #1c2024;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cw-sound-unlock:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.cw-sound-hint {
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.9);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.cw-send-guide {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #1c2024;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
}

/* The microphone explanation. Its own layer, above the call, short of the hang-up at the bottom. */
.cw-mic-guide {
  position: fixed;
  z-index: 2147483005;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  left: 12px;
  right: 12px;
  margin: 0 auto;
  max-width: 420px;
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 220px);
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  color: #1c2024;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
}

.cw-mic-guide-text {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
}

.cw-mic-guide-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cw-mic-guide-btn {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: #eef2f6;
  color: #1c2024;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.cw-mic-guide-btn.is-primary {
  background: #2563eb;
  color: #fff;
}

@media (orientation: landscape) {
  .cw-mic-guide {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    max-height: calc(100dvh - 120px);
  }
}

.cw-deaf-line {
  margin: 8px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: #c62828;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.cw-deaf-line[hidden] { display: none; }

.cw-active-call-bar.is-deaf { flex-wrap: wrap; }

.cw-active-call-bar .cw-deaf-line { flex: 1 1 100%; margin: 6px 0 0; }

.cw-route-hint {
  display: block;
  margin: 8px 16px 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
}

.cw-route-hint[hidden] { display: none; }

.cw-active-call-bar .cw-route-hint { flex: 1 1 100%; }

.cw-active-video-panel > .cw-route-hint {
  position: absolute;
  z-index: 3;
  top: calc(env(safe-area-inset-top, 0px) + 96px);
  left: 16px;
  right: 16px;
}

.cw-active-video-panel > .cw-deaf-line {
  position: absolute;
  z-index: 3;
  top: calc(env(safe-area-inset-top, 0px) + 56px);
  left: 16px;
  right: 16px;
}

.cw-active-video-panel.minimized .cw-deaf-line { display: none; }
