/* Extra styles for interactive demo states, chat UI, form feedback, mobile drawer, and privacy modal */

/* Frosted glass backdrop on sticky header so links remain legible over dark/colored sections */
header.css-1lncghk {
  background: rgba(255, 255, 255, 0.86) !important;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(14, 14, 18, 0.06);
}

/* Logo sizing alignment */
.yy-logo-header {
  height: 34px;
  width: auto;
  display: block;
  user-select: none;
}

.yy-logo-footer {
  height: 34px;
  width: auto;
  display: block;
  user-select: none;
}

.yy-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-bottom: 48px;
}

@media (min-width: 768px) {
  .yy-footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
  }
}

/* Demo timer pill (replaces mode switcher during live call) */
.yy-demo-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(14, 14, 18, 0.08);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--chakra-colors-fg, #0e0e12);
}

.yy-demo-status-active {
  color: var(--chakra-colors-brand-600, #4611d6) !important;
}

/* Error note banner */
.yy-error-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #fff1f1;
  border: 1px solid #ffc7c7;
  animation: fadeUp 0.3s ease-out both;
}

.yy-error-note-icon {
  color: #dc2626;
  flex-shrink: 0;
  margin-top: 2px;
}

.yy-error-note-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 1.45;
  color: #0e0e12;
}

.yy-error-note a,
.yy-inline-reload {
  color: var(--chakra-colors-brand-600, #4611d6);
  font-weight: 700;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.yy-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.yy-btn-sm-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9999px;
  border: 0;
  background: var(--chakra-colors-brand-600, #5416f7);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.yy-btn-sm-brand:hover {
  background: #4310cf;
}

.yy-btn-sm-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9999px;
  border: 1px solid rgba(14, 14, 18, 0.16);
  background: #ffffff;
  color: #0e0e12;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.yy-btn-sm-outline:hover {
  background: #f5f5f7;
}

/* Hangup & Ended action buttons */
.yy-btn-hangup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 9999px;
  background: rgba(254, 226, 226, 0.85);
  color: #dc2626;
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.yy-btn-hangup:hover {
  background: #fee2e2;
  transform: translateY(-1px);
}

.yy-btn-ended-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 9999px;
  background: #0e0e12;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
}

.yy-btn-ended-cta:hover {
  background: var(--chakra-colors-brand-600, #5416f7);
}

.yy-btn-ended-again {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 9999px;
  background: #ffffff;
  color: #0e0e12;
  border: 1px solid rgba(14, 14, 18, 0.14);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.yy-btn-ended-again:hover {
  background: #f7f7f9;
}

.yy-call-btn-muted {
  background: #ffe4e6 !important;
  color: #be123c !important;
  border: 1px solid #fda4af !important;
  box-shadow: none !important;
}

.yy-ended-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  max-width: 340px;
  animation: fadeUp 0.4s ease-out both;
}

.yy-ended-icon {
  color: #22c55e;
  width: 40px;
  height: 40px;
}

.yy-ended-title {
  font-weight: 800;
  font-size: 18px;
  color: #0e0e12;
}

.yy-ended-text {
  font-size: 14px;
  color: #52525b;
  line-height: 1.5;
}

/* Orb live / connecting / muted states */
.yy-orb-live {
  animation: none !important;
}

.yy-orb-spin-fast {
  animation-duration: 4s !important;
}

.yy-orb-bar-live {
  animation: none !important;
}

.yy-orb-bar-connecting {
  animation-name: eqWave !important;
  animation-duration: 0.9s !important;
}

.yy-orb-mic-badge {
  position: absolute;
  bottom: 13%;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--orb) * 0.17);
  height: calc(var(--orb) * 0.17);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Transcript & Chat bubbles */
.yy-log {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 8px;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
  mask-image: linear-gradient(to bottom, transparent 0, black 22px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 22px);
}

.yy-log-spacer {
  flex: 1;
}

.yy-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 88%;
  animation: fadeUp 0.3s ease-out both;
}

.yy-bubble-wrap.is-user {
  align-self: flex-end;
}

.yy-bubble-wrap.is-assistant {
  align-self: flex-start;
}

.yy-bubble-sender {
  font-size: 11px;
  font-weight: 700;
  color: #71717a;
  padding: 0 4px;
}

.yy-bubble-wrap.is-user .yy-bubble-sender {
  text-align: right;
}

.yy-bubble-text {
  font-size: 14px;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.yy-bubble-wrap.is-user .yy-bubble-text {
  background: var(--chakra-colors-brand-600, #5416f7);
  color: #ffffff;
  border-bottom-right-radius: 6px;
}

.yy-bubble-wrap.is-assistant .yy-bubble-text {
  background: #ffffff;
  color: #0e0e12;
  border: 1px solid rgba(14, 14, 18, 0.08);
  border-bottom-left-radius: 6px;
}

.yy-bubble-text.is-streaming::after {
  content: "▍";
  margin-left: 2px;
  color: #5416f7;
  animation: blink 1s step-end infinite;
}

.yy-tool-pill {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: #f2edff;
  color: #4611d6;
  font-size: 12px;
  font-weight: 700;
  animation: fadeUp 0.3s ease-out both;
}

.yy-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border-bottom-left-radius: 6px;
  background: #ffffff;
  border: 1px solid rgba(14, 14, 18, 0.08);
}

.yy-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #7c4dff;
  animation: dotBounce 1.2s ease-in-out infinite;
}

/* Chat mode container */
.yy-chat-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 500px;
}

@media (min-width: 768px) {
  .yy-chat-wrap {
    height: 534px;
  }
}

.yy-chat-box {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.yy-chat-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 0 4px;
}

.yy-chat-prompt-btn {
  font-size: 12px;
  line-height: 1.3;
  padding: 5px 11px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid rgba(14, 14, 18, 0.12);
  color: #0e0e12;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.yy-chat-prompt-btn:hover:not(:disabled) {
  border-color: #5416f7;
  background: #f8f5ff;
}

.yy-chat-prompt-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.yy-chat-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.yy-chat-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(14, 14, 18, 0.12);
  color: #0e0e12;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.yy-chat-input:focus {
  background: #ffffff;
  border-color: #5416f7;
}

.yy-chat-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 0;
  background: #0e0e12;
  color: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.yy-chat-send:hover:not(:disabled) {
  background: #5416f7;
}

.yy-chat-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.yy-chat-ended {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  animation: fadeUp 0.3s ease-out both;
}

/* Mode & scenario active states */
.yy-tab-active {
  background: #ffffff !important;
  color: #0e0e12 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

.yy-tab-inactive {
  background: transparent !important;
  color: #52525b !important;
  box-shadow: none !important;
}

.yy-mode-active {
  background: #0e0e12 !important;
  color: #ffffff !important;
}

.yy-mode-inactive {
  background: transparent !important;
  color: #52525b !important;
}

/* Lead form validation & success states */
.yy-field-error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #dc2626;
}

.yy-input-invalid {
  border-color: #dc2626 !important;
  background: #fff5f5 !important;
}

.yy-form-generic-error {
  font-size: 14px;
  color: #b91c1c;
  background: #fff1f1;
  border: 1px solid #fecaca;
  padding: 12px;
  border-radius: 12px;
}

.yy-form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 40px 12px;
  animation: fadeUp 0.4s ease-out both;
}

.yy-form-success-title {
  font-size: 24px;
  font-weight: 800;
  color: #0e0e12;
}

.yy-form-success-text {
  font-size: 15px;
  color: #52525b;
  max-width: 360px;
  line-height: 1.5;
}

.yy-form-again {
  margin-top: 8px;
  background: transparent;
  border: 0;
  color: #5416f7;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 9999px;
}

.yy-form-again:hover {
  background: #f3efff;
}

/* Checkbox unchecked state */
.chakra-checkbox__control[data-state="unchecked"] {
  background: #ffffff !important;
  border-color: #d4d4d8 !important;
}

.chakra-checkbox__control[data-state="unchecked"] svg {
  opacity: 0;
}

.chakra-checkbox__root {
  cursor: pointer;
}

/* Mobile drawer */
.yy-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(14, 14, 18, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.yy-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.yy-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1201;
  width: min(320px, 86vw);
  background: #ffffff;
  box-shadow: -12px 0 40px rgba(14, 14, 18, 0.16);
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateX(100%);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.yy-drawer-panel.is-open {
  transform: translateX(0);
}

.yy-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.yy-drawer-close {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  border: 1px solid rgba(14, 14, 18, 0.12);
  background: #ffffff;
  color: #0e0e12;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.yy-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yy-drawer-link {
  display: block;
  padding: 12px 10px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #0e0e12;
  text-decoration: none;
}

.yy-drawer-link:hover {
  background: #f4f4f6;
}

.yy-drawer-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: 9999px;
  background: #0e0e12;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

/* Native Privacy Policy <dialog> modal */
dialog.yy-modal {
  margin: auto;
  max-width: min(680px, 92vw);
  max-height: 84vh;
  border: 1px solid rgba(14, 14, 18, 0.1);
  border-radius: 24px;
  padding: 0;
  background: #ffffff;
  color: #0e0e12;
  box-shadow: 0 24px 80px rgba(14, 14, 18, 0.22);
  overflow: hidden;
}

dialog.yy-modal::backdrop {
  background: rgba(14, 14, 18, 0.52);
  backdrop-filter: blur(4px);
}

.yy-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(14, 14, 18, 0.08);
}

.yy-modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.yy-modal-body {
  padding: 20px 24px 28px;
  overflow-y: auto;
  max-height: calc(84vh - 76px);
  font-size: 14px;
  line-height: 1.65;
  color: #3f3f46;
}

.yy-modal-body h3 {
  margin: 18px 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: #0e0e12;
}

.yy-modal-body p {
  margin: 0 0 10px;
}

.yy-hidden {
  display: none !important;
}
