/* assistant.css - "Ask Frenzon" chat card on the More page (Help Centre).
   Uses the portal's own colour variables; no external fonts or images. */
.as-card { display: grid; gap: 12px; }
.as-log { display: flex; flex-direction: column; gap: 10px; max-height: 380px; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 12px; border-radius: 18px; background: var(--bg-subtle); scroll-behavior: smooth; overscroll-behavior: contain; }
.as-row { display: flex; align-items: flex-end; gap: 8px; }
.as-row.as-me { justify-content: flex-end; }
.as-av { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #f4c95d; font-weight: 800; font-size: .8rem; }
.as-bubble { max-width: 88%; padding: 10px 13px; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--border-color); font-size: .88rem; line-height: 1.55; overflow-wrap: anywhere; }
.as-me .as-bubble { border-radius: 16px 16px 4px 16px; background: var(--primary); border-color: var(--primary); color: #fff; }
.as-bubble p { margin: 0; }
.as-bubble p + p { margin-top: 7px; }
.as-src { font-size: .74rem; color: var(--text-muted); }
.as-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.as-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: .74rem; color: var(--text-muted); }
.as-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.as-chips::-webkit-scrollbar { display: none; }
.as-chip { flex: none; padding: 8px 13px; border-radius: 99px; border: 1px solid var(--border-color); background: var(--surface); color: var(--primary); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.as-chip:hover, .as-chip:focus-visible { background: var(--primary-light); }
.as-chip-sm { padding: 5px 10px; font-size: .74rem; white-space: normal; text-align: left; }
.as-form { display: flex; gap: 8px; }
.as-form .form-control { flex: 1 1 auto; width: auto; min-width: 0; }
.as-form .btn { flex: none; width: auto; min-width: 76px; }
.as-foot { display: flex; justify-content: space-between; gap: 10px; font-size: .72rem; color: var(--text-muted); }
.as-clear { border: 0; background: none; color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.as-typing { display: flex; gap: 4px; padding: 13px 14px; }
.as-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); opacity: .4; animation: as-dot 1s infinite ease-in-out; }
.as-typing i:nth-child(2) { animation-delay: .15s; }
.as-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes as-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .as-log { scroll-behavior: auto; } .as-typing i { animation: none; opacity: .6; } }
.as-card > * { min-width: 0; }
.as-card { min-width: 0; }

/* Full chat page (opened from the Ask Frenzon card on More). */
.as-open { width: 100%; }
.as-back { border: 0; background: none; color: var(--primary); font: inherit; font-weight: 700; padding: 4px 0 10px; cursor: pointer; }
.as-page .as-log { max-height: none; min-height: 0; }


/* Keep short chats at the bottom WITHOUT hiding the top (the old align-content:end bug). */
.as-log::before { content: ""; margin-top: auto; }
.as-row { flex: none; }

/* ---- Unique look: "Frenzon Glow" ---- */
.as-card { position: relative; background: radial-gradient(120% 140% at 100% 0%, #2b8a62 0%, #14432f 62%); border: 1px solid rgba(244,201,93,.28); box-shadow: 0 10px 30px rgba(8,34,24,.45), inset 0 0 0 1px rgba(255,255,255,.04); color: #eef2fa; }
.as-card::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 260px; height: 260px; background: radial-gradient(circle, rgba(244,201,93,.22), transparent 65%); pointer-events: none; }
.as-card .more-title, .as-card .more-sub { color: #fff; }
.as-card .more-sub { opacity: .75; }
.as-log { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(6px); scrollbar-width: thin; scrollbar-color: rgba(244,201,93,.5) transparent; }
.as-log::-webkit-scrollbar { width: 5px; }
.as-log::-webkit-scrollbar-thumb { background: rgba(244,201,93,.5); border-radius: 9px; }
.as-av { background: radial-gradient(circle at 30% 30%, #ffe08a, #e0b04a); color: #0c3123; box-shadow: 0 0 0 3px rgba(244,201,93,.25), 0 0 14px rgba(244,201,93,.55); animation: as-pulse 3s ease-in-out infinite; }
@keyframes as-pulse { 50% { box-shadow: 0 0 0 5px rgba(244,201,93,.12), 0 0 20px rgba(244,201,93,.7); } }
.as-bubble { background: rgba(255,255,255,.96); color: #0c2a1e; border: 0; box-shadow: 0 2px 8px rgba(0,0,0,.18); animation: as-in .25s ease-out; }
.as-me .as-bubble { background: linear-gradient(135deg, #f4c95d, #e0a93a); color: #0c3123; font-weight: 600; }
.as-src { color: #5c6779; }
@keyframes as-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.as-chip { background: rgba(255,255,255,.08); color: #f4c95d; border-color: rgba(244,201,93,.4); }
.as-chip:hover, .as-chip:focus-visible { background: rgba(244,201,93,.18); }
.as-bubble .as-chip { background: #fff7e0; color: #7a5a00; border-color: #e8c978; }
.as-form .form-control { background: rgba(255,255,255,.95); color: #0c2a1e; border-radius: 99px; padding-left: 16px; }
.as-form .btn { border-radius: 99px; background: linear-gradient(135deg, #f4c95d, #e0a93a); color: #0c3123; border: 0; font-weight: 800; }
.as-foot, .as-clear { color: rgba(238,242,250,.7); }
.as-clear { color: #f4c95d; }
.as-back { color: var(--primary); }
.as-typing i { background: #0c3123; }
@media (prefers-reduced-motion: reduce) { .as-av, .as-bubble { animation: none; } }

/* ---- Full-page chat: the card fills the screen between the top bar and the bottom menu ---- */
.ask-page.active { display: flex; flex-direction: column; height: calc(100vh - 150px); height: calc(100dvh - 150px); padding-bottom: 0; }
.ask-page .as-back { flex: none; }
.ask-page .as-card.as-page { flex: 1 1 auto; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto auto auto; margin-bottom: 0; }
.ask-page .as-log { height: auto; min-height: 0; max-height: none; }
.ask-page .more-head { padding: 0; }
.ask-page .more-sub { display: none; }
.as-card { background: radial-gradient(420px 220px at 90% -10%, rgba(224,176,74,.28), transparent 70%), radial-gradient(120% 140% at 100% 0%, #2b8a62 0%, #14432f 62%); border-color: rgba(224,176,74,.35); }
.as-card .more-ic { background: linear-gradient(135deg, #f4c95d, #e0a93a); color: #0c3123; }
.as-card .more-ic svg { stroke: #0c3123; }
.as-log { background: rgba(255,255,255,.07); }
.as-bubble { background: #fbfaf4; }
.as-chip { color: #f6e3b0; }
.as-back { color: #14432f; }
@media (min-width: 900px) { .ask-page.active { height: calc(100dvh - 120px); } }

/* ---- TRUE FULL SCREEN: the chat covers the whole screen (top bar and bottom menu included).
   Its own header has the Back button, so the member can always return to More. ---- */
.ask-page.active {
  position: fixed; inset: 0; z-index: 1000; height: 100vh; height: 100dvh; width: 100%;
  display: flex; flex-direction: column; margin: 0; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
  background: radial-gradient(120% 140% at 100% 0%, #2b8a62 0%, #14432f 62%);
}
.ask-page.active .as-back { flex: none; align-self: flex-start; padding: 12px 16px 6px; color: #f6e3b0; font-size: .95rem; }
.ask-page.active .as-card.as-page {
  flex: 1 1 auto; min-height: 0; width: 100%; max-width: 860px; margin: 0 auto; border: 0; border-radius: 0; box-shadow: none;
  background: transparent; padding: 4px 14px 12px; gap: 10px;
}
.ask-page.active .as-card::before { display: none; }
.ask-page.active .as-log { border-radius: 18px; padding: 14px; }
.ask-page.active .as-bubble { max-width: 92%; font-size: .93rem; }
.ask-page.active .as-form { padding-bottom: 2px; }
.ask-page.active .as-form .form-control { min-height: 46px; font-size: 16px; }  /* 16px stops iPhone zooming in */
.ask-page.active .as-form .btn { min-height: 46px; }
.ask-page.active .as-foot { font-size: .68rem; }

/* ---- MINT THEME (matches the bottom navigation bar): light mint page, white bubbles, deep-green text ---- */
.ask-page.active { background: linear-gradient(180deg, #eaf6ef 0%, #d9eee2 55%, #cfe8da 100%); }
.as-card, .ask-page.active .as-card.as-page { background: transparent; color: #0c2a1e; box-shadow: none; }
.as-card .more-title { color: #0f3626; }
.as-card .more-sub { color: #3d6652; opacity: 1; }
.ask-page.active .as-back { color: #14432f; }
.as-log { background: rgba(255,255,255,.55); border: 1px solid rgba(20,67,47,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); scrollbar-color: rgba(31,107,74,.55) transparent; }
.as-log::-webkit-scrollbar-thumb { background: rgba(31,107,74,.55); }
.as-av { background: linear-gradient(145deg, #1f6b4a, #14432f); color: #f6e3b0; box-shadow: 0 0 0 3px rgba(31,107,74,.18), 0 4px 10px rgba(20,67,47,.25); animation: none; }
.as-bubble { background: #fff; color: #0c2a1e; border: 1px solid rgba(20,67,47,.1); box-shadow: 0 2px 8px rgba(20,67,47,.1); }
.as-me .as-bubble { background: linear-gradient(145deg, #1f6b4a, #14432f); color: #fff; border-color: transparent; font-weight: 600; }
.as-src { color: #3d6652; }
.as-chip { background: #fff; color: #14432f; border-color: rgba(20,67,47,.28); }
.as-chip:hover, .as-chip:focus-visible { background: #dcf0e5; }
.as-bubble .as-chip { background: #eaf6ef; color: #14432f; border-color: rgba(20,67,47,.25); }
.as-form .form-control { background: #fff; color: #0c2a1e; border: 1px solid rgba(20,67,47,.25); }
.as-form .btn { background: linear-gradient(145deg, #1f6b4a, #14432f); color: #fff; }
.as-foot { color: #3d6652; }
.as-clear { color: #14432f; }
.as-typing i { background: #1f6b4a; }

/* Ask Frenzon launcher on More: sits right under the profile card, in the featured green style */
#askLauncherCard { border: 0; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #2b8a62 0%, #14432f 62%); box-shadow: var(--shadow-md); }
#askLauncherCard .more-title { color: #fff; }
#askLauncherCard .more-sub { color: rgba(255,255,255,.82); }
#askLauncherCard .more-ic { background: linear-gradient(135deg, #f4c95d, #e0a93a); color: #0c3123; }
#askLauncherCard .as-open { background: var(--accent, #e0b04a); color: #3b2a02; box-shadow: none; margin-top: 4px; }
