/* TTMUP chrome — Sungai Revive (river/eco civic)
   Sky #0ea5e9 · Leaf #22c55e · Cream #fbfdf9 — Baloo 2 + Poppins.
   Language + text-size dropdowns live in the site header (styles.css, sr2). */
:root {
  --ttmup-sky: #0ea5e9;
  --ttmup-sky-deep: #0284c7;
  --ttmup-leaf: #22c55e;
  --ttmup-leaf-deep: #16a34a;
  --ttmup-ink: #0f172a;
  --ttmup-muted: #64748b;
  --ttmup-cream: #fbfdf9;
  --ttmup-ai: #0ea5e9;
  --ttmup-ai-soft: #e0f2fe;
  --ttmup-wa: #25d366;
  --ttmup-wa-soft: #e6f9ee;
  --ttmup-card: #ffffff;
  --ttmup-border: rgba(14, 165, 233, 0.18);
  --ttmup-shadow: 0 8px 28px rgba(2, 132, 199, 0.22);
  --ttmup-radius: 16px;
  --ttmup-font: "Baloo 2", "Poppins", system-ui, sans-serif;
  --ttmup-body: "Poppins", system-ui, sans-serif;
  --ttmup-z: 2147483000;
}

/* Dual bubbles — HARD LAYOUT: AI left, WA right (never stacked) */
#ttmup-bubbles {
  position: fixed;
  inset: 0;
  z-index: var(--ttmup-z);
  pointer-events: none;
}

.ttmup-bubble,
.ttmup-bub {
  position: fixed;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--ttmup-shadow);
  pointer-events: auto;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  font-family: var(--ttmup-body);
  text-decoration: none;
  color: #fff;
}

.ttmup-bubble:hover,
.ttmup-bub:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 32px rgba(2, 132, 199, 0.28);
}

.ttmup-bubble:focus-visible,
.ttmup-bub:focus-visible {
  outline: 2px solid var(--ttmup-leaf);
  outline-offset: 3px;
}

.ttmup-bubble svg,
.ttmup-bub svg {
  width: 26px;
  height: 26px;
  display: block;
}

/* AI Help — bottom-left */
#ttmup-ai-btn,
.ttmup-bub.ai {
  left: 18px;
  right: auto;
  background: linear-gradient(145deg, var(--ttmup-sky), var(--ttmup-sky-deep));
  color: #fff;
}

/* WhatsApp — bottom-right */
#ttmup-wa-btn,
.ttmup-bub.wa {
  right: 18px;
  left: auto;
  background: var(--ttmup-wa);
  color: #fff;
}

.ttmup-bubble-label {
  position: absolute;
  bottom: calc(100% + 8px);
  white-space: nowrap;
  font: 600 11px/1.2 var(--ttmup-body);
  background: var(--ttmup-cream);
  color: var(--ttmup-ink);
  border: 1px solid var(--ttmup-border);
  border-radius: 8px;
  padding: 6px 9px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#ttmup-ai-btn .ttmup-bubble-label,
.ttmup-bub.ai .ttmup-bubble-label { left: 0; }
#ttmup-wa-btn .ttmup-bubble-label,
.ttmup-bub.wa .ttmup-bubble-label { right: 0; }

.ttmup-bubble:hover .ttmup-bubble-label,
.ttmup-bubble:focus-visible .ttmup-bubble-label,
.ttmup-bub:hover .ttmup-bubble-label,
.ttmup-bub:focus-visible .ttmup-bubble-label {
  opacity: 1;
  transform: translateY(0);
}

/* AI concierge panel */
#ttmup-ai-panel {
  position: fixed;
  left: 18px;
  bottom: 86px;
  z-index: calc(var(--ttmup-z) + 1);
  width: min(340px, calc(100vw - 36px));
  background: var(--ttmup-card);
  border: 1px solid var(--ttmup-border);
  border-radius: var(--ttmup-radius);
  box-shadow: var(--ttmup-shadow);
  font-family: var(--ttmup-body);
  color: var(--ttmup-ink);
  overflow: hidden;
  transform-origin: bottom left;
  animation: ttmup-pop 0.22s ease;
  pointer-events: auto;
}

#ttmup-ai-panel[hidden] { display: none !important; }

@keyframes ttmup-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ttmup-ai-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  background: linear-gradient(180deg, var(--ttmup-ai-soft), transparent);
}

.ttmup-ai-head h2 {
  margin: 0;
  font: 700 16px/1.3 var(--ttmup-font);
  color: var(--ttmup-sky-deep);
}

.ttmup-ai-head p {
  margin: 4px 0 0;
  font: 400 12.5px/1.45 var(--ttmup-body);
  color: var(--ttmup-muted);
}

.ttmup-ai-close {
  appearance: none;
  border: none;
  background: rgba(14, 165, 233, 0.1);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font: 600 16px/1 var(--ttmup-body);
  color: var(--ttmup-muted);
  flex-shrink: 0;
}

.ttmup-ai-close:hover {
  background: rgba(14, 165, 233, 0.18);
  color: var(--ttmup-sky-deep);
}

.ttmup-ai-body { padding: 4px 14px 14px; }

.ttmup-ai-tips {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ttmup-ai-tips li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font: 500 13px/1.4 var(--ttmup-body);
  color: var(--ttmup-ink);
  background: var(--ttmup-cream);
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(14, 165, 233, 0.1);
}

.ttmup-ai-tips li span {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.18);
  color: var(--ttmup-leaf-deep);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.ttmup-ai-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ttmup-ai-actions a,
.ttmup-ai-actions button {
  appearance: none;
  display: block;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  padding: 11px 14px;
  font: 600 13px/1.2 var(--ttmup-body);
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.ttmup-ai-actions a:hover,
.ttmup-ai-actions button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.ttmup-btn-primary {
  background: linear-gradient(135deg, var(--ttmup-sky), var(--ttmup-leaf));
  color: #fff;
}

.ttmup-btn-secondary {
  background: var(--ttmup-wa-soft);
  color: #128c3d;
}

/* Classic KOBIS signature (LOCKED)
   At rest: bold, same colour as the footer line, NO fill/pill/gradient.
   Hover/focus only: river-to-gold shimmer (gradient text) + soft glow. */
a.ttmup-kobis,
.ttmup-kobis-stamp a.ttmup-kobis {
  font-weight: 700 !important;
  color: inherit !important;
  text-decoration: none !important;
  background: transparent !important;
  background-image: none !important;
  -webkit-text-fill-color: currentColor;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: color 0.2s ease, text-shadow 0.25s ease, filter 0.25s ease;
}

a.ttmup-kobis:hover,
a.ttmup-kobis:focus-visible {
  color: #fde68a !important;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.45), 0 0 4px rgba(34, 211, 238, 0.35);
  outline: none;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  a.ttmup-kobis.ttmup-kobis-shine:hover,
  a.ttmup-kobis.ttmup-kobis-shine:focus-visible {
    background-image: linear-gradient(100deg, #67e8f9 0%, #4ade80 30%, #fde68a 50%, #4ade80 70%, #67e8f9 100%) !important;
    background-size: 220% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.45));
    animation: ttmup-kobis-shine 1.6s linear infinite;
  }
}

@keyframes ttmup-kobis-shine {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}

@media (prefers-reduced-motion: reduce) {
  a.ttmup-kobis.ttmup-kobis-shine:hover,
  a.ttmup-kobis.ttmup-kobis-shine:focus-visible { animation: none; }
}

.ttmup-kobis-stamp {
  font: 400 0.85rem/1.45 var(--ttmup-body);
  color: inherit;
  background: transparent !important;
}

/* Guided help: clickable tips + role chips → staff-ready WhatsApp brief */
.ttmup-ai-tips li { padding: 0; background: none; border: 0; }
.ttmup-tip {
  appearance: none; display: flex; gap: 10px; align-items: flex-start; width: 100%;
  text-align: left; text-decoration: none; cursor: pointer;
  font: 500 13px/1.4 var(--ttmup-body); color: var(--ttmup-ink);
  background: var(--ttmup-cream); border-radius: 12px; padding: 10px 12px;
  border: 1px solid rgba(14, 165, 233, 0.12);
  transition: border-color .15s ease, background .15s ease;
}
.ttmup-tip:hover, .ttmup-tip:focus-visible { border-color: var(--ttmup-leaf); background: #fff; outline: none; }
.ttmup-tip span {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 8px;
  background: rgba(34, 197, 94, 0.18); color: var(--ttmup-leaf-deep);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.ttmup-roles { margin: 0 0 12px; }
.ttmup-roles-title { margin: 0 0 6px; font: 700 12px/1.3 var(--ttmup-body); color: var(--ttmup-muted); text-transform: uppercase; letter-spacing: .6px; }
.ttmup-role-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ttmup-role-chip {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
  border-radius: 999px; border: 1px solid rgba(37, 211, 102, 0.45);
  background: var(--ttmup-wa-soft); color: #128c3d; text-decoration: none;
  font: 600 12.5px/1 var(--ttmup-body); transition: transform .15s ease, background .15s ease;
}
.ttmup-role-chip:hover, .ttmup-role-chip:focus-visible { background: #d3f5e0; transform: translateY(-1px); outline: none; }
#ttmup-ai-panel { max-height: calc(100vh - 110px); overflow-y: auto; }

@media (max-width: 480px) {
  .ttmup-bubble,
  .ttmup-bub {
    width: 52px;
    height: 52px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  #ttmup-ai-btn, .ttmup-bub.ai { left: 14px; }
  #ttmup-wa-btn, .ttmup-bub.wa { right: 14px; }
  #ttmup-ai-panel { left: 14px; bottom: 78px; width: calc(100vw - 28px); }
  .ttmup-bubble-label { display: none; }
}
