/* CYVARIX Voiceflow Safari normalization.
   The page itself uses a dark browser color scheme, while the widget surface is light. */
.vfrc-widget,
.vfrc-chat,
.vf-footer,
.vfrc-input {
  color-scheme: light;
}

.vfrc-chat-input {
  color-scheme: light;
  background-color: #ffffff !important;
  color: #111827 !important;
  caret-color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

.vfrc-chat-input::placeholder {
  color: #6b7280 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #6b7280 !important;
}

img.vfrc-avatar {
  border-radius: 12.5% !important;
}

/* Mobile viewport geometry only; conversation and assistant configuration unchanged. */
@media (max-width: 768px) {
  .vfrc-widget {
    position: fixed !important;
    top: var(--cy-viewport-offset-top, 0px) !important;
    left: var(--cy-viewport-offset-left, 0px) !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--cy-viewport-width, 100vw) !important;
    height: var(--cy-viewport-height, 100dvh) !important;
    max-height: var(--cy-viewport-height, 100dvh) !important;
  }
  .vfrc-chat__container,
  .vfrc-chat__container-inner,
  .vfrc-chat {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    min-width: 0;
  }
  .vfrc-chat__container {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .vfrc-header {
    flex-shrink: 0;
    height: auto;
    min-height: 56px;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .vfrc-chat-dialog__container {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .vfrc-footer {
    flex-shrink: 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
  .vfrc-chat-input {
    font-size: 16px !important;
    max-height: min(120px, calc(var(--cy-viewport-height, 100dvh) * 0.25));
    overflow-y: auto !important;
  }
}
