/* Prevent background scrolling when chat is open */
html.pme-chat-open,
html.pme-chat-open body {
  overflow: hidden;
  overscroll-behavior: contain;
}




/* Global font rendering polish for chat components */
.pme-comments-panel,
.pme-comments-messages,
.pme-comments-input,
.pme-comments-helper-bubble {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* PME 8.73.3 — Chat design tokens */
:root {
  --pme-radius-lg: 22px;
  --pme-duration-fast: 0.18s;
  --pme-duration-normal: 0.22s;
  --pme-ease-out: cubic-bezier(.25,.8,.25,1);
  --pme-ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --pme-shadow-panel: 0 18px 55px rgba(15,23,42,0.9);
  --pme-shadow-launcher: 0 10px 30px rgba(0,0,0,0.35);
}


/* ============================================================
   GLOBAL STATE WHEN CHAT IS OPEN
   ============================================================ */
.pme-chat-open .pme-comments-btn,
.pme-chat-open .pme-comments-launcher {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.pme-chat-open .pme-comments-helper-bubble {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

/* ============================================================
   FLOATING CHAT BUTTON (LAUNCHER)
   ============================================================ */
.pme-comments-btn,
.pme-comments-launcher {
  position: fixed;
  right: var(--pme-launcher-offset, 20px);
  bottom: var(--pme-launcher-bottom, 20px);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  z-index: 999999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pme-primary, #2563eb);
  transition:
    transform var(--pme-duration-fast, 0.18s) var(--pme-ease-out, cubic-bezier(.25,.8,.25,1)),
    box-shadow var(--pme-duration-fast, 0.18s) var(--pme-ease-out, cubic-bezier(.25,.8,.25,1)),
    opacity var(--pme-duration-fast, 0.18s) ease-out;
(1.03);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}
.pme-comments-btn:active,
.pme-comments-launcher:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* ============================================================
   HELPER BUBBLE
   ============================================================ */
.pme-comments-helper-bubble {
  position: fixed;
  right: calc(var(--pme-launcher-offset, 20px) + 80px);
  bottom: calc(var(--pme-launcher-bottom, 20px) + 4px);
  max-width: 260px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 999px;
  background: rgba(17,24,39,0.92);
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,0.45);
  box-shadow: 0 12px 30px rgba(15,23,42,0.5);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  z-index: 999998;
  transition:
    opacity 0.2s ease-out,
    transform 0.2s ease-out;
}

.pme-comments-helper-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;

  animation: pme-bubble-pop var(--pme-duration-normal, 0.22s) var(--pme-ease-soft, cubic-bezier(0.22, 1, 0.36, 1)) both;}

@keyframes pme-bubble-pop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  60% {
    opacity: 1;
    transform: translateY(0) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* ============================================================
   DESKTOP / TABLET PANEL
   ============================================================ */
.pme-comments-panel {
  position: fixed;
  right: var(--pme-launcher-offset, 20px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--pme-launcher-bottom, 20px) + 64px);
  width: min(var(--pme-panel-width, 420px), 100vw - 24px);
  /* Use small viewport units when available to avoid iOS Safari keyboard jump */
  height: min(640px, 100svh - 120px);
  max-height: calc(100svh - 120px);
  border-radius: var(--pme-panel-radius, 22px);
  background:
    linear-gradient(145deg, rgba(17,24,39,0.96), rgba(15,23,42,0.96));
  box-shadow:
    0 18px 55px rgba(15,23,42,0.9),
    0 0 0 1px rgba(148,163,184,0.35);
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  backdrop-filter: blur(18px);
  transition:
    opacity 0.22s cubic-bezier(.25,.8,.25,1),
    transform 0.22s cubic-bezier(.25,.8,.25,1);
}

/* Fallback for browsers that do not support 100svh yet */
@supports not (height: 100svh) {
  .pme-comments-panel {
    height: min(640px, 100vh - 120px);
    max-height: calc(100vh - 120px);
  }
}


.pme-comments-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Body wrapper: header fixed, messages scroll, input pinned */
.pme-comments-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.pme-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(17,24,39,0.98), rgba(15,23,42,0.98));
  border-bottom: 1px solid rgba(148,163,184,0.4);
  flex-shrink: 0;
}

.pme-comments-header span {
  font-size: 18px;
  font-weight: 600;
}

/* Close button */
.pme-comments-close {
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 24px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ============================================================
   MESSAGES
   ============================================================ */
.pme-comments-messages {
  padding: 12px 14px 8px;
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

/* ============================================================
   BUBBLES
   ============================================================ */
.pme-msg {
  max-width: 82%;
  padding: 8px 11px;
  border-radius: 999px;
  position: relative;
  font-size: 16px;
  line-height: 1.4;
}

.pme-msg-user {
  align-self: flex-end;
  background: var(--pme-primary, #2563eb);
  color: #f9fafb;
}
.pme-msg-bot {
  align-self: flex-start;
  background: rgba(31,41,55,0.96);
  color: #e5e7eb;
}

/* Bubble tails (optional)
.pme-msg-user::after,
.pme-msg-bot::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  bottom: 0;
  transform: translateY(50%) rotate(45deg);
}
.pme-msg-user::after { right: 10px; background: var(--pme-primary, #2563eb); }
.pme-msg-bot::after { left: 10px; background: rgba(31,41,55,0.96); }
*/

/* ============================================================
   INPUT AREA
   ============================================================ */
.pme-comments-input-wrap {
  position: sticky;
  bottom: var(--pme-keyboard-offset, 0px);
  z-index: 2;
  padding: 10px 10px 12px;
  border-top: 1px solid rgba(148,163,184,0.35);
  background: rgba(15,23,42,0.98);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
  min-height: 56px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}


.pme-comments-input,
.pme-comments-input-wrap textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 96px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(55,65,81,0.9);
  background: rgba(15,23,42,0.95);
  color: #ffffff !important;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  overflow-y: hidden !important;
  scrollbar-width: none; /* Firefox */
}

.pme-comments-input::-webkit-scrollbar,
.pme-comments-input-wrap textarea::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.pme-comments-input:focus,
.pme-comments-input-wrap textarea:focus {
  border-color: rgba(96,165,250,0.9);
  box-shadow: 0 0 0 1px rgba(96,165,250,0.6);
}

.pme-comments-send {
  min-width: 78px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--pme-primary, #2563eb);
  color: #f9fafb;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* ============================================================
   FULL-SCREEN MOBILE CHAT
   ============================================================ */
@media (max-width: 768px) {

  /* Full-screen WhatsApp-style chat on mobile */
  .pme-comments-panel {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;

    /* Use JS-driven viewport height to avoid mobile jumps */
    height: calc(var(--pme-vh, 1vh) * 100) !important;
    max-width: 100% !important;
    max-height: calc(var(--pme-vh, 1vh) * 100) !important;

    margin: 0 !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    background: rgba(3, 11, 25, 0.96);
    backdrop-filter: blur(14px);
    z-index: 9999;
  }

  .pme-comments-body {
    position: relative;
    flex: 1;
    min-height: 0;
  }

  .pme-comments-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc(56px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    display: flex;
    align-items: center;
    z-index: 20;
  }

  .pme-comments-messages {
    position: absolute;
    top: calc(56px + env(safe-area-inset-top, 0px)); /* header height + safe area */
    left: 0;
    right: 0;
    bottom: calc(64px + var(--pme-keyboard-offset, 0px)); /* input + keyboard */
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 12px 12px 16px;
  }

  .pme-comments-input-wrap {
    position: absolute;
    left: 0;
    right: 0;
    min-height: 64px;
    bottom: calc(var(--pme-keyboard-offset, 0px));
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    border-radius: 0 !important;
    z-index: 30;
  }

  .pme-comments-panel.pme-keyboard-open .pme-comments-messages {
    padding-bottom: 16px;
  }

}

  .pme-comments-header {
    flex: 0 0 56px;
    border-radius: 0 !important;
  }

  .pme-comments-messages {
    flex: 1 1 auto;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .pme-comments-input-wrap {
  position: sticky;
  bottom: var(--pme-keyboard-offset, 0px);
  z-index: 2;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    border-radius: 0 !important;
  }

  .pme-comments-helper-bubble {
    display: none !important;
  }

  .pme-chat-open body {
    overflow: hidden;
    overscroll-behavior: contain;
  }
}
/* Beautiful modern scrollbar */
.pme-comments-messages::-webkit-scrollbar {
    width: 6px;
}

.pme-comments-messages::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.pme-comments-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    transition: background 0.2s ease-in-out;
}

.pme-comments-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.30);
}

/* Firefox */
.pme-comments-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}


/* PME 8.50.1 keyboard shadow */
.pme-comments-panel {
  transition: bottom 0.2s ease;
}
:root[style*="--pme-keyboard-offset:"] .pme-comments-panel {
  box-shadow: 0 -6px 16px rgba(0,0,0,0.18);
}


/* Extra safety for mobile keyboard: when keyboard is open, keep input visible
   by adding internal padding instead of moving the whole panel. */
@media (max-width: 768px) {
  .pme-comments-panel.pme-keyboard-open .pme-comments-messages {
    padding-bottom: calc(96px + var(--pme-keyboard-offset, 0px));
  }
  .pme-comments-panel.pme-keyboard-open .pme-comments-input-wrap {
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 8px);
  }
}

/* ============================================================
   PME CHAT POLISH
   Softer surfaces, better mobile comfort
   ============================================================ */

/* Chat window surface */
.pme-comments-window {
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.45);
}

/* Header */
.pme-comments-header {
  border-bottom: 1px solid rgba(55, 65, 81, 0.48);
}

/* Messages area */
.pme-comments-messages {
  padding-top: 16px;
}

/* Input area */
.pme-comments-input-wrap {
  border-top: 1px solid rgba(31, 41, 55, 0.65);
}

/* Slightly smaller on very small screens */
@media (max-width: 480px) {
  .pme-comments-window {
    width: 100%;
    max-width: 100%;
    right: 0;
    left: 0;
    border-radius: 18px 18px 0 0;
  }
}


/* ============================================================
   PME 8.73.4 — CHAT THEME PRESETS
   ============================================================ */

/* Base variables that themes may override */
:root {
  --pme-panel-bg: #ffffff;
  --pme-panel-header-bg: #111827;
  --pme-panel-header-text: #ffffff;
  --pme-panel-border: rgba(15,23,42,0.12);
  --pme-bubble-user-bg: #111827;
  --pme-bubble-user-text: #ffffff;
  --pme-bubble-bot-bg: #f3f4f6;
  --pme-bubble-bot-text: #111827;
  --pme-input-bg: #f9fafb;
  --pme-input-border: rgba(15,23,42,0.12);
}

/* Messenger Blue theme */
html.pme-theme-messenger {
  --pme-panel-bg: #ffffff;
  --pme-panel-header-bg: #0084ff;
  --pme-panel-header-text: #ffffff;
  --pme-panel-border: rgba(0,132,255,0.16);
  --pme-bubble-user-bg: #0084ff;
  --pme-bubble-user-text: #ffffff;
  --pme-bubble-bot-bg: #e5e7eb;
  --pme-bubble-bot-text: #111827;
  --pme-input-bg: #f9fafb;
  --pme-input-border: rgba(0,0,0,0.08);
}

/* WhatsApp Green theme */
html.pme-theme-whatsapp {
  --pme-panel-bg: #ece5dd;
  --pme-panel-header-bg: #075e54;
  --pme-panel-header-text: #ffffff;
  --pme-panel-border: rgba(7,94,84,0.25);
  --pme-bubble-user-bg: #dcf8c6;
  --pme-bubble-user-text: #111827;
  --pme-bubble-bot-bg: #ffffff;
  --pme-bubble-bot-text: #111827;
  --pme-input-bg: #ffffff;
  --pme-input-border: rgba(7,94,84,0.25);
}

/* Glassmorphism theme */
html.pme-theme-glass {
  --pme-panel-bg: rgba(15,23,42,0.52);
  --pme-panel-header-bg: rgba(15,23,42,0.8);
  --pme-panel-header-text: #f9fafb;
  --pme-panel-border: rgba(148,163,184,0.45);
  --pme-bubble-user-bg: rgba(59,130,246,0.9);
  --pme-bubble-user-text: #f9fafb;
  --pme-bubble-bot-bg: rgba(15,23,42,0.78);
  --pme-bubble-bot-text: #e5e7eb;
  --pme-input-bg: rgba(15,23,42,0.85);
  --pme-input-border: rgba(148,163,184,0.5);
}

/* Minimal Light theme */
html.pme-theme-minimal-light {
  --pme-panel-bg: #ffffff;
  --pme-panel-header-bg: #ffffff;
  --pme-panel-header-text: #111827;
  --pme-panel-border: rgba(15,23,42,0.08);
  --pme-bubble-user-bg: #111827;
  --pme-bubble-user-text: #f9fafb;
  --pme-bubble-bot-bg: #f3f4f6;
  --pme-bubble-bot-text: #111827;
  --pme-input-bg: #f9fafb;
  --pme-input-border: rgba(15,23,42,0.1);
}

/* Minimal Dark theme */
html.pme-theme-minimal-dark {
  --pme-panel-bg: #020617;
  --pme-panel-header-bg: #020617;
  --pme-panel-header-text: #e5e7eb;
  --pme-panel-border: rgba(15,23,42,0.75);
  --pme-bubble-user-bg: #0ea5e9;
  --pme-bubble-user-text: #0b1120;
  --pme-bubble-bot-bg: #020617;
  --pme-bubble-bot-text: #e5e7eb;
  --pme-input-bg: #020617;
  --pme-input-border: rgba(15,23,42,0.8);
}


/* ============================================================
   PME 8.75.0 — CHAT TABLET MODE
   - Slightly wider panel on mid-size viewports
   - Keeps desktop/mobile logic intact (JS treats >=769px as desktop)
   ============================================================ */
@media (min-width: 769px) and (max-width: 1100px) {
  .pme-comments-panel {
    right: var(--pme-launcher-offset, 24px);
    width: min(var(--pme-panel-width-tablet, 460px), 100vw - 64px);
    height: min(640px, 100svh - 96px);
    max-height: calc(100svh - 96px);
  }
}

/* ============================================================
   Global contact button — Signal icon
   Reuses chat launcher frame (.pme-comments-btn / .pme-comments-launcher)
   ============================================================ */
.pme-contact-btn {
  background-color: #3a76f0; /* Signal-like blue */
}

.pme-contact-btn .pme-contact-icon {
  display: block;
  width: 24px;
  height: 24px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Signal bubble glyph (simplified) */
.pme-contact-btn .pme-contact-icon-signal {
  background-image: url("data:image/svg+xml;utf8,<svg width='24' height='24' viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'><path fill='white' d='M256 0C114.6 0 0 114.6 0 256c0 45.6 12 88.4 33 125.3l-21.7 99.9 102.4-19.5c36.4 18.5 77.5 29.1 121.3 29.1 141.4 0 256-114.6 256-256S397.4 0 256 0zm0 465.5c-39.5 0-76.6-10.2-109-28.1l-5.3-3-57.7 11 12-54.9-3.1-5.4C74.6 350.9 62 305.1 62 256 62 140.9 140.9 62 256 62s194 78.9 194 194-78.9 194-194 194z'/></svg>");
}


/* FAB click fix */
.pme-comments-launcher *, .pme-contact-btn * { pointer-events: none !important; }


/* PME 9.3.1 — Chat layout stabilization */
.pme-comments-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.pme-comments-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 12px;
}

.pme-comments-input-wrap {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.18);
    backdrop-filter: blur(12px);
}


/* PME 9.3.2 — Chat overlay for outside-close */
.pme-chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    z-index: 99980;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease-out;
}

.pme-chat-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}


/* PME 9.3.3 — Full-screen mobile chat layout */
@media (max-width: 768px) {
  .pme-comments-panel {
    right: 0;
    left: 0;
    bottom: 0;
    margin: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100svh;
    max-height: 100svh;
    border-radius: 0;
    box-shadow: none;
  }

  html.pme-mobile-fullscreen .pme-comments-panel {
    padding-bottom: var(--pme-keyboard-offset, 0px);
  }
}


/* PME 9.4.1 — Mobile-first full-screen chat layout + visual polish */
@media (max-width: 768px) {

  /* Full-screen panel on mobile, flex column layout */
  .pme-comments-panel {
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    margin: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    background: #141921;
  }

  .pme-comments-header {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    height: 52px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #141921;
  }

  .pme-comments-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  /* Messages take remaining space and scroll */
  .pme-comments-messages {
    position: static !important;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px 18px;
    gap: 10px;
  }

  /* Message bubbles */
  .pme-comments-messages .pme-message {
    border-radius: 14px;
    padding: 10px 14px;
    line-height: 1.48;
    font-size: 15px;
    max-width: 85%;
  }

  .pme-comments-messages .pme-message.me {
    background: #2563eb;
    color: #fff;
  }

  .pme-comments-messages .pme-message.them {
    background: rgba(255,255,255,0.06);
    color: #e5e7eb;
  }

  /* Input bar pinned at bottom inside panel */
  .pme-comments-input-wrap {
    position: relative !important;
    bottom: auto !important;
    left: 0;
    right: 0;
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255,255,255,0.06);
    border-radius: 0 !important;
    z-index: 3;
    background: #141921;
  }

  .pme-comments-input {
    flex: 1 1 auto;
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 10px 14px;
    color: #e5e7eb;
    font-size: 15px;
  }

  .pme-comments-send,
  .pme-send-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
  }

  /* Use keyboard offset as extra padding on the panel, not on input itself */
  html.pme-mobile-fullscreen .pme-comments-panel {
    padding-bottom: var(--pme-keyboard-offset, 0px);
  }

  /* On mobile, overlay should not blur or handle taps */
  .pme-chat-overlay {
    background: rgba(0, 0, 0, 0.30);
    backdrop-filter: none !important;
    pointer-events: none;
  }
}

/* PME 9.4.1 — Smooth open animation (applies to all) */
.pme-comments-panel.is-open {
  animation: pmeChatReveal 0.22s cubic-bezier(.19,1,.22,1);
}

@keyframes pmeChatReveal {
  from { transform: translateY(14px) scale(0.985); opacity: 0; }
  to   { transform: translateY(0) scale(1);        opacity: 1; }
}

/* PME 9.4.1 — Smooth scroll for chat messages */
.pme-comments-messages {
  scroll-behavior: smooth;
}


/* PME 9.7.0 — Mobile chat UX & performance refinement */
@media (max-width: 768px) {

  /* On mobile, overlay is visual only — no blur and no hit target */
  .pme-chat-overlay {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: auto;
  }

  /* Solid, app-like background for full-screen chat */
  .pme-comments-panel {
    background: #050b18;
    box-shadow: none;
  }

  /* Input row: stable, tappable layout */
  .pme-comments-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .pme-comments-input {
    flex: 1 1 auto;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 15px;
  }

  .pme-comments-send {
    flex-shrink: 0;
    min-width: 64px;
    height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
  }
}


/* PME 9.9.0 — touch-friendly tap targets & visible focus */
.pme-comments-send,
.pme-comments-close{
  min-width:44px;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.pme-comments-panel button:focus-visible,
.pme-comments-panel textarea:focus-visible{
  outline:2px solid var(--pme-primary, #2563eb);
  outline-offset:2px;
}
