/* ============================================================
   PREMIUM VERANDA — Consultant widget v2
   Editorial, ivory, boutique-style. No chat-plugin feel.
   ============================================================ */

.pv-c {
  --pvc-ivory: #f5f1ea;
  --pvc-cream: #fbf8f2;
  --pvc-sand:  #e8ddc8;
  --pvc-sand-soft: #efe6d2;
  --pvc-bronze: #8b6f4e;
  --pvc-bronze-soft: #b8956a;
  --pvc-champagne: #d6b07f;
  --pvc-ink: #2a2520;
  --pvc-ink-soft: #4a423a;
  --pvc-mute: #8a8077;
  --pvc-line: rgba(42, 37, 32, 0.10);
  --pvc-line-strong: rgba(42, 37, 32, 0.18);
  --pvc-shadow: 0 30px 60px -28px rgba(42, 37, 32, 0.28), 0 8px 20px -8px rgba(42, 37, 32, 0.12);
  --pvc-shadow-lift: 0 38px 80px -28px rgba(42, 37, 32, 0.34), 0 12px 28px -8px rgba(42, 37, 32, 0.14);
  --pvc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pvc-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --pvc-sans:  'Manrope', system-ui, -apple-system, sans-serif;
  font-family: var(--pvc-sans);
  color: var(--pvc-ink);
}

/* ---------- Launcher (closed state) ---------- */
.pv-c__launcher {
  position: fixed;
  right: clamp(20px, 2.4vw, 36px);
  bottom: clamp(20px, 2.4vw, 36px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--pvc-cream);
  color: var(--pvc-ink);
  padding: 14px 22px 14px 18px;
  border-radius: 4px;
  border: 1px solid var(--pvc-line-strong);
  box-shadow: var(--pvc-shadow);
  cursor: pointer;
  font-family: var(--pvc-sans);
  letter-spacing: 0.04em;
  transition: transform 0.45s var(--pvc-ease), box-shadow 0.45s var(--pvc-ease), background 0.3s var(--pvc-ease);
  opacity: 0;
  transform: translateY(8px);
  animation: pvcLauncherIn 0.7s 1.2s var(--pvc-ease) forwards;
}
@keyframes pvcLauncherIn {
  to { opacity: 1; transform: translateY(0); }
}
.pv-c__launcher:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--pvc-shadow-lift);
}
.pv-c__launcher.is-hidden {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}
.pv-c__launcher-icon {
  width: 22px;
  height: 22px;
  color: var(--pvc-bronze);
  flex-shrink: 0;
}
.pv-c__launcher-icon svg { width: 100%; height: 100%; display: block; }
.pv-c__launcher-text {
  font-size: 12.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--pvc-ink);
  line-height: 1;
}
.pv-c__launcher-divider {
  width: 1px;
  height: 18px;
  background: var(--pvc-line-strong);
  flex-shrink: 0;
}
.pv-c__launcher-arrow {
  width: 14px;
  height: 14px;
  color: var(--pvc-bronze);
  flex-shrink: 0;
  transition: transform 0.3s var(--pvc-ease);
}
.pv-c__launcher:hover .pv-c__launcher-arrow { transform: translateX(3px); }

/* ---------- Panel ---------- */
.pv-c__panel {
  position: fixed;
  right: clamp(20px, 2.4vw, 36px);
  bottom: clamp(20px, 2.4vw, 36px);
  z-index: 95;
  width: min(440px, calc(100vw - 32px));
  height: min(660px, calc(100vh - 40px));
  background: var(--pvc-cream);
  color: var(--pvc-ink);
  border: 1px solid var(--pvc-line-strong);
  border-radius: 6px;
  box-shadow: var(--pvc-shadow-lift);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.985);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--pvc-ease), opacity 0.45s var(--pvc-ease);
}
.pv-c.is-open .pv-c__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Header ---------- */
.pv-c__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  background: var(--pvc-cream);
  border-bottom: 1px solid var(--pvc-line);
  position: relative;
}
.pv-c__header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.pv-c__header-eyebrow {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--pvc-bronze);
  font-weight: 500;
  line-height: 1;
}
.pv-c__header-title {
  font-family: var(--pvc-serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--pvc-ink);
  letter-spacing: -0.005em;
}
.pv-c__header-title em { font-style: italic; color: var(--pvc-bronze); }
.pv-c__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--pvc-line-strong);
  color: var(--pvc-ink-soft);
  display: grid;
  place-items: center;
  transition: all 0.25s var(--pvc-ease);
  flex-shrink: 0;
}
.pv-c__close:hover { background: var(--pvc-sand-soft); color: var(--pvc-ink); border-color: var(--pvc-bronze-soft); }
.pv-c__close svg { width: 12px; height: 12px; }

/* ---------- Messages area ---------- */
.pv-c__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--pvc-line-strong) transparent;
  background: var(--pvc-cream);
}
.pv-c__scroll::-webkit-scrollbar { width: 6px; }
.pv-c__scroll::-webkit-scrollbar-thumb { background: var(--pvc-line-strong); border-radius: 3px; }

.pv-c__msg {
  max-width: 86%;
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  animation: pvcMsgIn 0.36s var(--pvc-ease);
  word-wrap: break-word;
}
@keyframes pvcMsgIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pv-c__msg--bot {
  background: var(--pvc-ivory);
  border: 1px solid var(--pvc-line);
  border-left: 2px solid var(--pvc-bronze-soft);
  color: var(--pvc-ink);
  align-self: flex-start;
}
.pv-c__msg--bot strong { font-weight: 600; color: var(--pvc-ink); }
.pv-c__msg--bot em {
  font-style: italic;
  font-family: var(--pvc-serif);
  font-size: 1.08em;
  color: var(--pvc-bronze);
  letter-spacing: 0;
}
.pv-c__msg--user {
  background: var(--pvc-ink);
  color: var(--pvc-ivory);
  align-self: flex-end;
  font-weight: 500;
  border-radius: 4px;
}

.pv-c__typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 16px 20px;
  background: var(--pvc-ivory);
  border: 1px solid var(--pvc-line);
  border-left: 2px solid var(--pvc-bronze-soft);
  border-radius: 4px;
  align-self: flex-start;
}
.pv-c__typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--pvc-bronze);
  animation: pvcDot 1.3s infinite ease-in-out;
}
.pv-c__typing span:nth-child(2) { animation-delay: 0.2s; }
.pv-c__typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pvcDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30%           { transform: translateY(-3px); opacity: 1; }
}

/* ---------- Collection cards (rich message) ---------- */
.pv-c__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-self: stretch;
  margin: 4px 0;
}
.pv-c__card {
  background: var(--pvc-ivory);
  border: 1px solid var(--pvc-line);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--pvc-ease);
  display: flex;
  flex-direction: column;
  text-align: left;
}
.pv-c__card:hover {
  border-color: var(--pvc-bronze-soft);
  background: var(--pvc-sand-soft);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(42, 37, 32, 0.18);
}
.pv-c__card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--pvc-sand);
  overflow: hidden;
}
.pv-c__card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-c__card-body { padding: 12px 14px 14px; }
.pv-c__card-name {
  font-family: var(--pvc-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--pvc-ink);
  margin-bottom: 4px;
  letter-spacing: 0.005em;
}
.pv-c__card-tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pvc-bronze);
  font-weight: 500;
}

/* ---------- Quick replies (boutique menu style) ---------- */
.pv-c__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 24px 0;
}
.pv-c__quick-btn {
  background: transparent;
  color: var(--pvc-ink);
  border: 1px solid var(--pvc-line-strong);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-family: var(--pvc-sans);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s var(--pvc-ease);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.pv-c__quick-btn:hover {
  background: var(--pvc-ink);
  color: var(--pvc-ivory);
  border-color: var(--pvc-ink);
}

/* ---------- Lead form ---------- */
.pv-c__form {
  padding: 18px 24px 8px;
  display: grid;
  gap: 10px;
  animation: pvcMsgIn 0.4s var(--pvc-ease);
}
.pv-c__form-title {
  font-family: var(--pvc-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--pvc-ink);
  line-height: 1.2;
  margin-bottom: 2px;
  letter-spacing: 0;
}
.pv-c__form-sub {
  font-size: 12.5px;
  color: var(--pvc-mute);
  line-height: 1.55;
  margin-bottom: 8px;
}
.pv-c__input {
  width: 100%;
  background: var(--pvc-ivory);
  border: 1px solid var(--pvc-line-strong);
  border-radius: 4px;
  padding: 12px 14px;
  color: var(--pvc-ink);
  font-size: 14px;
  font-family: var(--pvc-sans);
  transition: border-color 0.25s var(--pvc-ease), background 0.25s var(--pvc-ease);
}
.pv-c__input:focus {
  outline: none;
  border-color: var(--pvc-bronze);
  background: var(--pvc-cream);
}
.pv-c__input::placeholder { color: var(--pvc-mute); }
textarea.pv-c__input { resize: none; min-height: 64px; line-height: 1.5; }

.pv-c__channel {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pv-c__channel label {
  flex: 1;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid var(--pvc-line-strong);
  border-radius: 4px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s var(--pvc-ease);
  user-select: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--pvc-ink-soft);
  background: var(--pvc-ivory);
}
.pv-c__channel input { display: none; }
.pv-c__channel label:has(input:checked) {
  background: var(--pvc-ink);
  border-color: var(--pvc-ink);
  color: var(--pvc-ivory);
}
.pv-c__channel label:hover { border-color: var(--pvc-bronze-soft); }

.pv-c__submit {
  background: var(--pvc-ink);
  color: var(--pvc-ivory);
  font-family: var(--pvc-sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 15px 22px;
  border: 1px solid var(--pvc-ink);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s var(--pvc-ease);
  margin-top: 6px;
}
.pv-c__submit:hover:not(:disabled) {
  background: var(--pvc-bronze);
  border-color: var(--pvc-bronze);
}
.pv-c__submit:disabled { opacity: 0.6; cursor: not-allowed; }

.pv-c__consent {
  font-size: 11px;
  color: var(--pvc-mute);
  line-height: 1.55;
  letter-spacing: 0.01em;
}
.pv-c__consent a { color: var(--pvc-bronze); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Compose (free text input) ---------- */
.pv-c__footer {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--pvc-line);
  background: var(--pvc-cream);
}
.pv-c__compose {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--pvc-ivory);
  border: 1px solid var(--pvc-line-strong);
  border-radius: 4px;
  padding: 6px 6px 6px 14px;
  transition: border-color 0.25s var(--pvc-ease);
}
.pv-c__compose:focus-within { border-color: var(--pvc-bronze); }
.pv-c__compose-input {
  flex: 1;
  background: transparent;
  border: none;
  resize: none;
  color: var(--pvc-ink);
  font: 14px var(--pvc-sans);
  padding: 8px 0;
  outline: none;
  max-height: 96px;
  line-height: 1.5;
}
.pv-c__compose-input::placeholder { color: var(--pvc-mute); }
.pv-c__compose-send {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--pvc-ink);
  color: var(--pvc-ivory);
  display: grid;
  place-items: center;
  transition: all 0.2s var(--pvc-ease);
  flex-shrink: 0;
  border: 1px solid var(--pvc-ink);
}
.pv-c__compose-send:hover:not(:disabled) { background: var(--pvc-bronze); border-color: var(--pvc-bronze); }
.pv-c__compose-send:disabled { opacity: 0.4; cursor: not-allowed; }
.pv-c__compose-send svg { width: 14px; height: 14px; }

.pv-c__footer-meta {
  font-size: 10px;
  color: var(--pvc-mute);
  text-align: center;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 12px;
  font-weight: 500;
}

/* ---------- Success state ---------- */
.pv-c__success {
  padding: 44px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: pvcMsgIn 0.4s var(--pvc-ease);
}
.pv-c__success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--pvc-ivory);
  border: 1px solid var(--pvc-bronze-soft);
  color: var(--pvc-bronze);
  display: grid;
  place-items: center;
}
.pv-c__success-icon svg { width: 24px; height: 24px; }
.pv-c__success h3 {
  font-family: var(--pvc-serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--pvc-ink);
  letter-spacing: 0;
}
.pv-c__success p {
  font-size: 13.5px;
  color: var(--pvc-ink-soft);
  line-height: 1.6;
  max-width: 36ch;
}
.pv-c__success-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.pv-c__success-actions a {
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.25s var(--pvc-ease);
  border: 1px solid var(--pvc-line-strong);
  color: var(--pvc-ink);
}
.pv-c__success-actions a:hover {
  background: var(--pvc-ink);
  color: var(--pvc-ivory);
  border-color: var(--pvc-ink);
}
.pv-c__success-actions a:first-child {
  background: var(--pvc-ink);
  color: var(--pvc-ivory);
  border-color: var(--pvc-ink);
}
.pv-c__success-actions a:first-child:hover {
  background: var(--pvc-bronze);
  border-color: var(--pvc-bronze);
}

/* ---------- Inline page CTA ---------- */
.pv-c-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s var(--pvc-ease);
  font-family: var(--pvc-sans);
}
.pv-c-cta:hover { background: var(--pvc-bronze); color: var(--pvc-ivory); border-color: var(--pvc-bronze); }
.pv-c-cta::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pvc-bronze);
  flex-shrink: 0;
}

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  .pv-c__launcher {
    right: 14px;
    bottom: 14px;
    padding: 12px 18px 12px 14px;
    gap: 12px;
  }
  .pv-c__launcher-text { font-size: 11.5px; letter-spacing: 0.2em; }
  .pv-c__launcher-divider { display: none; }

  .pv-c__panel {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    border-radius: 14px 14px 0 0;
    border-bottom: none;
  }
  .pv-c__header { padding: 18px 20px 14px; }
  .pv-c__header-title { font-size: 21px; }
  .pv-c__scroll { padding: 18px 20px 8px; }
  .pv-c__quick { padding: 8px 20px 0; }
  .pv-c__form { padding: 16px 20px 6px; }
  .pv-c__footer { padding: 12px 20px 16px; }
  .pv-c__msg { max-width: 92%; font-size: 14px; padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .pv-c__launcher,
  .pv-c__msg,
  .pv-c__form,
  .pv-c__panel,
  .pv-c__typing span { animation: none !important; transition: none !important; }
}
