/* Help chatbot (includes/chatbot.php + assets/js/chatbot.js). Uses the colour variables from site.css. */
.bot { position: fixed; right: 22px; bottom: 22px; z-index: 60; font-family: var(--f); }
.bot .ic { width: 18px; height: 18px; flex: none; }

/* Launcher */
.bot-fab { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 8px; border: 0; border-radius: 999px; background: var(--grad); color: #fff; font-family: var(--fh); font-weight: 600; font-size: 15px; cursor: pointer; box-shadow: 0 16px 34px -12px rgba(15, 159, 91, .6); transition: transform .2s, box-shadow .2s; }
.bot-fab:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -12px rgba(15, 159, 91, .7); }
.bot-fab:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.bot-fab-ic { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.bot-fab-ic .ic { width: 22px; height: 22px; transition: transform .25s, opacity .25s; }
.bot-fab-ic .i-close { position: absolute; opacity: 0; transform: rotate(-90deg); }
.bot-fab-ic::after { content: ""; position: absolute; right: 1px; top: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; animation: botPulse 2.2s infinite; }
.bot.is-open .bot-fab { padding: 0 8px; }
.bot.is-open .bot-fab-label { display: none; }
.bot.is-open .bot-fab-ic .i-open { opacity: 0; transform: rotate(90deg); }
.bot.is-open .bot-fab-ic .i-close { opacity: 1; transform: none; }
.bot.is-open .bot-fab-ic::after { display: none; }
@keyframes botPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .6); } 60% { box-shadow: 0 0 0 7px rgba(249, 115, 22, 0); } }

/* Teaser bubble */
.bot-tease { position: absolute; right: 0; bottom: 70px; width: 270px; animation: botIn .35s ease-out; }
.bot-tease[hidden] { display: none; }
.bot-tease-go { display: block; width: 100%; padding: 14px 34px 14px 16px; border: 1px solid var(--line); border-radius: 16px 16px 4px 16px; background: #fff; color: var(--text); text-align: left; font: inherit; font-size: 14px; line-height: 1.4; cursor: pointer; box-shadow: var(--shadow-lg); }
.bot-tease-go b { display: block; font-family: var(--fh); font-size: 14px; color: var(--navy); margin-bottom: 2px; }
.bot-tease-go span { color: var(--text-2); }
.bot-tease-x { position: absolute; right: 6px; top: 6px; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.bot-tease-x:hover { background: var(--soft); color: var(--text); }
.bot-tease-x .ic { width: 14px; height: 14px; }

/* Panel */
.bot-panel { position: absolute; right: 0; bottom: 70px; display: flex; flex-direction: column; width: 390px; height: min(640px, calc(100vh - 120px)); border-radius: 20px; background: #fff; box-shadow: 0 30px 70px -20px rgba(11, 27, 51, .45), 0 0 0 1px rgba(11, 27, 51, .06); overflow: hidden; animation: botIn .28s ease-out; transform-origin: bottom right; }
.bot-panel[hidden] { display: none; }
@keyframes botIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

.bot-head { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; background: var(--navy); color: #fff; }
.bot-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--grad); }
.bot-avatar .ic { width: 24px; height: 24px; }
.bot-title { flex: 1; min-width: 0; }
.bot-title b { display: block; font-family: var(--fh); font-size: 16px; letter-spacing: .2px; color: #fff; }
.bot-title small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b9c4d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-title small i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .25); }
.bot-hbtn { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 10px; background: transparent; color: #cfd8e6; cursor: pointer; }
.bot-hbtn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.bot-hbtn:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

.bot-log { position: relative; flex: 1; overflow-y: auto; padding: 18px 14px 8px; background: var(--soft); scroll-behavior: smooth; overscroll-behavior: contain; }
.bot-msg { max-width: 90%; margin-bottom: 10px; padding: 11px 14px; font-size: 14px; line-height: 1.5; animation: botIn .25s ease-out; overflow-wrap: anywhere; }
.bot-msg.from-bot { background: #fff; color: var(--text); border-radius: 4px 16px 16px 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.bot-msg.from-me { margin-left: auto; width: fit-content; background: var(--primary); color: #fff; border-radius: 16px 4px 16px 16px; font-weight: 500; }
.bot-msg b { color: var(--navy); }
.bot-msg.from-me b { color: #fff; }
.bot-msg ul, .bot-msg ol { margin: 6px 0 2px; padding-left: 20px; }
.bot-msg li { margin: 3px 0; }
.bot-msg p { margin: 8px 0 0; }
.bot-msg.is-typing { display: flex; gap: 4px; width: fit-content; padding: 14px 16px; }
.bot-msg.is-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: botDot 1s infinite; }
.bot-msg.is-typing span:nth-child(2) { animation-delay: .15s; }
.bot-msg.is-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes botDot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

/* Tables and totals inside answers */
.bot-tbl { width: 100%; margin: 8px 0; border-collapse: collapse; font-size: 13px; }
.bot-tbl th, .bot-tbl td { padding: 7px 6px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.bot-tbl tr:first-child th, .bot-tbl tr:first-child td { border-top: 0; }
.bot-tbl th { font-weight: 600; color: var(--navy); }
.bot-tbl small { display: block; color: var(--muted); font-size: 11.5px; }
.bot-fee td { text-align: right; white-space: nowrap; }
.bot-fee th { font-weight: 500; color: var(--text-2); }
.bot-fee .bot-fee-h th { font-weight: 700; color: var(--navy); }
.bot-fee .bot-fee-h td { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; }
.bot-fee .is-now th, .bot-fee .is-now td { background: var(--primary-l); }
.bot-fee .is-now th { color: var(--navy); font-weight: 600; }
.bot-fee em { display: inline-block; margin-top: 2px; padding: 1px 7px; border-radius: 999px; background: var(--primary); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 600; }
.bot-sum { margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: var(--navy); color: #dbe3ef; font-size: 13px; }
.bot-sum div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.bot-sum b { color: #fff; }
.bot-sum .bot-sum-t { margin-top: 4px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 15px; }
.bot-sum .bot-sum-t b { color: #6ee7b7; }
.bot-note { font-size: 12.5px; color: var(--text-2); }
.bot-warn { padding: 8px 10px; border-radius: 10px; background: var(--orange-l); color: var(--orange-d); font-size: 13px; }

/* Contact cards */
.bot-card { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.bot-card > b { display: block; font-family: var(--fh); }
.bot-card > small { color: var(--muted); font-size: 12px; }
.bot-card-btns { display: grid; gap: 6px; margin-top: 8px; }
.bot-card-btns a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; background: #fff; border: 1px solid var(--line); color: var(--primary-d); font-size: 13px; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.bot-card-btns a:hover { border-color: var(--primary); background: var(--primary-l); }
.bot-card-btns .ic { width: 15px; height: 15px; }

/* Option buttons */
.bot-opts { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 14px; animation: botIn .3s ease-out; }
.bot-opt { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 13px; border: 1.5px solid #cfe9db; border-radius: 999px; background: #fff; color: var(--primary-d); font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.25; text-align: left; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.bot-opt .ic { width: 16px; height: 16px; }
.bot-opt:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.bot-opt:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.bot-opt.is-link { border-color: #cbe7f6; color: var(--sky-d); }
.bot-opt.is-link:hover { background: var(--sky-d); border-color: var(--sky-d); color: #fff; }

.bot-foot { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; }
.bot-foot .ic { width: 15px; height: 15px; color: var(--primary); }
.bot-foot b { color: var(--navy); font-family: var(--fh); }

/* Back-to-top sits above the launcher */
.totop { bottom: 92px; }

@media (max-width: 760px) {
  .bot { bottom: 76px; right: 14px; }   /* above the mobile "Register Now" bar */
  .totop { bottom: 148px; right: 18px; }
}
@media (max-width: 560px) {
  .bot-fab { height: 52px; padding: 0 6px; }
  .bot-fab-label { display: none; }
  .bot-panel { position: fixed; left: 8px; right: 8px; bottom: 8px; width: auto; height: calc(100% - 16px); max-height: 700px; }
  .bot.is-open .bot-fab { display: none; }
  .bot-tease { width: min(270px, calc(100vw - 28px)); bottom: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .bot *, .bot { animation: none !important; transition: none !important; }
}
@media print { .bot { display: none; } }
