/* ======================================================
   AIda floating assistant — isolated from site CSS
   Palette: white first, royal blue #01008C, yellow #E9BF25
   ====================================================== */
#aida-root, #aida-root * { box-sizing: border-box; }
#aida-root {
  /* Brand colors (aliases preserved for existing selectors). */
  --aida-blue: #01008C;
  --aida-navy: #080847;
  --aida-yellow: #E9BF25;
  --aida-green: #01008C;
  --aida-dark: #080847;
  --aida-wine: #01008C;
  --aida-gold: #E9BF25;
  --aida-cream: #FFFFFF;
  --aida-ink: #20244F;
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  right: max(22px, env(safe-area-inset-right, 0px)) !important;
  bottom: max(22px, env(safe-area-inset-bottom, 0px)) !important;
  z-index: 2147483000 !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  visibility: visible !important;
  transform: none !important;
  isolation: isolate;
  direction: ltr !important;
  text-align: left;
  color: var(--aida-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
#aida-root [hidden] { display: none !important; }
#aida-root button { font-family: inherit; letter-spacing: normal; text-transform: none; }
#aida-root button:focus-visible { outline: 3px solid #E9BF25; outline-offset: 3px; }
#aida-root button:disabled { opacity: 1; }

/* Collapsed state — always anchored to the bottom-right. */
#aida-root .aida-dock {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 44px);
}
#aida-root .aida-teaser {
  border: 1px solid rgba(168, 175, 216, .42);
  border-radius: 13px 13px 3px 13px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .2);
  color: #29315E;
  padding: 13px 16px;
  margin: 0;
  max-width: 300px;
  text-align: left;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
  cursor: pointer;
  white-space: normal;
}
#aida-root .aida-launcher {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 151px;
  height: 62px;
  margin: 0;
  padding: 9px 20px 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(233, 191, 37, .45);
  background: linear-gradient(115deg, #090966 0%, #01008C 58%, #2B28BF 100%);
  color: #fff;
  box-shadow: 0 8px 34px rgba(0, 0, 0, .33), 0 0 0 4px rgba(1, 0, 140, .12);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
#aida-root .aida-launcher:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 40px rgba(0, 0, 0, .43), 0 0 0 5px rgba(1, 0, 140, .15);
}
#aida-root .aida-launcher-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  color: #F5D86B;
  border: 1px solid rgba(250, 226, 120, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  flex: 0 0 37px;
}
#aida-root .aida-launcher-icon svg { width: 27px; height: 27px; display: block; }
#aida-root .aida-launcher-text { white-space: nowrap; line-height: 1; }
#aida-root .aida-launcher-status {
  position: absolute;
  top: 5px;
  right: 10px;
  width: 9px;
  height: 9px;
  background: #45CD97;
  border: 2px solid var(--aida-wine);
  border-radius: 50%;
}
/* When expanded, the dock disappears completely. */
#aida-root.is-open .aida-dock { display: none !important; }

/* Expanded support panel, independent of header/body flow. */
#aida-root .aida-panel {
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  right: max(22px, env(safe-area-inset-right, 0px)) !important;
  bottom: max(22px, env(safe-area-inset-bottom, 0px)) !important;
  z-index: 2147483001 !important;
  width: min(435px, calc(100vw - 44px)) !important;
  height: min(605px, calc(100dvh - 44px)) !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 44px) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border-radius: 22px;
  border: 1px solid rgba(233, 191, 37, .65);
  background: var(--aida-cream);
  box-shadow: 0 18px 75px rgba(0, 0, 0, .48), 0 0 0 1px rgba(255, 255, 255, .1);
  text-align: left;
  animation: aida-enter .24s ease-out both;
}
@keyframes aida-enter {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
#aida-root .aida-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 85px;
  padding: 14px 17px;
  flex: 0 0 auto;
  border-bottom: 2px solid var(--aida-gold);
  background: linear-gradient(115deg, #090960 0%, var(--aida-blue) 67%, #302DC0 100%);
  color: #fff;
}
#aida-root .aida-header-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
#aida-root .aida-header-identity img {
  display: block;
  width: 49px;
  height: 49px;
  border-radius: 50%;
border: 3px solid #E9BF25;
  object-fit: cover;
  object-position: 50% 23%;
  background: #E8EBFF;
  flex: 0 0 auto;
}
#aida-root .aida-header-copy { display: flex; flex-direction: column; min-width: 0; }
#aida-root .aida-header-copy strong {
  color: #fff;
  font: 600 23px/1.2 Georgia, 'Times New Roman', serif;
}
#aida-root .aida-header-copy small {
  color: #F6EEB6;
  margin-top: 3px;
  font: 400 11px/1.4 Arial, Helvetica, sans-serif;
  white-space: normal;
}
#aida-root .aida-close {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .37);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
}
#aida-root .aida-close:hover { background: rgba(255, 255, 255, .21); }
#aida-root .aida-panel-content {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 29px 32px;
  text-align: center;
  background: radial-gradient(circle at 50% 4%, rgba(233, 191, 37, .09), transparent 45%), #FFFFFF;
  scrollbar-color: #B8C0E0 transparent;
}
#aida-root .aida-brand-lockup {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 0 19px;
  max-width: 100%;
}
#aida-root .aida-portrait {
  display: block;
  width: 105px;
  height: 105px;
  flex: 0 0 105px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 50%;
  border: 4px solid #fff;
  outline: 1px solid rgba(1, 0, 140, .1);
  box-shadow: 0 9px 26px rgba(0, 0, 0, .16);
  position: relative;
  z-index: 1;
}
#aida-root .aida-brandmark {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: -10px;
  padding: 14px 17px 14px 21px;
  color: #12146B;
  background: #fff;
  border: 1px solid #DFE2F3;
  border-radius: 0 70px 70px 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .05);
}
#aida-root .aida-brand-icon { flex: 0 0 30px; width: 30px; height: 30px; color: #AD8616; }
#aida-root .aida-brandmark span {
  white-space: nowrap;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
  color: #11145A;
}
#aida-root .aida-brandmark em { font-style: italic; font-weight: 400; color: #01008C; }
#aida-root .aida-kicker {
  color: #7B6516;
  margin: 0 0 9px;
  font: 700 10px/1.4 Arial, sans-serif;
  letter-spacing: .24em;
}
#aida-root .aida-welcome {
  color: #090D69;
  margin: 0 0 13px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(23px, 2.1vw, 27px);
  font-weight: 600;
  line-height: 1.28;
}
#aida-root .aida-intro {
  color: #59617C;
  max-width: 340px;
  margin: 0 0 25px;
  font: 400 14px/1.85 Arial, Helvetica, sans-serif;
}
#aida-root .aida-intro strong { color: #11147C; font-weight: 700; }
#aida-root .aida-get-started {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 49px;
  padding: 12px 29px;
  margin: 0;
  border: 1px solid rgba(126, 132, 203, .32);
  border-radius: 999px;
  background: linear-gradient(110deg, #01008C, #2825B7);
  color: #fff;
  box-shadow: 0 7px 22px rgba(1, 0, 140, .2);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
#aida-root .aida-get-started svg { flex: 0 0 18px; }
#aida-root .aida-panel-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 34px;
  height: 34px;
  border-top: 1px solid #E5E9F7;
  background: #F7F8FE;
  color: #697291;
  font: 400 11px/1.4 Arial, Helvetica, sans-serif;
}
#aida-root .aida-footer-dot { width: 7px; height: 7px; border-radius: 50%; background: #36B58C; }

@media (max-width: 680px) {
  #aida-root {
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
  }
  #aida-root .aida-teaser { display: none; }
  #aida-root .aida-launcher {
    min-width: 58px;
    width: 58px;
    height: 58px;
    padding: 0;
    border-radius: 50%;
  }
  #aida-root .aida-launcher-icon { border: none; background: transparent; width: 42px; height: 42px; }
  #aida-root .aida-launcher-text { display: none; }
  #aida-root .aida-launcher-status { top: 4px; right: 4px; }
  #aida-root .aida-panel {
    right: max(10px, env(safe-area-inset-right, 0px)) !important;
    bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
    width: calc(100vw - 20px) !important;
    height: min(610px, calc(100dvh - 20px)) !important;
    max-height: calc(100dvh - 20px) !important;
    border-radius: 20px;
  }
  #aida-root .aida-panel-content { padding: 19px 18px 22px; }
  #aida-root .aida-brandmark span { font-size: 16px; }
  #aida-root .aida-brand-icon { width: 25px; height: 25px; flex-basis: 25px; }
  #aida-root .aida-portrait { width: 92px; height: 92px; flex-basis: 92px; }
  #aida-root .aida-intro { font-size: 13px; line-height: 1.7; margin-bottom: 18px; }
}
@media (max-width: 340px) {
  #aida-root .aida-brand-icon { display: none; }
  #aida-root .aida-brandmark { padding: 11px 12px 11px 18px; }
  #aida-root .aida-brandmark span { font-size: 15px; }
}
@media (max-height: 520px) {
  #aida-root .aida-panel-content { justify-content: flex-start; padding-top: 15px; }
  #aida-root .aida-brand-lockup { margin-bottom: 8px; }
  #aida-root .aida-portrait { width: 65px; height: 65px; flex-basis: 65px; }
  #aida-root .aida-intro { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #aida-root .aida-panel { animation: none; }
  #aida-root .aida-launcher { transition: none; }
}

/* ======================================================
   AIda AI conversation — extends the original design.
   Both welcome and chat remain inside the same fixed panel.
   ====================================================== */
#aida-root .aida-get-started { cursor: pointer; }
#aida-root .aida-get-started:hover { filter: brightness(1.12); transform: translateY(-1px); }
#aida-root .aida-chat-screen {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #F8F9FE;
}
#aida-root .aida-chat-toolbar {
  min-height: 43px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid #E2E5F4;
  background: #F4F5FE;
  color: #161877;
  font-size: 12px;
  font-weight: 700;
}
#aida-root .aida-reset {
  cursor: pointer;
  border: 1px solid #CCD0EB;
  background: #fff;
  color: #20276C;
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
}
#aida-root .aida-reset:hover { background: #EAECFD; }
#aida-root .aida-messages {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 13px;
  padding: 20px 16px;
  scrollbar-color: #B7BEE0 transparent;
  overscroll-behavior: contain;
}
#aida-root .aida-message {
  width: fit-content;
  max-width: 94%;
  padding: 11px 14px;
  border-radius: 16px;
  font: 400 13px/1.65 Arial, Helvetica, sans-serif;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  box-shadow: 0 4px 15px rgba(22, 28, 108, .07);
  unicode-bidi: plaintext;
}
#aida-root .aida-message--bot {
  align-self: flex-start;
  background: #fff;
  color: #303659;
  border: 1px solid #E1E5F3;
  border-bottom-left-radius: 5px;
}
#aida-root .aida-message--user {
  align-self: flex-end;
  background: #01008C;
  color: #fff;
  border: 1px solid #01008C;
  border-bottom-right-radius: 5px;
}
#aida-root .aida-chat-bottom {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px 8px;
  border-top: 1px solid #E1E5F3;
  background: #fff;
}
#aida-root .aida-privacy {
  margin: 0;
  color: #66718D;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}
#aida-root .aida-chat-form {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin: 0;
  border: 1px solid #CFD5EA;
  border-radius: 17px;
  background: #FFFFFF;
  padding: 7px 8px 7px 11px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .05);
}
#aida-root #aida-input {
  resize: none;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  min-height: 39px;
  max-height: 115px;
  border: 0;
  outline: none;
  background: transparent;
  color: #171953;
  font: 400 13px/1.45 Arial, Helvetica, sans-serif;
  padding: 4px 0;
  margin: 0;
  box-shadow: none;
}
#aida-root #aida-input::placeholder { color: #78819B; opacity: 1; }
#aida-root .aida-composer-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 1px;
}
#aida-root .aida-send,
#aida-root .aida-mic {
  width: 35px;
  height: 35px;
  min-width: 35px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid #D3D8EC;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
#aida-root .aida-send { color: #fff; background: #01008C; border-color: #01008C; }
#aida-root .aida-mic { color: #01008C; background: #ECF0FF; }
#aida-root .aida-mic.is-recording {
  background: #fff2f2;
  color: #b72242;
  border-color: #d83753;
  animation: aida-pulse 1s ease-in-out infinite;
}
@keyframes aida-pulse { 50% { box-shadow: 0 0 0 6px rgba(216, 55, 83, .13); } }
#aida-root .aida-send:disabled,
#aida-root .aida-mic:disabled,
#aida-root .aida-reset:disabled { opacity: .4; cursor: not-allowed; }
#aida-root .aida-chat-status {
  min-height: 15px;
  margin: 0;
  font: 400 10px/1.35 Arial, Helvetica, sans-serif;
  color: #687291;
  text-align: center;
}
#aida-root .aida-chat-status.is-error { color: #a52941; }
#aida-root .aida-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 680px) {
  #aida-root .aida-message { font-size: 12px; }
  #aida-root .aida-messages { padding: 13px 11px; }
  #aida-root .aida-privacy { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  #aida-root .aida-mic.is-recording { animation: none; }
}

/* AIda brand name — emphasize AI */
#aida-root .aida-name-ai {
    font-size: 1.18em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

#aida-root .aida-name-da {
    font-size: 0.78em;
    font-weight: 400;
    letter-spacing: 0;
}

/* AIda profile image — yellow brand accent */
#aida-root .aida-avatar {
    border: 3px solid #E9BF25 !important;
}

#aida-root .aida-header img {
    border: 3px solid #E9BF25 !important;
    border-radius: 50%;
}

/* Slightly larger AIda intro portrait */
#aida-root .aida-portrait {
    width: 116px;
    height: 116px;
    flex: 0 0 116px;
}

@media (max-width: 680px) {
    #aida-root .aida-portrait {
        width: 101px;
        height: 101px;
        flex-basis: 101px;
    }
}

@media (max-width: 340px) {
    #aida-root .aida-portrait {
        width: 88px;
        height: 88px;
        flex-basis: 88px;
    }
}
