.chat-wrap .chatButton span{white-space: nowrap;font-size: 14px;z-index:999999}
.chatButton{background:var(--axm-accent);width:3.5rem;height:3.5rem;display:flex;justify-content:center;align-items:center;cursor:pointer;position:absolute;right:0rem;bottom:0rem;border-radius:3rem;border:1px solid #2b3644;transition:transform .3s ease;position:fixed;bottom:1rem;right:1rem;    z-index: 9;}
.chatButton i,.chatButton svg{font-size:24px;color:#fff}
.chat-container{background: var(--axm-dark-bg,#1a222c);width: 100%;max-width: 600px;z-index:1000;transition:transform .3s ease;border-radius: 12px;border:1px solid var(--axm-dark-border,#2b3644);box-shadow: 0 24px 60px rgba(0,0,0,0.55);overflow: hidden;display: flex;flex-direction: column;position:fixed;bottom:1rem;right:1rem;}


/* Header */
.chat-header {background: var(--axm-accent);color: var(--axm-dark-text,#e6edf3);padding: 12px 16px;display: flex;justify-content: space-between;align-items: center;}
.topic-selector {background: rgba(255,255,255,0.2);border: 1px solid rgba(255,255,255,0.3);color: var(--axm-dark-text,#e6edf3);border-radius: 4px;font-size: 12px;padding: 4px;}

/* Body */
.chat-body { height: 320px; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border-color); }
.message { padding: 10px; border-radius: 8px; font-size: 14px; max-width: 85%; }
.received { background:#222c38;color:#e6edf3; border: 1px solid var(--axm-dark-border,#2b3644); align-self: flex-start; }

/* Permanent Contact Bar */
.contact-bar {display: flex;gap: 10px;padding:0px 0px 12px;margin-top: 12px;background: var(--axm-dark-bar,#141b24);border-bottom: 1px solid var(--axm-dark-border,#2b3644);}
.pill-btn {flex: 1;padding: 8px;border: 1.5px solid var(--axm-accent);background: var(--axm-orange);color: #ffffff;border-radius: 20px;font-size: 12px;font-weight: 600;cursor: pointer;display: flex;align-items: center;justify-content: center;gap: 6px;}

/* Collapsible Utility Tray */
#utilityTray {display: none;grid-template-columns: repeat(3, 1fr);background: var(--axm-dark-deep,#10161e);border-bottom: 1px solid var(--axm-dark-border,#2b3644);}
.utility-item {padding: 15px 5px;text-align: center;border-right: 1px solid var(--axm-dark-border,#2b3644);border-bottom: 1px solid var(--axm-dark-border,#2b3644);cursor: pointer;display: flex;align-items: center;justify-content: center;}
.utility-item span { font-size: 11px; color: var(--text-grey); display: block; }
.utility-item >div{font-size:16px;margin-right:6px;}

/* Input Area */
.chat-footer { padding: 10px; display: flex; align-items: center; gap: 10px; }
.icon-btn { background: var(--axm-dark-field,#0f1419); border: 1px solid var(--axm-dark-border,#2b3644); width: 34px; height: 34px; border-radius: 6px; cursor: pointer; color: var(--axm-dark-text,#e6edf3); font-size: 18px; }
.chat-input { flex: 1; border: 1px solid var(--axm-dark-border,#2b3644); outline: none; font-size: 14px; padding: 8px;border-radius: 4px;background: var(--axm-dark-field,#0f1419);color: var(--axm-dark-text,#e6edf3);}
.send-btn { background:var(--axm-accent); color:#0b0f14; border: none;border-radius: 6px; cursor: pointer; }

/* NEW: Powered By Footer */
.powered-by {font-size:8px;color: var(--axm-dark-muted,#9aa3af);text-transform: uppercase;letter-spacing: 0.5px;}

/* Sound Switch */
.switch { position: relative; display: inline-block; width: 28px; height: 14px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #2b3644; border-radius: 34px; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 10px; width: 10px; left: 2px; bottom: 2px; background-color: var(--axm-dark-text,#e6edf3); border-radius: 50%; transition: .4s; }
input:checked + .slider { background-color: var(--axm-accent); }
input:checked + .slider:before { transform: translateX(14px); }
.notif { background: #222c38; color: var(--axm-dark-text,#e6edf3); padding: 12px; border-radius: 8px; font-size: 13px; margin: 5px 0; border: 1px solid var(--axm-dark-border,#2b3644); }


.selectCategory{opacity: 0; visibility: hidden;}
.selectCategory.show{opacity: 1; visibility: visible}




/* --- chat widget frame --- */

.widget-title{font-size: 16px;}
#categoryWrap select{font-size:12px;padding: 0.375rem 1.50rem .375rem .60rem;background-size: 10px 12px;background-position: right .50rem center;}
#categoryWrap{font-size:14px;}
.form-check .form-check-label{font-size:14px}
.form-label{font-size:14px!important;}
.card-header {border-bottom-color: var(--axm-dark-border,#2b3644) !important;}





/* --- inner bits (same as before) --- */
.chat-messages .message{margin-bottom:.9rem;max-width:80%}
.chat-messages .user-message{margin-left:auto;background:var(--axm-accent);color:#0b0f14;border-radius:15px 15px 0 15px}
.chat-messages .bot-message{background:#222c38;color:#e6edf3;border-radius:15px 15px 15px 0}
.card{border-radius:.75rem}
@media(max-width:576px){
    .chat-container{top:0;left:0;width:100%;height:100%;margin:0}
    .card{border-radius:0}
    .chat-wrap{max-width: 320px;}
}
.onboard-step label::after{content:" *";color:#dc3545;font-weight:600}


.contact-bar .pill-btn{background:var(--axm-accent);color:#0b0f14;border-color:var(--axm-accent);font-size:14px;font-weight:400;letter-spacing:0;padding: 4px 10px;border-radius: 50px;}
.contact-bar .pill-btn:hover{background:var(--axm-orange-dark);}
.chat-wrap .form-control,
.chat-wrap #messages .text-1,
.chat-wrap #messages .text-2{font-size:14px;}

.chat-wrap #messages .text-muted.small{font-size:12px}
.chat-wrap #messages .text-2 {background:var(--axm-accent)!important;color:#0b0f14!important}
.chat-wrap #messages .text-2 .text-muted.small{color:#0b0f14!important}

.chat-wrap #messages .text-1,
.chat-wrap #messages .text-2{font-size:14px;line-height: 20px;}
.chat-wrap #messages span.small{margin-top:6px;}




.chat-wrap .chat-container{transition: ease-in-out .3s all;transform:translateX(calc(100% + 1rem))}
.chat-wrap.chat-collapsed .chat-container{transform: translateX(calc(0% + 0rem));z-index:999}

/* .chat-wrap{transition: ease-in-out .3s all;}
.chat-wrap.chat-collapsed{transform:translateX(calc(100% + 1rem))}
.chat-wrap .chatButton{opacity:0;visibility:hidden}
.chat-wrap.chat-collapsed .chatButton{opacity:1;visibility:visible}
.chat-container.collapsed{transform:translateX(calc(100% + 1rem));} */


.chat-wrap #chatAlert #inactivityMessage{position:absolute;width:100%;height:100%;z-index:9;top:0;left:0;background:rgba(0,0,0,.8);display:flex;justify-content:center;align-items:center;font-size:16px;text-align:center;border-radius:12px;}
.chat-wrap #chatAlert .chatAlertInner{background:var(--axm-dark-bar,#141b24);color:var(--axm-dark-text,#e6edf3);padding:2rem ;border-radius:12px;width:100%;max-width:360px;}
.chat-wrap #chatAlert #inactivityMessage p{margin:0;font-size:18px!important;line-height:1;margin-bottom:20px!important;}

/* ============================================================
   TASK 310A - lead form (on-boarding) readability + close icon
   Card and fields are forced onto one light theme so field text
   and placeholders meet WCAG AA (>= 4.5:1). Orange accents kept.
   Hexes: orange #c2410c (5.2:1 on #fff), orange-dark #9a3412,
   field text #1f2937 (~14.7:1), placeholder #6b7280 (~4.8:1),
   error text #b91c1c (~6.5:1).
   ============================================================ */
.chat-wrap{
  --axm-orange: #c2410c;
  --axm-orange-dark: #9a3412;
  --axm-field-ink: #e6edf3;
  --axm-field-ph: #8b95a3;
  --axm-field-border: #2b3644;
  --axm-danger: #fca5a5;
  --chat-panel-w:552px;
  --chat-header-bg:var(--axm-dark-bar,#141b24);
}

.chat-wrap .chat-container,
.chat-wrap .chat-container .card{background:var(--axm-dark-bg,#1a222c);color:var(--axm-dark-text,#e6edf3);}

/* Fields: light background + readable text/placeholder (overrides any dark host theme). */
.chat-wrap .chat-container .form-control,
.chat-wrap .chat-container .form-select,
.chat-wrap #stepContact .form-control{
  background-color:var(--axm-dark-field,#0f1419) !important;
  color: var(--axm-field-ink) !important;
  border:1px solid var(--axm-field-border) !important;
  min-height:44px;
  padding:.5rem .75rem;
  font-size:14px;
  box-shadow:none;
}
.chat-wrap .chat-container .form-control::placeholder{color: var(--axm-field-ph);opacity:1;}
.chat-wrap .chat-container .form-control:focus,
.chat-wrap .chat-container .form-select:focus{
  border-color: var(--axm-orange) !important;
  box-shadow:0 0 0 .2rem rgba(194,65,12,.25);
}
.chat-wrap .chat-container .form-control.axm-has-error{border-color: var(--axm-danger) !important;}

/* Inline field message: icon + text (never colour alone). */
.chat-wrap #stepContact .field-error{
  display:flex;align-items:center;gap:6px;
  margin-top:4px;font-size:12.5px;line-height:1.35;color: var(--axm-danger);
}
.chat-wrap #stepContact .field-error[hidden]{display:none;}
.chat-wrap #stepContact .axm-fe-icon{flex:0 0 auto;}

/* Form-level alert shown if the call fails. */
.chat-wrap #stepContact .axm-form-alert{
  margin:0 0 8px;padding:8px 10px;border-radius:8px;
  background:var(--axm-err-bg,#2d1212);border:1px solid var(--axm-err-border,#7f2a2a);color:var(--axm-err-text,#fca5a5);font-size:13px;
}
.chat-wrap #stepContact .axm-form-alert[hidden]{display:none;}

/* Consent line: orange kept, link readable. */
.chat-wrap #stepContact .form-check{min-height:44px;}
.chat-wrap #stepContact .form-check-label{color:var(--axm-dark-text,#e6edf3);font-size:14px;}
.chat-wrap #stepContact .form-check-input{width:1.15em;height:1.15em;margin-top:.2em;accent-color: var(--axm-orange);}
.chat-wrap #stepContact .form-check-label a{color:var(--axm-link,#fb923c);text-decoration:underline;}

/* Continue button: orange, white text (5.2:1), >=44px. */
.chat-wrap #stepContact .axm-continue-btn{
  min-height:44px;font-size:15px;font-weight:600;
  color:#ffffff;background-color: var(--axm-orange);border:1px solid var(--axm-orange);
}
.chat-wrap #stepContact .axm-continue-btn:hover:not(:disabled){background-color: var(--axm-orange-dark);border-color: var(--axm-orange-dark);}
.chat-wrap #stepContact .axm-continue-btn:disabled{opacity:.75;cursor:not-allowed;}

/* Close icon: inline SVG replaces the missing icon-font glyph. */
.chat-wrap .chatCloseButton{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:44px;min-height:44px;padding:0;
  color:var(--axm-dark-text,#e6edf3);background:transparent;border:1px solid var(--axm-dark-border,#2b3644);
  border-radius:8px;line-height:1;
}
.chat-wrap .chatCloseButton:hover{background:#222c38;}
.chat-wrap .chat-close-icon{display:block;}

/* Touch targets. */
.chat-wrap .chat-container .btn,
.chat-wrap .chat-container .form-select{min-height:44px;}
/* ============================================================
   TASK 310B - orange launcher/buttons, readable consent checkbox,
   no blue, compact panel anchored bottom-right, single open state.
   Accent orange #ea580c; text on orange #0b0f14 (~5.4:1);
   orange text on white #c2410c (5.2:1); bubble icon white on
   #ea580c (3.56:1, graphic only). No icon font is required: all
   widget icons are inline SVG using currentColor.
   ============================================================ */
:root{
  --axm-accent:#ea580c;
  --axm-accent-ink:#0b0f14;
  --axm-accent-text:#fb923c;
  --axm-check-border:#8b95a3;
  --axm-focus:rgba(234,88,12,.35);
}

/* Compact panel anchored bottom-right. */
.chat-wrap .chat-container{max-width:min(var(--chat-panel-w),calc(100vw - 24px));}

/* Launcher: orange disc, visible white chat-bubble icon. */
.chat-wrap .chatButton{background-color:var(--axm-accent);border-color:var(--axm-accent);}
.chat-wrap .chatButton .axm-launcher-icon{color:#ffffff;display:block;}
.chat-wrap .chatButton .icon{color:#ffffff;}

/* Steps do not depend on Bootstrap d-none/d-flex being loaded. */
.chat-wrap #stepContact.d-none,
.chat-wrap #stepChat.d-none,
.chat-wrap #categoryWrap.d-none{display:none !important;}
.chat-wrap #stepChat:not(.d-none){display:flex !important;flex-direction:column;}

/* Focus ring stays orange (no blue). */
.chat-wrap .chat-container .form-control:focus,
.chat-wrap .chat-container .form-select:focus{border-color:var(--axm-accent) !important;box-shadow:0 0 0 .2rem var(--axm-focus) !important;}

/* Continue button: accent orange with dark text. */
.chat-wrap #stepContact .axm-continue-btn{color:var(--axm-accent-ink) !important;background-color:var(--axm-accent) !important;border-color:var(--axm-accent) !important;}
.chat-wrap #stepContact .axm-continue-btn:hover:not(:disabled){background-color:#f97316 !important;border-color:#f97316 !important;}

/* Send button: accent orange, dark arrow. */
.chat-wrap .chat-container .send-btn{background-color:var(--axm-accent) !important;color:var(--axm-accent-ink) !important;border-color:var(--axm-accent) !important;}
.chat-wrap .chat-container .send-btn svg{color:var(--axm-accent-ink);}

/* Small orange links on white use the readable 5.2:1 tone. */
.chat-wrap #stepContact .form-check-label a{color:var(--axm-accent-text) !important;text-decoration:underline;}

/* Consent checkbox: white box, grey border, orange fill + dark check.
   Never a solid dark square. 20px box inside a 44px tap target. */
.chat-wrap #stepContact .form-check{display:flex;align-items:flex-start;gap:.5rem;padding-left:0;min-height:44px;}
.chat-wrap #stepContact .form-check-input{
  -webkit-appearance:none;appearance:none;
  float:none !important;margin-left:0 !important;flex:0 0 auto;
  width:20px;height:20px;min-width:20px;min-height:20px;
  margin-top:.125rem;
  background-color:var(--axm-dark-field,#0f1419) !important;
  border:1.5px solid var(--axm-check-border) !important;
  border-radius:4px;
  background-image:none !important;
  box-shadow:none;cursor:pointer;
}
.chat-wrap #stepContact .form-check-input:checked{
  background-color:var(--axm-accent) !important;
  border-color:var(--axm-accent) !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%230b0f14' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:center !important;
  background-size:14px 14px !important;
}
.chat-wrap #stepContact .form-check-input:focus{border-color:var(--axm-accent) !important;box-shadow:0 0 0 .2rem var(--axm-focus) !important;outline:none !important;}
.chat-wrap #stepContact .form-check-label{flex:1 1 auto;}

/* Email-support modal submit: orange, no blue. */
#contactModal .axm-modal-submit{background-color:var(--axm-accent);border-color:var(--axm-accent);color:var(--axm-accent-ink);}
#contactModal .axm-modal-submit:hover{background-color:#f97316;border-color:#f97316;}

/* ============================================================
   TASK 320A - WHITE text on the filled orange buttons.
   White on #ea580c is only 3.56:1, which meets WCAG AA for LARGE
   text only, so the label is >= 19px AND bold (700). Hover/active
   = #c2410c (white 5.18:1). Disabled = #9a3412 (white 7.31:1) plus
   cursor:not-allowed. White on the lighter #f97316 is never used.
   ============================================================ */
.chat-wrap #stepContact .axm-continue-btn{
  color:#ffffff !important;
  font-size:19px !important;
  font-weight:700 !important;
  line-height:1.2;
  min-height:44px;
  white-space:nowrap;
  background-color:var(--axm-accent) !important;
  border-color:var(--axm-accent) !important;
}
.chat-wrap #stepContact .axm-continue-btn:hover:not(:disabled),
.chat-wrap #stepContact .axm-continue-btn:active:not(:disabled){
  background-color:#c2410c !important;
  border-color:#c2410c !important;
}
.chat-wrap #stepContact .axm-continue-btn:disabled{
  opacity:1 !important;
  color:#ffffff !important;
  background-color:#9a3412 !important;
  border-color:#9a3412 !important;
  cursor:not-allowed;
}

/* Send button: white arrow on the accent orange (icon only). */
.chat-wrap .chat-container .send-btn{background-color:var(--axm-accent) !important;color:#ffffff !important;border-color:var(--axm-accent) !important;}
.chat-wrap .chat-container .send-btn svg{color:#ffffff !important;fill:#ffffff !important;}
.chat-wrap .chat-container .send-btn:hover:not(:disabled),
.chat-wrap .chat-container .send-btn:active:not(:disabled){background-color:#c2410c !important;border-color:#c2410c !important;}

/* Email-support modal Submit: white text on the accent orange. */
#contactModal .axm-modal-submit{color:#ffffff !important;font-weight:700 !important;font-size:19px !important;background-color:var(--axm-accent) !important;border-color:var(--axm-accent) !important;}
#contactModal .axm-modal-submit:hover,
#contactModal .axm-modal-submit:active{background-color:#c2410c !important;border-color:#c2410c !important;}
#contactModal .axm-modal-submit:disabled{opacity:1 !important;color:#ffffff !important;background-color:#9a3412 !important;border-color:#9a3412 !important;cursor:not-allowed;}

/* Email-support pill (compact fill): keep the label white and readable
   at its small size by using the 5.18:1 tone #c2410c (white on #c2410c),
   NOT the 3.56:1 #ea580c. No wrap, no clip. */
.chat-wrap .contact-bar .pill-btn{color:#ffffff !important;font-weight:700 !important;background:var(--axm-orange) !important;border-color:var(--axm-orange) !important;white-space:nowrap;}
.chat-wrap .contact-bar .pill-btn:hover{background:#9a3412 !important;border-color:#9a3412 !important;}

/* ============================================================
   TASK 320B - wider panel, logo-only header, no wrapping.
   - Panel width comes from ONE variable --chat-panel-w (460px)
     and is capped by calc(100vw - 24px) so it never overflows a
     phone (screen minus the 12px margins on narrow screens).
   - The header shows ONLY the AxiumStudio logo + X (and, on the
     chat step, the full-width category dropdown). No title text.
   - Nothing may wrap; the footer stays on ONE line and there is
     no horizontal scrollbar in the panel at any width.
   The launcher, panel height, bottom-right anchoring and the one
   open/closed state (.chat-wrap.chat-collapsed) are untouched.
   ============================================================ */

/* Panel: never wider than the screen minus the 12px margins, and
   clip any stray horizontal overflow as a safety net only. */
.chat-wrap .chat-container{
  max-width:min(var(--chat-panel-w),calc(100vw - 24px));
  overflow-x:hidden;
}

/* ---- Header: ONE shared header for BOTH steps ---- */
.chat-wrap .chat-container .card-header.axm-head{
  background-color:var(--chat-header-bg);
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  gap:8px;
  padding:12px 16px;
  min-height:56px;
  white-space:nowrap;
}
.axm-head-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
  min-width:0;
}
.chat-wrap .chat-container .axm-head-row .chat-logo{
  display:block;
  height:32px;
  width:auto;
  min-width:0;
  max-width:calc(100% - 72px);
  object-fit:contain;
  flex:0 1 auto;
}
.axm-head-cat{
  display:block;
  width:100%;
}
.axm-head-cat .selectCategory,
.axm-head-cat #category,
.axm-head-cat select{
  width:100%;
  min-width:0;
}

/* ---- No wrapping anywhere ---- */
.chat-wrap #stepContact .form-check-label{white-space:nowrap;}
.chat-wrap #stepContact .axm-continue-btn,
.chat-wrap #stepContact .axm-form-alert,
.chat-wrap #contactModal .axm-modal-submit,
.chat-wrap .chat-footer,
.chat-wrap .chat-footer .send-btn,
.chat-wrap .chat-footer .icon-btn{white-space:nowrap;}

/* ---- Footer on ONE line.
   Cause of the old overflow: .contact-bar is a flex row with
   gap:10px while its children carry Bootstrap .col-md-4
   (width:33.3333% each), so 3 x 33.33% + 2 x 10px > 100% and the
   row grew past the panel (that made the horizontal scrollbar).
   Fix: let the items size to their content and never wrap. ---- */
.chat-wrap .contact-bar{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  min-width:0;
}
.chat-wrap .contact-bar > div{
  flex:0 1 auto;
  width:auto;
  max-width:none;
  min-width:0;
  padding-left:0;
  padding-right:0;
  white-space:nowrap;
  display:flex;
  align-items:center;
  gap:4px;
  font-size:13px;
}
.chat-wrap .contact-bar .pill-btn{
  flex:0 0 auto;
  white-space:nowrap;
}
.chat-wrap .contact-bar img{
  width:16px;
  height:16px;
  flex:0 0 auto;
  object-fit:contain;
}

/* Consent line: 13px only if needed, never below 13px on wide. */
@media(max-width:520px){
  .chat-wrap #stepContact .form-check-label{font-size:13px;}
}

/* Narrow screens (panel narrower than 440px): keep everything on
   ONE line - hide the "PitchForge Assistant" label first, then
   drop the footer/consent to 12px. Never wrap. */
@media(max-width:463px){
  .chat-wrap .contact-bar > div:first-child{display:none;}
  .chat-wrap .contact-bar,
  .chat-wrap .contact-bar > div{font-size:12px;}
  .chat-wrap .contact-bar .pill-btn{font-size:12px;padding:4px 8px;}
  .chat-wrap #stepContact .form-check-label{font-size:12px;}
}

/* ============================================================
   TASK 330B - DARK panel, light logo, 20% wider, more air.
   Palette (the app dark palette):
     panel bg #1a222c; header/footer bars #141b24; deep areas
     #10161e; input/dropdown #0f1419; borders #2b3644;
     main text #e6edf3; muted #9aa3af; placeholder #8b95a3;
     accent #ea580c; links #fb923c; hover #c2410c;
     error box #2d1212 / #7f2a2a / #fca5a5.
   No blue, no light surface inside the panel.
   ============================================================ */
.chat-wrap{
  --axm-dark-bg:#1a222c;
  --axm-dark-bar:#141b24;
  --axm-dark-deep:#10161e;
  --axm-dark-field:#0f1419;
  --axm-dark-border:#2b3644;
  --axm-dark-text:#e6edf3;
  --axm-dark-muted:#9aa3af;
  --axm-dark-ph:#8b95a3;
  --axm-accent:#ea580c;
  --axm-accent-ink:#0b0f14;
  --axm-accent-text:#fb923c;
  --axm-link:#fb923c;
  --axm-orange:#c2410c;
  --axm-orange-dark:#c2410c;
  --axm-err-bg:#2d1212;
  --axm-err-border:#7f2a2a;
  --axm-err-text:#fca5a5;
  --axm-danger:#fca5a5;
  --chat-panel-w:552px;
}

/* Panel, card and body: dark surfaces, light text. */
.chat-wrap .chat-container{
  background:var(--axm-dark-bg) !important;
  color:var(--axm-dark-text);
  border:1px solid var(--axm-dark-border);
  box-shadow:0 24px 60px rgba(0,0,0,0.55);
}
.chat-wrap .chat-container .card,
.chat-wrap .chat-container .card-body{background:var(--axm-dark-bg) !important;color:var(--axm-dark-text) !important;}
.chat-wrap .chat-container .card-header.axm-head{background-color:var(--axm-dark-bar) !important;border-bottom:1px solid var(--axm-dark-border) !important;}

/* Fields, dropdown and the message input: dark field on dark panel. */
.chat-wrap .chat-container .form-control,
.chat-wrap .chat-container .form-select,
.chat-wrap .chat-container .chat-input,
.chat-wrap .chat-container select{
  background-color:var(--axm-dark-field) !important;
  color:var(--axm-dark-text) !important;
  border:1px solid var(--axm-dark-border) !important;
}
.chat-wrap .chat-container .form-control::placeholder,
.chat-wrap .chat-container .chat-input::placeholder{color:var(--axm-dark-ph) !important;opacity:1;}
.chat-wrap .chat-container .form-select option{background:var(--axm-dark-field);color:var(--axm-dark-text);}
.chat-wrap .chat-container .form-label{color:var(--axm-dark-text);}
.chat-wrap .text-muted{color:var(--axm-dark-muted) !important;}

/* Autofill: keep autofilled fields dark (browsers paint them pale blue). */
.chat-wrap .chat-container input:-webkit-autofill,
.chat-wrap .chat-container input:-webkit-autofill:hover,
.chat-wrap .chat-container input:-webkit-autofill:focus,
.chat-wrap .chat-container select:-webkit-autofill,
.chat-wrap .chat-container input:autofill{
  -webkit-text-fill-color:var(--axm-dark-text) !important;
  -webkit-box-shadow:0 0 0 1000px var(--axm-dark-field) inset !important;
  box-shadow:0 0 0 1000px var(--axm-dark-field) inset !important;
  caret-color:var(--axm-dark-text);
  transition:background-color 600000s 0s, color 600000s 0s;
}

/* Message area + bubbles. */
.chat-wrap #messages.axm-messages{background:var(--axm-dark-deep) !important;border:1px solid var(--axm-dark-border) !important;}
.chat-wrap #messages .text-1{background:#222c38 !important;color:#e6edf3 !important;border-color:var(--axm-dark-border) !important;}
.chat-wrap #messages .text-1 .text-muted.small{color:var(--axm-dark-muted) !important;}
.chat-wrap #messages .text-2{background:var(--axm-accent) !important;color:#0b0f14 !important;}
.chat-wrap #messages .text-2 .text-muted.small{color:#0b0f14 !important;}

/* Footer + contact bar: bar surfaces. */
.chat-wrap .chat-container .chat-footer{background:var(--axm-dark-bar) !important;border-top:1px solid var(--axm-dark-border);}
.chat-wrap .contact-bar{background:var(--axm-dark-bar) !important;border-bottom:1px solid var(--axm-dark-border) !important;}
.chat-wrap .contact-bar > div{color:var(--axm-dark-muted);}

/* Utility tray. */
.chat-wrap #utilityTray{background:var(--axm-dark-deep) !important;border-bottom:1px solid var(--axm-dark-border) !important;}
.chat-wrap .utility-item{border-right:1px solid var(--axm-dark-border) !important;border-bottom:1px solid var(--axm-dark-border) !important;}
.chat-wrap .utility-item span{color:var(--axm-dark-muted);}

/* X (close) button: dark border, light icon, orange focus, 44px target. */
.chat-wrap .chatCloseButton{border:1px solid var(--axm-dark-border) !important;color:var(--axm-dark-text) !important;min-width:44px;min-height:44px;}
.chat-wrap .chatCloseButton:hover{background:#222c38 !important;}
.chat-wrap .chatCloseButton:focus-visible{outline:none;box-shadow:0 0 0 .2rem var(--axm-focus) !important;border-color:var(--axm-accent) !important;}

/* Links and small orange text on the dark panel. */
.chat-wrap a{color:var(--axm-link);}
.chat-wrap #stepContact .form-check-label a{color:var(--axm-link) !important;}

/* Checkbox: dark field, orange fill, dark check, visible focus, 44px target. */
.chat-wrap #stepContact .form-check-input{background-color:var(--axm-dark-field) !important;border:1.5px solid var(--axm-dark-ph) !important;}
.chat-wrap #stepContact .form-check-input:checked{background-color:var(--axm-accent) !important;border-color:var(--axm-accent) !important;}
.chat-wrap #stepContact .form-check-input:focus{border-color:var(--axm-accent) !important;box-shadow:0 0 0 .2rem var(--axm-focus) !important;outline:none !important;}

/* No blue focus rings anywhere in the widget. */
.chat-wrap .btn:focus-visible,
.chat-wrap .form-control:focus-visible,
.chat-wrap .form-select:focus-visible{outline:none;box-shadow:0 0 0 .2rem var(--axm-focus) !important;}

/* More air (TASK 330B): +4px inner L/R on header/body/footer (needs !important
   to beat Bootstrap .p-3), more vertical gap between header rows / area / footer. */
.chat-wrap .chat-container .card-header.axm-head{padding-left:20px !important;padding-right:20px !important;gap:12px !important;}
.chat-wrap .chat-container .card-body{padding-left:20px !important;padding-right:20px !important;padding-top:20px !important;padding-bottom:20px !important;}
.chat-wrap .chat-container .chat-footer{padding-left:14px !important;padding-right:14px !important;padding-top:12px !important;padding-bottom:12px !important;}
.chat-wrap #messages.axm-messages{margin-bottom:6px;}
.chat-wrap .contact-bar{margin-top:16px;padding-bottom:14px;}
@media(max-width:520px){
  .chat-wrap .chat-container .card-header.axm-head{padding-left:16px !important;padding-right:16px !important;}
  .chat-wrap .chat-container .card-body{padding-left:16px !important;padding-right:16px !important;}
  .chat-wrap .chat-container .chat-footer{padding-left:10px !important;padding-right:10px !important;}
}

/* Email-support modal (lives OUTSIDE .chat-wrap): dark surfaces + dark fields. */
#contactModal .modal-content{background:var(--axm-dark-bg,#1a222c);color:var(--axm-dark-text,#e6edf3);border:1px solid var(--axm-dark-border,#2b3644);}
#contactModal .modal-header,#contactModal .modal-footer{border-color:var(--axm-dark-border,#2b3644);}
#contactModal .modal-title{color:var(--axm-dark-text,#e6edf3);}
#contactModal .form-control{background-color:var(--axm-dark-field,#0f1419) !important;color:var(--axm-dark-text,#e6edf3) !important;border:1px solid var(--axm-dark-border,#2b3644) !important;}
#contactModal .form-control::placeholder{color:var(--axm-dark-ph,#8b95a3) !important;opacity:1;}
#contactModal .form-floating>label{color:var(--axm-dark-muted,#9aa3af);}
#contactModal .form-control:focus{border-color:var(--axm-accent,#ea580c) !important;box-shadow:0 0 0 .2rem var(--axm-focus,rgba(234,88,12,.35)) !important;}
#contactModal .btn-secondary{background-color:#2b3644;border-color:#2b3644;color:var(--axm-dark-text,#e6edf3);}
#contactModal .btn-secondary:hover{background-color:#374151;border-color:#374151;}
#contactModal .btn-close{filter:invert(1) grayscale(1) brightness(1.6);}
#contactModal .btn:focus-visible,#contactModal .btn-close:focus-visible{outline:none;box-shadow:0 0 0 .2rem var(--axm-focus,rgba(234,88,12,.35)) !important;}

/* TASK 360B: chat header shows only the logo (25px high), no name text */
#chatboat_title { font-size: 0 !important; line-height: 0 !important; }
#chatboat_title span { display: none !important; }
#chatboat_title img { height: 25px !important; width: auto !important; max-width: calc(100% - 72px) !important; object-fit: contain; object-position: left center; }
/* ============================================================
   TASK 520A - chat panel layout: chevron dropdown, footer pills
   and the 16px panel rhythm. Layout and colour ONLY - no id, no
   name, no class used by JavaScript, no option value and no JS
   handler was changed.
   Colours used here (all contrast-checked, see 520A_REPORT.md):
     panel #1a222c   header/footer bar #141b24   field #0f1419
     borders #2b3644 (hover #3a4757)
     assistant pill #2a3340 / #d1d5db  (8.66:1)
     muted text #9ca3af   chosen text #e5e7eb
     send-button orange #ea580c
     email pill #c2410c (white 5.18:1) hover #cc4b0a (white 4.59:1)
   ============================================================ */

/* ---- Panel: 14px radius, existing hairline border, corners clipped ---- */
.chat-wrap .chat-container{
  border-radius:14px;
  border:1px solid var(--axm-dark-border,#2b3644);
  overflow:hidden;
}
.chat-wrap .chat-container .card{border-radius:13px;}
/* TASK 540A - ONE outline on the panel edge: the inner light line is gone.
   The .card inside the panel was still drawing its own 1px border from the
   page theme (assets/css/studio-theme.css:
     html[data-bs-theme] .card{border:1px solid var(--axm-border);}
   where --axm-border is #dee2e6 in light mode), so a LIGHT 1px line sat
   just inside the panel border and the edge read as two lines. The card
   border keeps its 1px width, so nothing moves, but is now transparent: the
   only edge left is the container single 1px #2b3644 outline. Panel width,
   the 14px / 13px radii and every spacing are unchanged. */
.chat-wrap .chat-container .card{
  border-color:transparent !important;
}
.chat-wrap .chat-container .card-header.axm-head{
  border-top-left-radius:13px;
  border-top-right-radius:13px;
}

/* ---- Header: 16px padding. The 12px gap between the logo row and the
   topic row is the space ABOVE the dropdown; its 12px BELOW comes from the
   header's own 12px bottom padding (no doubled spacing). ---- */
.chat-wrap .chat-container .card-header.axm-head{
  padding:16px 16px 12px !important;
  gap:12px !important;
}

/* ---- Topic dropdown: 44px, dark field, own SVG chevron, 10px radius ---- */
.chat-wrap .chat-container #categoryWrap select#category,
.chat-wrap .chat-container #categoryWrap .form-select{
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  width:100%;
  height:44px;
  min-height:44px;
  padding:0 40px 0 14px;
  font-size:15px;
  color:#e5e7eb !important;
  background-color:var(--axm-dark-field,#0f1419) !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:right 14px center !important;
  background-size:16px 16px !important;
  border:1px solid var(--axm-dark-border,#2b3644) !important;
  border-radius:10px;
  cursor:pointer;
}
/* No topic chosen yet: value "" is the widget's own placeholder option and
   value "0" is the placeholder aisearchconnect.php returns - both muted.
   Any real topic renders in the light grey. :has() keeps this pure CSS, so no
   JavaScript is touched; a browser without :has() just shows the chosen tone. */
.chat-wrap .chat-container #categoryWrap select#category:has(option:checked[value=""]),
.chat-wrap .chat-container #categoryWrap select#category:has(option:checked[value="0"]){
  color:#9ca3af !important;
}
.chat-wrap .chat-container #categoryWrap select#category:hover{
  border-color:#3a4757 !important;
}
.chat-wrap .chat-container #categoryWrap select#category:focus-visible{
  outline:2px solid var(--axm-accent,#ea580c);
  outline-offset:2px;
  box-shadow:none !important;
}

/* ---- Message area: 16px inner padding, scrolling behaviour unchanged ---- */
.chat-wrap .chat-container #messages.axm-messages{
  padding:16px !important;
  overflow-y:auto;
}

/* ---- Input row: 12px / 16px with 10px between menu, field and send ---- */
.chat-wrap .chat-container .chat-footer{
  padding:12px 16px !important;
  gap:10px !important;
}
.chat-wrap .chat-container .chat-footer .send-btn{
  height:44px;
  min-height:44px;
  border-radius:10px;
  background-color:var(--axm-accent,#ea580c) !important;
  color:#ffffff !important;
}
.chat-wrap .chat-container .chat-footer .send-btn:hover:not(:disabled),
.chat-wrap .chat-container .chat-footer .send-btn:active:not(:disabled){
  background-color:#c2410c !important;
}


/* ---- Footer row: wrapping pills on a bar with a top divider ---- */
.chat-wrap .contact-bar{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:0;
  padding:12px 16px;
  background:var(--axm-dark-bar,#141b24) !important;
  border-top:1px solid var(--axm-dark-border,#2b3644);
  border-bottom:0 !important;
}

/* Item 1 - "AxiumStudio Assistant" pill. Not a link. */
.chat-wrap .contact-bar > div:nth-child(1){
  flex:0 0 auto;
  padding:7px 14px;
  border-radius:999px;
  border:1px solid #2a3340;
  background:#2a3340;
  color:#d1d5db;
  font-size:13px;
  font-weight:400;
  line-height:1.2;
  white-space:nowrap;
}

/* Item 2 - "Email Support" pill. White on the exact send-button orange
   #ea580c is only 3.56:1, so the pill FILL is darkened (the send button is
   not) to #c2410c = 5.18:1. Hover lifts it to #cc4b0a = 4.59:1, still AA. */
.chat-wrap .contact-bar > div:nth-child(2){
  flex:0 0 auto;
  padding:0;
  background:none;
  border:0;
}
.chat-wrap .contact-bar .pill-btn.email-btn{
  padding:7px 14px;
  border-radius:999px;
  border:1px solid #c2410c !important;
  background:#c2410c !important;
  color:#ffffff !important;
  font-size:13px;
  font-weight:600 !important;
  line-height:1.2;
  white-space:nowrap;
}
.chat-wrap .contact-bar .pill-btn.email-btn:hover,
.chat-wrap .contact-bar .pill-btn.email-btn:active{
  background:#cc4b0a !important;
  border-color:#cc4b0a !important;
}
.chat-wrap .contact-bar .pill-btn.email-btn:focus-visible{
  outline:2px solid var(--axm-accent,#ea580c);
  outline-offset:2px;
  box-shadow:none !important;
}

/* Item 3 - "Powered By: AxiumPro" pushed right, muted 12px (6.82:1 on the
   footer bar). The existing AxiumPro icon is kept. */
.chat-wrap .contact-bar > div:nth-child(3){
  flex:0 0 auto;
  margin-left:auto;
  padding:0;
  font-size:12px;
  color:#9ca3af;
  white-space:nowrap;
}
.chat-wrap .contact-bar > div:nth-child(3) span,
.chat-wrap .contact-bar > div:nth-child(3) strong{
  color:#9ca3af !important;
  font-size:12px;
}
.chat-wrap .contact-bar > div:nth-child(3) strong{font-weight:600;}
.chat-wrap .contact-bar > div:nth-child(3) img{margin:0 4px 0 0;vertical-align:-3px;}

/* Narrow panels: keep all three footer items visible and let them wrap
   (this supersedes the 330B rule that hid the assistant pill below 463px).
   Under 420px "Powered By: AxiumPro" takes its own full-width line. */
@media(max-width:463px){
  .chat-wrap .contact-bar > div:first-child{display:flex;}
  .chat-wrap .contact-bar,
  .chat-wrap .contact-bar > div{font-size:12px;}
}
@media(max-width:419px){
  .chat-wrap .contact-bar{flex-wrap:wrap;}
  .chat-wrap .contact-bar > div:nth-child(3){
    flex:1 0 100%;
    margin-left:0;
    justify-content:flex-start;
  }
}


/* ============================================================
   TASK 550B - IN-PANEL topic notice, end-chat card and idle
   prompt. Every class below is new and carries the .axm-chat-
   prefix; no existing selector, id, colour or spacing changed.
   Text colours used here (contrast is listed in 550B_REPORT.md):
     card #202a36  card border #3a4757  divider line #2b3644
     title #f3f4f6  text #cbd5e1  label #cbd5e1  name #f3f4f6
     undo #fb923c  ghost text #e5e7eb
     primary #c2410c with #ffffff (hover #cc4b0a), focus ring #ea580c
     idle border #7c2d12  idle tile #2b1d16  track #2b3644
     fill #ea580c  ended send background #3b2a22
   ============================================================ */

/* ---- Topic notice: divider row, Undo link, one assistant bubble ---- */
.chat-wrap .axm-chat-topicnote{margin:6px 0 2px;}
.chat-wrap .axm-chat-divider{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:4px 0;
}
.chat-wrap .axm-chat-divider-line{
  flex:1 1 auto;
  height:1px;
  min-width:12px;
  background:#2b3644;
}
.chat-wrap .axm-chat-divider-label{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  max-width:72%;
  font-size:13px;
  line-height:18px;
  font-weight:400;
  color:#cbd5e1;
  white-space:nowrap;
}
.chat-wrap .axm-chat-divider-label b{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:600;
  color:#f3f4f6;
}
.chat-wrap .axm-chat-divider-check{
  flex:0 0 auto;
  width:14px;
  height:14px;
  color:#fb923c;
  stroke:#fb923c;
}
.chat-wrap .axm-chat-undo-row{text-align:center;margin:2px 0 8px;}
.chat-wrap .axm-chat-undo{
  background:none;
  border:0;
  padding:0;
  margin:0;
  color:#fb923c;
  font-size:13px;
  font-weight:600;
  line-height:18px;
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}
.chat-wrap .axm-chat-undo:hover{color:#fdba74;}
.chat-wrap .axm-chat-undo:focus-visible{outline:2px solid #ea580c;outline-offset:2px;}

/* ---- Card: the end-chat question, the idle prompt, the ended notice ---- */
.chat-wrap .axm-chat-card{
  background:#202a36;
  border:1px solid #3a4757;
  border-radius:12px;
  padding:16px;
  margin:8px 0 4px;
}
.chat-wrap .axm-chat-card-title{
  margin:0 0 6px;
  font-size:16px;
  line-height:22px;
  font-weight:600;
  color:#f3f4f6;
}
.chat-wrap .axm-chat-card-text{
  margin:0 0 14px;
  font-size:14px;
  line-height:20px;
  font-weight:400;
  color:#cbd5e1;
}
.chat-wrap .axm-chat-card-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.chat-wrap .axm-chat-btn{
  height:40px;
  min-height:40px;
  padding:0 16px;
  border-radius:10px;
  border:1px solid transparent;
  font-size:15px;
  line-height:38px;
  font-weight:600;
  cursor:pointer;
}
.chat-wrap .axm-chat-btn-primary{
  background:#c2410c;
  border-color:#c2410c;
  color:#ffffff;
  box-shadow:0 0 0 2px rgba(234,88,12,.35),0 0 18px rgba(234,88,12,.45);
}
.chat-wrap .axm-chat-btn-primary:hover{background:#cc4b0a;border-color:#cc4b0a;}
.chat-wrap .axm-chat-btn-ghost{
  background:transparent;
  border-color:#3a4757;
  color:#e5e7eb;
}
.chat-wrap .axm-chat-btn-ghost:hover{background:#222c38;border-color:#4b5a6d;}
.chat-wrap .axm-chat-btn:focus-visible{outline:2px solid #ea580c;outline-offset:2px;}

/* ---- Idle card: warmer border, clock tile, draining bar ---- */
.chat-wrap .axm-chat-card-idle{border-color:#7c2d12;}
.chat-wrap .axm-chat-card-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 8px;
}
.chat-wrap .axm-chat-card-head .axm-chat-card-title{margin:0;}
.chat-wrap .axm-chat-icon{
  flex:0 0 auto;
  width:36px;
  height:36px;
  border-radius:10px;
  background:#2b1d16;
  border:1px solid #7c2d12;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fb923c;
  stroke:#fb923c;
}
.chat-wrap .axm-chat-progress{
  height:4px;
  border-radius:2px;
  background:#2b3644;
  overflow:hidden;
  margin:0 0 14px;
}
.chat-wrap .axm-chat-progress-fill{
  height:4px;
  width:100%;
  border-radius:2px;
  background:#ea580c;
}

/* ---- Ended state: input and send dimmed and inert ---- */
.chat-wrap #stepChat.axm-chat-ended .chat-input,
.chat-wrap #stepChat.axm-chat-ended .send-btn{
  opacity:.6;
  pointer-events:none;
}
.chat-wrap #stepChat.axm-chat-ended .send-btn{background:#3b2a22 !important;}

