/* Site additions on top of the migrated WordPress CSS (kept outside assets/css, which build-content regenerates). */
html.pcc-logged-in [data-pcc-auth="out"],
html:not(.pcc-logged-in) [data-pcc-auth="in"] { display: none !important; }
template { display: none !important; }
.pcc-form-message { margin-bottom: 1em; }
.woocommerce-checkout.processing { opacity: .7; pointer-events: none; }
.woocommerce-checkout .wc-stripe-upe-element { min-height: 120px; padding: 12px; background: #fff; }
.elementor-menu-cart__product .variation { margin: 2px 0 0; font-size: .85em; opacity: .8; }

/* Sticky site header: native CSS instead of Elementor's JS sticky (which flickered on mobile while scrolling).
   All headers stick their desktop row on desktop and their mobile row on tablet/mobile, so the whole header sticks. */
body > header.elementor-location-header { position: sticky; top: 0; z-index: 99; }

/* Popups: lock scrolling on <html> instead of Elementor's body{overflow:hidden;max-height:100vh},
   which turns <body> into the scroll container and makes the sticky header disappear behind open popups. */
body.dialog-prevent-scroll { max-height: none !important; overflow: visible !important; }
html.pcc-scroll-lock { overflow: hidden; }

/* ------------------------------------------------------------------ */
/* Chat window (src/runtime/chat.ts) — replaces the two floating phone / WhatsApp buttons.
   v2 design (2026-11): cream header, serif title, pill tabs and buttons, Manrope body; full screen on phones. */
/* ------------------------------------------------------------------ */
footer .elementor-element.elementor-fixed.elementor-widget-social-icons { display: none !important; }

.pcc-chat {
  --pcc-ink: #2b2420; --pcc-text: #4f4640; --pcc-muted: #6f655d;
  --pcc-line: #ebe4dc; --pcc-field: #e2d9cf; --pcc-cream: #f8f4ef; --pcc-sand: #f1e9df; --pcc-soft: #f4ece2;
  --pcc-gold: #b8955f;        /* accents */
  --pcc-gold-ink: #8e6b3e;    /* gold text on white, buttons (white text 4.9:1) */
  --pcc-gold-hover: #76582f;
  position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 99990;
  font-family: "Manrope", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.55; color: var(--pcc-text);
  -webkit-tap-highlight-color: transparent;
}
.pcc-chat *, .pcc-chat *::before, .pcc-chat *::after { box-sizing: border-box; }
.pcc-chat svg { width: 20px; height: 20px; flex: none; }
.pcc-chat button { font: inherit; cursor: pointer; }

/* Launcher */
.pcc-chat__launcher { width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center;
  background: var(--pcc-gold-ink); color: #fff; box-shadow: 0 14px 28px -12px rgba(118, 88, 47, .75), 0 0 0 4px rgba(255, 255, 255, .7);
  transition: transform .2s ease, background .2s ease; }
.pcc-chat__launcher svg { width: 26px; height: 26px; }
.pcc-chat__launcher-close, .pcc-chat--open .pcc-chat__launcher-open { display: none; }
.pcc-chat--open .pcc-chat__launcher-close { display: grid; }

/* Panel (desktop / tablet: floating window above the launcher) */
.pcc-chat__panel { position: absolute; right: 0; bottom: 74px; width: 384px; max-width: calc(100vw - 36px); height: min(600px, calc(100vh - 124px));
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--pcc-line); border-radius: 22px; overflow: hidden;
  box-shadow: 0 28px 60px -24px rgba(43, 36, 32, .35), 0 8px 18px -10px rgba(43, 36, 32, .12); animation: pcc-chat-in .22s ease-out; }
.pcc-chat__panel[hidden] { display: none; }
@keyframes pcc-chat-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* Header */
.pcc-chat__header { background: var(--pcc-cream); color: var(--pcc-text); padding: 18px 18px 14px; position: relative; border-bottom: 1px solid var(--pcc-line); }
.pcc-chat__heading { display: flex; flex-direction: column; padding-right: 44px; }
.pcc-chat__heading strong { font-family: "Cormorant Garamond", Georgia, serif; font-size: 25px; font-weight: 500; letter-spacing: 0; color: var(--pcc-ink); line-height: 1.1; }
html[lang^="zh"] .pcc-chat__heading strong { font-family: "Noto Sans SC", "PingFang SC", sans-serif; font-size: 19px; font-weight: 600; }
.pcc-chat__heading span { font-size: 13px; color: var(--pcc-muted); margin-top: 4px; }
.pcc-chat__close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 1px solid var(--pcc-line); border-radius: 50%; background: #fff; color: var(--pcc-ink); display: grid; place-items: center; }
.pcc-chat__close svg { width: 18px; height: 18px; }
.pcc-chat__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 14px; padding: 4px; border-radius: 999px; background: var(--pcc-sand); }
.pcc-chat__tab { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 4px; border: 0; border-radius: 999px; background: transparent;
  color: var(--pcc-muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pcc-chat__tab svg { width: 16px; height: 16px; }
.pcc-chat__tab[aria-selected="true"] { background: #fff; color: var(--pcc-gold-ink); box-shadow: 0 4px 10px -6px rgba(43, 36, 32, .35); }

/* Body */
.pcc-chat__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: #fff; }
.pcc-chat__pane { padding: 18px; }
.pcc-chat__pane[hidden] { display: none; }
.pcc-chat__pane p { margin: 0 0 12px; }
.pcc-chat__big { font-family: "Cormorant Garamond", Georgia, serif; font-size: 30px; font-weight: 500; color: var(--pcc-ink); line-height: 1.15; margin-bottom: 4px !important; }
.pcc-chat__muted { color: var(--pcc-muted); font-size: 13px; }
.pcc-chat a { color: var(--pcc-gold-ink); text-decoration: underline; text-decoration-color: rgba(142, 107, 62, .4); text-underline-offset: 3px; }

/* FAQ conversation */
.pcc-chat__log { display: flex; flex-direction: column; gap: 10px; }
.pcc-chat__msg { max-width: 88%; padding: 11px 14px; border-radius: 18px; word-wrap: break-word; }
.pcc-chat__msg--bot { align-self: flex-start; background: var(--pcc-cream); color: var(--pcc-text); border: 1px solid var(--pcc-line); border-bottom-left-radius: 6px; }
.pcc-chat__msg--me { align-self: flex-end; background: var(--pcc-gold-ink); color: #fff; border-bottom-right-radius: 6px; }
.pcc-chat__more { align-self: center; font-size: 12px; color: var(--pcc-muted); margin-top: 6px; }
.pcc-chat__chips { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pcc-chat__chip { text-align: left; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--pcc-field); background: #fff; color: var(--pcc-ink); font-size: 13px; max-width: 92%; }
.pcc-chat__typing { display: inline-flex; gap: 4px; }
.pcc-chat__typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--pcc-gold); animation: pcc-dot 1s infinite ease-in-out; }
.pcc-chat__typing i:nth-child(2) { animation-delay: .15s; } .pcc-chat__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pcc-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Call / WhatsApp / Email */
.pcc-chat__cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 12px 18px; margin: 6px 0 14px; border: 0; border-radius: 999px;
  background: var(--pcc-gold-ink); color: #fff !important; text-decoration: none !important; font-weight: 600; font-size: 14.5px;
  box-shadow: 0 10px 22px -12px rgba(118, 88, 47, .7); }
.pcc-chat__cta--wa { background: #1f8f4e; box-shadow: 0 10px 22px -12px rgba(31, 143, 78, .7); }
.pcc-chat__cta:disabled { opacity: .6; }
.pcc-chat__form label { display: block; margin-bottom: 12px; }
.pcc-chat__form label span { display: block; font-size: 12.5px; font-weight: 600; color: var(--pcc-ink); margin-bottom: 5px; }
.pcc-chat__form input, .pcc-chat__form textarea { width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--pcc-field); border-radius: 12px; font: inherit; color: var(--pcc-ink); background: #fff; box-shadow: none; }
.pcc-chat__form textarea { min-height: 96px; resize: vertical; }
.pcc-chat__form input:focus, .pcc-chat__form textarea:focus { outline: none; border-color: var(--pcc-gold-ink); box-shadow: 0 0 0 4px rgba(184, 149, 95, .18); }
.pcc-chat__form .pcc-chat__invalid { border-color: #b4472f; }
.pcc-chat__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.pcc-chat__status { font-size: 13px; min-height: 1em; }
.pcc-chat__status--ok { color: #2f6b3a; } .pcc-chat__status--error { color: #b4472f; }

/* Phones: full screen, launcher hidden while open (close with ✕ or the Back button) */
@media (max-width: 600px) {
  .pcc-chat__panel { position: fixed; inset: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; border: 0; border-radius: 0; box-shadow: none;
    animation: pcc-chat-up .26s cubic-bezier(.2,.8,.2,1); }
  .pcc-chat__header { padding: calc(16px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left)); }
  .pcc-chat__close { top: calc(12px + env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 42px; height: 42px; }
  .pcc-chat__tab { font-size: 13px; min-height: 40px; }
  .pcc-chat__pane { padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
  .pcc-chat__msg, .pcc-chat__chip { font-size: 15px; }
  .pcc-chat__chip { max-width: 100%; padding: 10px 16px; }
  .pcc-chat__form input, .pcc-chat__form textarea { font-size: 16px; } /* < 16px makes iOS zoom in on focus */
  .pcc-chat--open .pcc-chat__launcher { display: none !important; }
  html.pcc-chat-open, html.pcc-chat-open body { overflow: hidden; }
}
@media (max-width: 360px) { .pcc-chat__tab svg { display: none; } }
@keyframes pcc-chat-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .pcc-chat__panel, .pcc-chat__typing i { animation: none; } }

/* Neutralise the theme/kit button styles (.elementor-kit-4 button {...}) inside the widget */
.pcc-chat button.pcc-chat__launcher, .pcc-chat button.pcc-chat__close, .pcc-chat button.pcc-chat__tab, .pcc-chat button.pcc-chat__chip, .pcc-chat button.pcc-chat__cta {
  text-transform: none !important; letter-spacing: normal !important; font-family: inherit !important; line-height: 1.3 !important; min-height: 0; }
.pcc-chat button.pcc-chat__launcher { background: var(--pcc-gold-ink) !important; color: #fff !important; border: 0 !important; border-radius: 50% !important; padding: 0 !important;
  box-shadow: 0 14px 28px -12px rgba(118, 88, 47, .75), 0 0 0 4px rgba(255, 255, 255, .7) !important; }
.pcc-chat button.pcc-chat__close { background: #fff !important; color: var(--pcc-ink) !important; border: 1px solid var(--pcc-line) !important; border-radius: 50% !important; padding: 0 !important; }
.pcc-chat button.pcc-chat__tab { background: transparent !important; color: var(--pcc-muted) !important; border: 0 !important; border-radius: 999px !important; padding: 6px 4px !important;
  min-height: 36px !important; font-size: 12.5px !important; font-weight: 600 !important; box-shadow: none !important; }
.pcc-chat button.pcc-chat__tab[aria-selected="true"] { background: #fff !important; color: var(--pcc-gold-ink) !important; box-shadow: 0 4px 10px -6px rgba(43, 36, 32, .35) !important; }
.pcc-chat button.pcc-chat__chip { background: #fff !important; color: var(--pcc-ink) !important; border: 1px solid var(--pcc-field) !important; border-radius: 999px !important; padding: 9px 15px !important;
  font-size: 13px !important; font-weight: 500 !important; box-shadow: none !important; }
.pcc-chat button.pcc-chat__cta { background: var(--pcc-gold-ink) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important; padding: 12px 18px !important;
  min-height: 48px !important; font-size: 14.5px !important; font-weight: 600 !important; }
@media (max-width: 600px) {
  .pcc-chat button.pcc-chat__tab { font-size: 13px !important; min-height: 40px !important; }
  .pcc-chat button.pcc-chat__chip { font-size: 15px !important; padding: 10px 16px !important; }
  .pcc-chat button.pcc-chat__close { width: 42px; height: 42px; }
}

/* Hover only on devices that really hover (no "stuck" highlight after a tap on iPhone); pressed state for touch */
@media (hover: hover) {
  .pcc-chat button.pcc-chat__launcher:hover { background: var(--pcc-gold-hover) !important; transform: translateY(-2px); }
  .pcc-chat button.pcc-chat__close:hover { background: var(--pcc-cream) !important; }
  .pcc-chat button.pcc-chat__tab:hover { color: var(--pcc-ink) !important; }
  .pcc-chat button.pcc-chat__tab[aria-selected="true"]:hover { color: var(--pcc-gold-ink) !important; }
  .pcc-chat button.pcc-chat__chip:hover { background: var(--pcc-soft) !important; border-color: var(--pcc-gold) !important; }
  .pcc-chat button.pcc-chat__cta:hover, .pcc-chat a.pcc-chat__cta:hover { background: var(--pcc-gold-hover) !important; }
  .pcc-chat a.pcc-chat__cta--wa:hover { background: #18773f !important; }
}
.pcc-chat button.pcc-chat__chip:active { background: var(--pcc-soft) !important; }
.pcc-chat button.pcc-chat__tab:active { background: rgba(255, 255, 255, .6) !important; }
.pcc-chat button.pcc-chat__cta:active, .pcc-chat a.pcc-chat__cta:active { filter: brightness(.92); }
.pcc-chat button:focus-visible, .pcc-chat a:focus-visible { outline: 2px solid var(--pcc-gold-ink) !important; outline-offset: 2px; }
