/* Vitorscape site guide. Quiet by design: hairlines, the page's typeface,
   one small red dot. Load after the page styles.
   Page overrides (optional): --chat-right, --chat-bottom (desktop),
   --chat-right-sm, --chat-bottom-sm (phones). */

.vc {
  --vc-bg: #f5f5f3;
  --vc-panel: #fafaf8;
  --vc-ink: #0a0a0a;
  --vc-ink-2: #464644;
  --vc-ink-3: #6a6a67;
  --vc-line: rgba(10, 10, 10, .12);
  --vc-line-2: rgba(10, 10, 10, .24);
  --vc-fill: #ebebe7;
  --vc-red: #cf2121;
  --vc-ease: cubic-bezier(.2, .7, .2, 1);
  --vc-r: calc(var(--chat-right, 24px) + env(safe-area-inset-right, 0px));
  --vc-b: calc(var(--chat-bottom, 24px) + env(safe-area-inset-bottom, 0px));
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--vc-ink);
  -webkit-font-smoothing: antialiased;
}
.vc *, .vc *::before, .vc *::after { box-sizing: border-box; }
.vc [hidden] { display: none !important; }
.vc p, .vc h2 { margin: 0; }
.vc button, .vc input { font: inherit; color: inherit; }
.vc svg { display: block; flex: none; }
.vc :focus-visible { outline: 2px solid var(--vc-red); outline-offset: 2px; }
.vc .vc-title:focus { outline: none; }
.vc-sr {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Launcher: a small text pill, nothing more */
.vc .vc-launch {
  position: fixed; z-index: 45;
  right: var(--vc-r);
  bottom: calc(var(--vc-b) + var(--vc-lift, 0px));
  display: inline-flex; align-items: center; gap: 9px;
  height: 40px; margin: 0; padding: 0 16px 0 14px;
  border: 1px solid var(--vc-line-2); border-radius: 999px;
  background: var(--vc-bg); color: var(--vc-ink);
  font-size: 14px; line-height: 1; letter-spacing: -.005em;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .25s var(--vc-ease), opacity .3s var(--vc-ease), visibility 0s;
  animation: vc-in .8s var(--vc-ease) .6s backwards;
}
.vc .vc-launch:hover { border-color: var(--vc-ink); }
.vc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--vc-red); flex: none; }
.vc.is-open .vc-dot { background: var(--vc-ink-3); }
html.menu-open .vc .vc-launch {
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s var(--vc-ease), visibility 0s linear .3s;
}
@keyframes vc-in { from { opacity: 0; } }

/* Panel: desktop sits just above the launcher */
.vc-scrim { display: none; }
.vc-panel {
  position: fixed; z-index: 50;
  right: var(--vc-r);
  bottom: calc(var(--vc-b) + var(--vc-lift, 0px) + 52px);
  width: 380px; max-width: calc(100vw - 32px);
  max-height: min(560px, calc(100vh - var(--vc-lift, 0px) - 170px));
  display: flex; flex-direction: column;
  background: var(--vc-panel);
  border: 1px solid var(--vc-line); border-radius: 6px;
  box-shadow: 0 18px 48px -24px rgba(10, 10, 10, .22);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .22s var(--vc-ease), transform .32s var(--vc-ease);
}
.vc.is-open .vc-panel { opacity: 1; transform: none; pointer-events: auto; }

.vc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 8px 12px 18px;
  border-bottom: 1px solid var(--vc-line);
}
.vc-head > div { flex: 1 1 auto; min-width: 0; }
.vc-title { font-size: 15px; font-weight: 500; line-height: 1.35; letter-spacing: -.01em; }
.vc-status { margin-top: 1px; font-size: 12.5px; line-height: 1.4; color: var(--vc-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--vc-ink-3); vertical-align: .08em; }
.vc-status.is-open::before { background: #2f8a4a; }
.vc-tools { display: flex; align-items: center; flex: none; gap: 2px; }
.vc .vc-tool {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; min-height: 32px; margin: 0; padding: 0 8px;
  border: 0; border-radius: 4px; background: none;
  color: var(--vc-ink-2); font-size: 13px; white-space: nowrap; cursor: pointer;
  transition: color .2s var(--vc-ease);
}
.vc .vc-tool:hover { color: var(--vc-ink); }
.vc-close svg { width: 14px; height: 14px; }

/* Conversation */
.vc-log {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 18px 8px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px);
          mask-image: linear-gradient(to bottom, transparent 0, #000 14px);
  scrollbar-width: thin; scrollbar-color: var(--vc-line-2) transparent;
}
.vc-log:focus-visible { outline-offset: -2px; }
.vc-msg { margin: 0 0 16px; }
.vc-text { text-wrap: pretty; overflow-wrap: anywhere; }
.vc-u { display: flex; justify-content: flex-end; }
.vc-u .vc-text {
  max-width: 85%; padding: 7px 12px;
  border-radius: 14px 14px 4px 14px;
  background: var(--vc-fill);
}
.vc-meta { margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--vc-ink-3); }
.vc .vc-link {
  color: inherit; text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: .2em; text-decoration-color: var(--vc-line-2);
  transition: text-decoration-color .2s var(--vc-ease);
}
.vc .vc-link:hover { text-decoration-color: var(--vc-red); }
.vc-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.vc .vc-act {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; margin: 0; padding: 5px 12px;
  border: 1px solid var(--vc-line-2); border-radius: 999px;
  background: transparent; color: var(--vc-ink);
  font-size: 13.5px; line-height: 1.25; text-align: left; text-decoration: none;
  cursor: pointer;
  transition: border-color .2s var(--vc-ease), background-color .2s var(--vc-ease);
}
.vc .vc-act:hover { border-color: var(--vc-ink); background: #fff; }
.vc-act svg { width: 10px; height: 10px; color: var(--vc-ink-3); }

/* Typing pause: three quiet dots, under half a second */
.vc-typing { display: flex; gap: 4px; padding: 8px 0; }
.vc-typing span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--vc-ink-3); opacity: .3;
  animation: vc-blink 1s infinite;
}
.vc-typing span:nth-child(2) { animation-delay: .15s; }
.vc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes vc-blink { 50% { opacity: .9; } }

/* Composer */
.vc-form {
  display: flex; align-items: center; gap: 8px;
  margin: 6px 14px 0; padding: 4px 4px 4px 16px; min-height: 46px;
  border: 1px solid var(--vc-line-2); border-radius: 999px;
  background: #fff;
  transition: border-color .2s var(--vc-ease);
}
.vc-form:focus-within { border-color: var(--vc-ink); }
.vc .vc-input {
  flex: 1 1 auto; min-width: 0; margin: 0; padding: 8px 0;
  border: 0; background: transparent; outline: none;
  font-size: 15px; line-height: 1.3;
}
.vc .vc-input::placeholder { color: var(--vc-ink-3); opacity: 1; }
.vc .vc-send {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; margin: 0; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--vc-ink); color: var(--vc-bg);
  cursor: pointer; transition: background-color .2s var(--vc-ease);
}
.vc .vc-send:disabled { background: var(--vc-fill); color: var(--vc-ink-3); cursor: default; }
.vc-send svg { width: 16px; height: 16px; }
.vc-foot { padding: 8px 18px 14px; font-size: 12px; line-height: 1.4; color: var(--vc-ink-3); text-align: center; }

/* Phones: a bottom sheet that respects the notch, home bar and keyboard */
@media (max-width: 600px), (max-height: 500px) and (pointer: coarse) {
  .vc {
    --vc-r: calc(var(--chat-right-sm, 16px) + env(safe-area-inset-right, 0px));
    --vc-b: calc(var(--chat-bottom-sm, 16px) + env(safe-area-inset-bottom, 0px));
  }
  .vc .vc-launch { height: 44px; padding: 0 18px 0 16px; }
  .vc.is-open .vc-launch { opacity: 0; visibility: hidden; }
  .vc-scrim {
    display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 49;
    background: rgba(10, 10, 10, .28);
    opacity: 0; pointer-events: none; transition: opacity .3s var(--vc-ease);
  }
  .vc.is-open .vc-scrim { opacity: 1; pointer-events: auto; }
  .vc-panel {
    left: 0; right: 0; bottom: var(--vc-kb, 0px);
    width: auto; max-width: none;
    max-height: min(80vh, calc(var(--vc-vvh, 100vh) - 16px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    border-width: 1px 0 0; border-radius: 14px 14px 0 0;
    box-shadow: none;
    transform: translateY(24px);
  }
  .vc-head { padding: 10px 6px 10px 18px; }
  .vc-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--vc-line-2); }
  .vc-panel { overflow: hidden; }
  .vc-head { position: relative; padding-top: 16px; }
  .vc .vc-tool { min-width: 44px; min-height: 44px; padding: 0 10px; }
  .vc-log { padding: 16px 18px 8px; }
  .vc-form { margin: 6px 12px 0; }
  .vc .vc-act { min-height: 40px; padding: 8px 14px; }
  .vc .vc-input { font-size: 16px; }
  .vc .vc-send { width: 38px; height: 38px; }
  html.vc-locked, html.vc-locked body { overflow: hidden; overscroll-behavior: none; }
}

/* Small viewport units where supported (kept apart: var() + svh would
   invalidate the whole declaration on older browsers instead of falling back) */
@supports (height: 100svh) {
  .vc-panel { max-height: min(560px, calc(100svh - var(--vc-lift, 0px) - 170px)); }
  @media (max-width: 600px), (max-height: 500px) and (pointer: coarse) {
    .vc-panel { max-height: min(80svh, calc(var(--vc-vvh, 100svh) - 16px)); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .vc, .vc * { animation: none !important; transition: none !important; }
  .vc-typing span { opacity: .6; }
}
@media print { .vc { display: none !important; } }
