/* ========================================
   Global AI launcher and conversation panel
   ======================================== */

:root {
  --ai-side-panel-width: min(430px, 39vw);
}

.ai-sidebar-shell {
  position: relative;
  z-index: 180;
}

.ai-sidebar-launcher-wrap {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 181;
}

.ai-sidebar-launcher {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid rgba(97, 59, 135, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 10px 28px rgba(45, 22, 67, 0.16),
    0 2px 7px rgba(45, 22, 67, 0.08);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.ai-sidebar-launcher:hover {
  box-shadow:
    0 15px 34px rgba(45, 22, 67, 0.2),
    0 2px 7px rgba(45, 22, 67, 0.1);
  transform: translateY(-3px) scale(1.03);
}

.ai-sidebar-launcher > img {
  display: block;
  width: 43px;
  height: 43px;
  object-fit: contain;
}

.ai-sidebar-launcher__sparkle {
  position: absolute;
  top: -5px;
  right: -4px;
  color: #fff;
  font-size: 15px;
  filter:
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 6px rgba(147, 51, 234, 0.95))
    drop-shadow(0 0 11px rgba(249, 115, 22, 0.8));
  animation: aiSidebarSparkle 1.8s ease-in-out infinite;
}

.ai-sidebar-launcher__label {
  position: absolute;
  right: calc(100% + 11px);
  top: 50%;
  padding: 7px 10px;
  border: 1px solid rgba(97, 59, 135, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(45, 22, 67, 0.13);
  color: #3f3153;
  font-size: 12px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(5px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  white-space: nowrap;
}

.ai-sidebar-launcher:hover .ai-sidebar-launcher__label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.ai-sidebar-menu {
  position: fixed;
  right: 24px;
  bottom: 94px;
  z-index: 182;
  width: min(330px, calc(100vw - 32px));
  max-height: min(610px, calc(100vh - 118px));
  overflow: hidden;
  border: 1px solid rgba(97, 59, 135, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 20px 50px rgba(45, 22, 67, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: aiSidebarMenuIn 0.18s ease-out;
}

.ai-sidebar-menu[hidden],
.ai-side-panel[hidden] {
  display: none;
}

.ai-sidebar-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid rgba(97, 59, 135, 0.1);
}

.ai-sidebar-menu__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ai-sidebar-menu__brand > img {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
}

.ai-sidebar-menu__brand strong,
.ai-sidebar-menu__brand span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-sidebar-menu__brand strong {
  color: #34254d;
  font-size: 14px;
  font-weight: 800;
}

.ai-sidebar-menu__brand span {
  margin-top: 2px;
  color: #81758f;
  font-size: 10px;
  font-weight: 650;
}

.ai-sidebar-menu__close,
.ai-side-panel__icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #78698f;
  cursor: pointer;
  transition:
    background 0.14s ease,
    color 0.14s ease;
}

.ai-sidebar-menu__close:hover,
.ai-side-panel__icon-button:hover {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
}

.ai-sidebar-menu__actions {
  display: grid;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid rgba(97, 59, 135, 0.1);
}

.ai-sidebar-menu__actions > button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #3f3153;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.14s ease,
    transform 0.14s ease;
}

.ai-sidebar-menu__actions > button:hover {
  background: rgba(124, 58, 237, 0.07);
  transform: translateX(2px);
}

.ai-sidebar-menu__action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  font-size: 14px;
}

.ai-sidebar-menu__action-icon--gradient {
  background: linear-gradient(135deg, #9333ea, #f97316);
  box-shadow: 0 7px 16px rgba(124, 58, 237, 0.2);
  color: #fff;
}

.ai-sidebar-menu__actions strong,
.ai-sidebar-menu__actions small {
  display: block;
}

.ai-sidebar-menu__actions strong {
  color: #3b2b53;
  font-size: 12px;
  font-weight: 800;
}

.ai-sidebar-menu__actions small {
  margin-top: 2px;
  color: #81758f;
  font-size: 10px;
  line-height: 1.35;
}

.ai-sidebar-menu__sessions {
  max-height: 260px;
  overflow-y: auto;
  padding: 11px 8px 8px;
}

.ai-sidebar-menu__sessions-heading,
.ai-side-panel__history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px 7px;
  color: #776b87;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-sidebar-menu__sessions-heading button,
.ai-side-panel__history-heading button {
  width: 23px;
  height: 23px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8a7ea0;
  cursor: pointer;
}

.ai-sidebar-menu__sessions-heading button:hover,
.ai-side-panel__history-heading button:hover {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
}

.ai-sidebar-session-list__empty {
  padding: 16px 8px;
  color: #8b8198;
  font-size: 12px;
  text-align: center;
}

.ai-sidebar-session-list__item {
  display: flex;
  align-items: center;
  gap: 3px;
  border-radius: 10px;
}

.ai-sidebar-session-list__item.is-active {
  background: rgba(124, 58, 237, 0.09);
}

.ai-sidebar-session-list__select {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #51405f;
  text-align: left;
  cursor: pointer;
}

.ai-sidebar-session-list__select:hover {
  background: rgba(124, 58, 237, 0.06);
}

.ai-sidebar-session-list__select > i {
  width: 15px;
  flex: 0 0 15px;
  color: #8b5cf6;
  font-size: 12px;
  text-align: center;
}

.ai-sidebar-session-list__text {
  min-width: 0;
  flex: 1;
}

.ai-sidebar-session-list__text strong,
.ai-sidebar-session-list__text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-sidebar-session-list__text strong {
  color: #443252;
  font-size: 11px;
  font-weight: 750;
}

.ai-sidebar-session-list__text small {
  margin-top: 2px;
  color: #8b8198;
  font-size: 9px;
}

.ai-sidebar-session-list__rename {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 3px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #968aa2;
  cursor: pointer;
}

.ai-sidebar-session-list__rename:hover {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
}

/* ----------------------------------------
   Full conversation panel
   ---------------------------------------- */

.ai-side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 185;
  display: flex;
  flex-direction: column;
  width: var(--ai-side-panel-width);
  min-width: 340px;
  border-left: 1px solid rgba(97, 59, 135, 0.14);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: -18px 0 45px rgba(45, 22, 67, 0.13);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: aiSidePanelIn 0.22s ease-out;
}

body.ai-sidebar-open .app-content-shell {
  margin-right: var(--ai-side-panel-width);
  transition: margin-right 0.22s ease;
}

.ai-side-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 63px;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(97, 59, 135, 0.1);
}

.ai-side-panel__brand,
.ai-side-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-side-panel__brand {
  min-width: 0;
}

.ai-side-panel__brand > div {
  min-width: 0;
  margin-left: 3px;
}

.ai-side-panel__brand strong,
.ai-side-panel__brand span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-side-panel__brand strong {
  color: #37264b;
  font-size: 13px;
  font-weight: 800;
}

.ai-side-panel__brand span {
  margin-top: 2px;
  color: #84788f;
  font-size: 10px;
  font-weight: 650;
}

.ai-side-panel__icon-button--brand {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.ai-side-panel__icon-button--brand img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.ai-side-panel__history {
  position: absolute;
  top: 63px;
  right: 0;
  left: 0;
  z-index: 3;
  max-height: min(420px, calc(100vh - 145px));
  overflow-y: auto;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(97, 59, 135, 0.12);
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 14px 26px rgba(45, 22, 67, 0.11);
}

.ai-side-panel__messages {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 15px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 16px;
}

.ai-side-panel__empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 300px;
  margin: auto;
  text-align: center;
}

.ai-side-panel__empty[hidden] {
  display: none;
}

.ai-side-panel__empty > img {
  width: 66px;
  height: 66px;
  object-fit: contain;
}

.ai-side-panel__empty h2 {
  margin: 14px 0 7px;
  color: #38264d;
  font-size: 19px;
  font-weight: 850;
}

.ai-side-panel__empty p {
  margin: 0;
  color: #746980;
  font-size: 13px;
  line-height: 1.5;
}

.ai-side-panel__suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 19px;
}

.ai-side-panel__suggestions button {
  padding: 7px 10px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.045);
  color: #63477f;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.14s ease,
    border-color 0.14s ease;
}

.ai-side-panel__suggestions button:hover {
  border-color: rgba(124, 58, 237, 0.34);
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
}

.ai-side-panel__message {
  display: flex;
  width: 100%;
}

.ai-side-panel__message--user {
  justify-content: flex-end;
}

.ai-side-panel__message--ai {
  justify-content: flex-start;
}

.ai-side-panel__bubble {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-side-panel__message--user .ai-side-panel__bubble {
  border-bottom-right-radius: 4px;
  background: linear-gradient(135deg, #9333ea, #f97316);
  box-shadow: 0 7px 18px rgba(124, 58, 237, 0.16);
  color: #fff;
}

.ai-side-panel__message--ai .ai-side-panel__bubble {
  border: 1px solid rgba(97, 59, 135, 0.1);
  border-bottom-left-radius: 4px;
  background: rgba(248, 246, 251, 0.92);
  color: #42334f;
}

.ai-side-panel__typing {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 12px;
  border: 1px solid rgba(97, 59, 135, 0.1);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  background: rgba(248, 246, 251, 0.92);
}

.ai-side-panel__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9d8ba8;
  animation: aiSidebarTyping 1.1s ease-in-out infinite;
}

.ai-side-panel__typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-side-panel__typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.ai-side-panel__composer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex: 0 0 auto;
  margin: 12px;
  padding: 7px;
  border: 1px solid rgba(97, 59, 135, 0.13);
  border-radius: 16px;
  background: rgba(252, 251, 254, 0.95);
  box-shadow: 0 4px 14px rgba(45, 22, 67, 0.04);
  transition:
    border-color 0.14s ease,
    box-shadow 0.14s ease;
}

.ai-side-panel__composer:focus-within {
  border-color: rgba(124, 58, 237, 0.42);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.ai-side-panel__composer textarea {
  display: block;
  min-width: 0;
  flex: 1;
  max-height: 120px;
  min-height: 38px;
  padding: 9px 3px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #39294f;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  resize: none;
}

.ai-side-panel__composer textarea::placeholder {
  color: #95899f;
}

.ai-side-panel__composer-button,
.ai-side-panel__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}

.ai-side-panel__composer-button {
  background: transparent;
  color: #897b96;
}

.ai-side-panel__composer-button:hover {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
}

.ai-side-panel__composer-button.is-connected {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  animation: aiSidebarVoicePulse 1.5s ease-in-out infinite;
}

.ai-side-panel__send {
  background: linear-gradient(135deg, #9333ea, #f97316);
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.2);
  color: #fff;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease;
  align-self:flex-end;
}

.ai-side-panel__send:hover {
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.28);
  transform: translateY(-1px);
}

@keyframes aiSidebarSparkle {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.14);
  }
}

@keyframes aiSidebarMenuIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aiSidePanelIn {
  from {
    opacity: 0;
    transform: translateX(22px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes aiSidebarTyping {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes aiSidebarVoicePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.25);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(124, 58, 237, 0);
  }
}

@media (max-width: 950px) {
  :root {
    --ai-side-panel-width: min(410px, 48vw);
  }

  body.ai-sidebar-open .app-content-shell {
    margin-right: var(--ai-side-panel-width);
  }
}

@media (max-width: 720px) {
  :root {
    --ai-side-panel-width: 100vw;
  }

  .ai-sidebar-launcher-wrap {
    right: 16px;
    bottom: 16px;
  }

  body.ai-sidebar-open .app-content-shell {
    margin-right: 0;
  }

  .ai-side-panel {
    width: 100vw;
    min-width: 0;
  }

  .ai-sidebar-launcher__label {
    display: none;
  }
}


/*
 * The inline aiPanel remains the guided/wireframe surface, but should not
 * compete visually with an active full conversation panel.
 */
body.ai-sidebar-open .aiPanel {
  display: none !important;
}





/* Panel Extras */

.ai-side-panel__message-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

.ai-side-panel__message--user .ai-side-panel__message-content {
  align-items: flex-end;
}

.ai-side-panel__message--ai .ai-side-panel__message-content {
  align-items: flex-start;
}

/* ----------------------------------------
   Rich client-request content
   ---------------------------------------- */

.ai-side-panel-extra {
  width: min(100%, 330px);
  margin-top: 9px;
  border: 1px solid rgba(97, 59, 135, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 5px 13px rgba(45, 22, 67, 0.04);
  overflow: hidden;
}

.ai-side-panel-extra__heading {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 11px 8px;
  color: #6d28d9;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ai-side-panel-extra__heading i {
  font-size: 11px;
}

.ai-side-panel-extra__loading,
.ai-side-panel-extra__error {
  padding: 11px;
  color: #7e738b;
  font-size: 11px;
}

.ai-side-panel-extra__loading i {
  margin-right: 5px;
  color: #7c3aed;
}

.ai-side-panel-extra__error {
  color: #b42318;
}

.ai-side-panel-product-list {
  display: grid;
  gap: 1px;
  padding: 0 6px 6px;
}

.ai-side-panel-product {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px;
  border-radius: 9px;
  background: rgba(248, 246, 251, 0.72);
}

.ai-side-panel-product > img,
.ai-side-panel-product__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  object-fit: cover;
}

.ai-side-panel-product__body {
  min-width: 0;
  flex: 1;
}

.ai-side-panel-product__body strong,
.ai-side-panel-product__body small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-side-panel-product__body strong {
  color: #443252;
  font-size: 11px;
  font-weight: 800;
}

.ai-side-panel-product__body small {
  margin-top: 3px;
  color: #84798f;
  font-size: 9px;
}

.ai-side-panel-product__actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ai-side-panel-product__actions button,
.ai-side-panel-product__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8b5cf6;
  cursor: pointer;
  text-decoration: none;
}

.ai-side-panel-product__actions button:hover,
.ai-side-panel-product__actions a:hover {
  background: rgba(124, 58, 237, 0.1);
}

.ai-side-panel-product__actions button.is-active {
  background: #7c3aed;
  color: #fff;
}

.ai-side-panel-extra--reports {
  padding-bottom: 7px;
}

.ai-side-panel-report-download {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 14px);
  min-height: 33px;
  margin: 0 7px 5px;
  padding: 0 9px;
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.045);
  color: #5a3c78;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  text-align: left;
}

.ai-side-panel-report-download:hover {
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
}

.ai-side-panel-report-download.is-loading {
  opacity: 0.65;
  cursor: wait;
}

.ai-side-panel-extra--redirect {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 750;
}

/* ----------------------------------------
   Guided page-assistance / wireframe items
   ---------------------------------------- */

.ai-side-panel-extra--guided {
  padding: 8px;
}

.ai-side-panel-guided-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 3px 8px;
  color: #7c3aed;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ai-side-panel-guided-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  margin-top: 5px;
  padding: 8px 9px;
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 9px;
  background: rgba(124, 58, 237, 0.035);
  color: #4d3b63;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.14s ease,
    background 0.14s ease,
    color 0.14s ease,
    transform 0.14s ease;
}

.ai-side-panel-guided-option:hover {
  border-color: rgba(124, 58, 237, 0.33);
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
  transform: translateX(2px);
}

.ai-side-panel-guided-option > i {
  flex: 0 0 auto;
  color: #8b5cf6;
  font-size: 10px;
}

.ai-side-panel-guided-text-mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 9px 3px 2px;
  padding: 3px 1px;
  border: 0;
  background: transparent;
  color: #8b7b96;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.ai-side-panel-guided-text-mode:hover {
  color: #6d28d9;
  text-decoration: underline;
}

.ai-side-panel-guided-selected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 3px;
  color: #15803d;
  font-size: 10px;
  font-weight: 750;
}

.ai-side-panel-guided-selected i {
  font-size: 10px;
}

/* ----------------------------------------
   Guided sidebar mode
   ---------------------------------------- */

.ai-side-panel__composer[hidden],
.ai-side-panel__guided-controls[hidden] {
  display: none;
}

.ai-side-panel__guided-controls {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 62px;
  margin: 12px;
  padding: 8px 42px 8px 8px;
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 16px;
  background:
    linear-gradient(
      135deg,
      rgba(124, 58, 237, 0.055),
      rgba(249, 115, 22, 0.04)
    );
  box-shadow: 0 4px 14px rgba(45, 22, 67, 0.04);
}

.ai-side-panel__guided-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.ai-side-panel__guided-pill {
  max-width: 100%;
  min-height: 31px;
  padding: 6px 10px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #58406f;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  cursor: pointer;
  transition:
    border-color 0.14s ease,
    background 0.14s ease,
    color 0.14s ease,
    transform 0.14s ease;
}

.ai-side-panel__guided-pill:hover {
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.11);
  color: #6d28d9;
  transform: translateY(-1px);
}

.ai-side-panel__guided-text-toggle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: #846b9e;
  cursor: pointer;
}

.ai-side-panel__guided-text-toggle:hover {
  border-color: rgba(124, 58, 237, 0.35);
  background: #fff;
  color: #6d28d9;
}

.ai-side-panel__guided-text-toggle > span {
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 800;
}

.ai-side-panel__guided-text-toggle > small {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  display: none;
  padding: 5px 7px;
  border: 1px solid rgba(97, 59, 135, 0.12);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(45, 22, 67, 0.12);
  color: #5e4b72;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.ai-side-panel__guided-text-toggle:hover > small {
  display: block;
}

/* ----------------------------------------
   Extension requirement state
   ---------------------------------------- */

.ai-sidebar-menu__plugin-required {
  padding: 28px 22px;
  text-align: center;
}

.ai-sidebar-menu__plugin-required[hidden],
.ai-sidebar-menu__main[hidden] {
  display: none;
}

.ai-sidebar-menu__plugin-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  border-radius: 15px;
  background:
    linear-gradient(
      135deg,
      rgba(147, 51, 234, 0.13),
      rgba(249, 115, 22, 0.12)
    );
  color: #7c3aed;
  font-size: 20px;
}

.ai-sidebar-menu__plugin-required h3 {
  margin: 0;
  color: #3b2b53;
  font-size: 14px;
  font-weight: 800;
}

.ai-sidebar-menu__plugin-required p {
  margin: 8px auto 16px;
  color: #746981;
  font-size: 12px;
  line-height: 1.5;
}

.ai-sidebar-menu__plugin-required .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ai-side-panel__message--system {
  justify-content: center;
  padding: 2px 0;
}

.ai-side-panel__message--system .ai-side-panel__message-content {
  align-items: center;
  width: 100%;
}

.ai-side-panel__system-message {
  color: #776b87;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-align: center;
}
