/* ============================================================
   CareInCN — shared language rules
   The active language is published on <html data-lang="en|id|zh">
   by assets/lang.js, then every page reacts to that one attribute.
   ============================================================ */

/* ---- tri-text UI nodes (t-en / t-id / t-zh) ---- */
html[data-lang="en"] .t-id,
html[data-lang="en"] .t-zh,
html[data-lang="en"] .lang-zh{display:none!important}

html[data-lang="id"] .t-en,
html[data-lang="id"] .t-zh,
html[data-lang="id"] .lang-zh{display:none!important}

html[data-lang="zh"] .t-en,
html[data-lang="zh"] .t-id,
html[data-lang="zh"] .lang-en{display:none!important}

/* ---- language switcher ---- */
.lang-btn.active{background:var(--teal);color:#fff;font-weight:600}

/* ---- lead modal ----
   Without JS the modal opens via the CSS :target rule and the cancel
   link falls back to href="#". Once assets/modal.js boots it marks the
   document as .cc-modal-ready and the .open class drives visibility,
   so the two mechanisms can never fight each other. ---- */
html:not(.cc-modal-ready) .modal:target{display:flex}

/* ============================================================
   Cookie consent banner (shown by assets/analytics.js only when
   Matomo is configured). Apple-style, responsive, tri-language.
   ============================================================ */
.cc-consent{
  position:fixed;left:50%;bottom:20px;z-index:120;
  width:calc(100% - 40px);max-width:540px;
  transform:translate(-50%,24px);opacity:0;
  transition:transform .32s cubic-bezier(.2,.8,.2,1),opacity .32s ease;
  pointer-events:none;
}
.cc-consent-show{transform:translate(-50%,0);opacity:1;pointer-events:auto}
.cc-consent-inner{
  background:rgba(255,255,255,.86);
  -webkit-backdrop-filter:saturate(180%) blur(22px);
  backdrop-filter:saturate(180%) blur(22px);
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  padding:16px 18px;
  box-shadow:0 12px 40px rgba(0,0,0,.16);
  display:flex;align-items:center;gap:16px;flex-wrap:wrap;
}
.cc-consent-text{
  margin:0;flex:1 1 260px;font-size:13px;line-height:1.5;
  color:#3a3a3c;
}
.cc-consent-actions{display:flex;gap:8px;flex:none}
.cc-consent-btn{
  font-family:var(--font,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);
  font-size:13px;font-weight:600;line-height:1;
  padding:10px 16px;border-radius:980px;cursor:pointer;
  border:1px solid var(--line,#d2d2d7);background:#fff;color:var(--ink,#1d1d1f);
  transition:background .2s,transform .1s;
}
.cc-consent-btn:hover{background:#f5f5f7}
.cc-consent-btn:active{transform:scale(.97)}
.cc-consent-accept{background:var(--teal,#0F6E56);color:#fff;border-color:var(--teal,#0F6E56)}
.cc-consent-accept:hover{background:#0a5b47}
@media(max-width:600px){
  .cc-consent{bottom:12px;width:calc(100% - 24px)}
  .cc-consent-inner{padding:14px;gap:12px;border-radius:16px}
  .cc-consent-text{flex-basis:100%;font-size:12px}
  .cc-consent-actions{width:100%}
  .cc-consent-btn{flex:1;padding:11px 10px}
}

/* 横幅显示时抬高 WhatsApp 悬浮按钮，避免遮挡 */
body.cc-consent-open .wa-float{bottom:104px!important}
@media(max-width:600px){body.cc-consent-open .wa-float{bottom:150px!important}}
