@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

@font-face {
  font-family: 'SangBleu BP Sans Light';
  src: url('./SangBleuBPSans-Light.otf') format('opentype');
  font-style: normal;
  font-weight: 300;
}

:root {
  --bg-top: #2f333f;
  --bg-bottom: #2b303c;
  --card: #313747;
  --line: #4b5161;
  --line-soft: #434959;
  --text: #e8ebf2;
  --muted: #a8adbb;
  --brand: #f6c764;
  --brand-strong: #d8aa4d;
}

html,
body,
#root {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: Manrope, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(1300px 600px at 50% -220px, #3a4051 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.workspace-shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  box-sizing: border-box;
  overflow: hidden;
  animation: shell-fade 420ms ease-out both;
}

.chat-card {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #333948, #2e3444);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: 0 20px 55px rgba(8, 10, 17, 0.35);
}

.chat-header {
  padding: 14px clamp(16px, 3vw, 28px);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: 'SangBleu BP Sans Light', 'Segoe UI', sans-serif;
  background: linear-gradient(90deg, #222733, #1f2430 70%, #1d2330);
  position: relative;
  z-index: 5;
  box-shadow: 0 14px 32px rgba(8, 10, 17, 0.18);
}

.agent-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.agent-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(160deg, #e8f2cb, #c8df99);
  color: #60753a;
  display: grid;
  place-items: center;
  font-size: 32px;
  line-height: 1;
  overflow: hidden;
}

.agent-meta {
  min-width: 0;
}

.agent-meta h1 {
  margin: 0;
  font-family: 'SangBleu BP Sans Light', 'Segoe UI', sans-serif;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.02;
  color: #f3f6fb;
}

.agent-meta p {
  margin: 2px 0 0;
  color: #f0c765;
  font-family: 'SangBleu BP Sans Light', 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-group {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.status-logo {
  display: block;
  height: 72px;
  object-fit: contain;
  width: auto;
}

.agent-status {
  border-radius: 999px;
  border: 1px solid #56739a;
  background: rgba(25, 33, 49, 0.6);
  color: #d9e8ff;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  position: relative;
}

.agent-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
  background: #51c29a;
  box-shadow: 0 0 0 0 rgba(81, 194, 154, 0.55);
  animation: pulse 1800ms ease-out infinite;
}

.chat-stage {
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.webchat-host {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.starter-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
}

.starter-prompts__label {
  color: #d9dde9;
  flex-basis: 100%;
  font-size: 13px;
  line-height: 1.2;
  margin: 0 0 2px;
}

.starter-prompt {
  appearance: none;
  border: 1px solid rgba(200, 169, 110, 0.55);
  border-radius: 999px;
  background: rgba(31, 36, 48, 0.86);
  color: #f3ead8;
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
  padding: 10px 14px;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.starter-prompt:hover {
  background: rgba(45, 51, 65, 0.96);
  border-color: #c8a96e;
  transform: translateY(-1px);
}

.starter-prompt:focus-visible {
  outline: 2px solid #f6c764;
  outline-offset: 2px;
}

.webchat-host .webchat-fluent,
.webchat-host .webchat-fluent.w2roZmq_theme {
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  background: transparent !important;
  --webchat-colorNeutralBackground1: #3a3f4e !important;
  --webchat-colorNeutralBackground1Hover: #3a3f4e !important;
  --webchat-colorNeutralBackground1Pressed: #3a3f4e !important;
  --webchat-colorNeutralBackground3: #3a3f4e !important;
  --webchat-colorNeutralBackground4: #3a3f4e !important;
  --webchat-colorNeutralStroke1: #5a5e69 !important;
  --webchat-colorNeutralStroke1Hover: #5a5e69 !important;
  --webchat-colorNeutralStroke1Pressed: #5a5e69 !important;
  --webchat-colorNeutralForeground1: #d9dde9 !important;
  --webchat-colorNeutralForeground2: #d9dde9 !important;
  --webchat-colorNeutralForeground3: #d9dde9 !important;
  --webchat-colorNeutralForeground4: #d9dde9 !important;
  --webchat-colorNeutralForegroundDisabled: #d9dde9 !important;
  --webchat-colorBrandBackground: #c8a96e !important;
  --webchat-colorBrandBackgroundHover: #c8a96e !important;
  --webchat-colorBrandBackgroundPressed: #c8a96e !important;
  --webchat-colorNeutralForegroundOnBrand: #1f2430 !important;
}

.webchat-host .webchat__chat-history-box,
.webchat-host .webchat__basic-transcript,
.webchat-host .transcript-focus-area__root,
.webchat-host [class*='react-scroll-to-bottom'] {
  min-height: 0 !important;
}

.webchat-host .webchat__chat-history-box {
  background: transparent !important;
}

.webchat-host .webchat__chat-history-box__toolbar {
  display: none !important;
}

.webchat-host .webchat__basic-transcript__transcript {
  padding: 22px clamp(14px, 3vw, 28px) 18px !important;
  box-sizing: border-box;
}

.webchat-host form.sendbox,
.webchat-host .webchat__send-box,
.webchat-host .webchat-fluent .send-box {
  position: sticky;
  bottom: 0;
  margin: 0 !important;
  padding:
    14px clamp(14px, 3vw, 28px)
    calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  background:
    linear-gradient(180deg, rgba(43, 48, 60, 0) 0%, rgba(43, 48, 60, 0.92) 28%, rgba(43, 48, 60, 0.98) 100%) !important;
  border-top: 1px solid rgba(75, 81, 97, 0.9);
  backdrop-filter: blur(12px);
  z-index: 4;
}

.webchat-host .suggested-actions,
.webchat-host .wy3OzFW_suggested-actions {
  align-items: flex-start !important;
  margin-bottom: 10px !important;
  width: 100% !important;
}

/* Exact Fluent sendbox classes from runtime DOM */
.webchat-host .sendbox__sendbox,
.webchat-host .wHTirJa_sendbox__sendbox {
  --sendbox-controls-width: 150px;
  background: #3a3f4e !important;
  border: 1px solid #5a5e69 !important;
  border-radius: 18px !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
  row-gap: 10px !important;
  padding: 14px calc(var(--sendbox-controls-width) + 20px) 14px 16px !important;
  position: relative !important;
}

.webchat-host .sendbox__sendbox-text-area,
.webchat-host .wHTirJa_sendbox__sendbox-text-area,
.webchat-host .sendbox__text-area--in-grid,
.webchat-host .wHTirJa_sendbox__text-area--in-grid {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  padding-bottom: 24px !important;
  width: 100% !important;
}

.webchat-host .sendbox__sendbox-text-area,
.webchat-host .wHTirJa_sendbox__sendbox-text-area,
.webchat-host .sendbox__text-area--in-grid,
.webchat-host .wHTirJa_sendbox__text-area--in-grid,
.webchat-host .text-area,
.webchat-host .w4-KLeG_text-area,
.webchat-host .text-area--scroll,
.webchat-host .w4-KLeG_text-area--scroll {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.webchat-host .text-area-input,
.webchat-host .w4-KLeG_text-area-input {
  background: transparent !important;
  color: #d9dde9 !important;
  border: 0 !important;
  box-shadow: none !important;
  font-family: Manrope, 'Segoe UI', sans-serif !important;
}

.webchat-host .text-area-input::placeholder,
.webchat-host .w4-KLeG_text-area-input::placeholder {
  color: #d9dde9 !important;
  opacity: 1 !important;
}

.webchat-host .sendbox__sendbox-controls,
.webchat-host .wHTirJa_sendbox__sendbox-controls,
.webchat-host .sendbox__sendbox-controls--in-grid,
.webchat-host .wHTirJa_sendbox__sendbox-controls--in-grid,
.webchat-host .sendbox__toolbar,
.webchat-host .weDCCeq_sendbox__toolbar,
.webchat-host .sendbox__add-attachment,
.webchat-host .wTxWh-G_sendbox__add-attachment {
  background: transparent !important;
}

.webchat-host .sendbox__sendbox-controls,
.webchat-host .wHTirJa_sendbox__sendbox-controls,
.webchat-host .sendbox__sendbox-controls--in-grid,
.webchat-host .wHTirJa_sendbox__sendbox-controls--in-grid {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-items: flex-end !important;
  display: flex !important;
  gap: 10px !important;
  justify-content: space-between !important;
  margin-top: 0 !important;
  min-height: 52px !important;
  position: absolute !important;
  left: 16px !important;
  right: 16px !important;
  bottom: 16px !important;
  width: auto !important;
  z-index: 1 !important;
}

.webchat-host .sendbox__error-message,
.webchat-host .wa8yVAW_sendbox__error-message {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
}

.webchat-host .sendbox__toolbar,
.webchat-host .weDCCeq_sendbox__toolbar {
  align-items: center !important;
  display: flex !important;
  flex-shrink: 0 !important;
  gap: 10px !important;
  margin-left: auto !important;
  width: fit-content !important;
}

.webchat-host .sendbox__text-counter,
.webchat-host .wHTirJa_sendbox__text-counter {
  color: #d9dde9 !important;
  flex: 0 0 auto !important;
  font-size: 14px !important;
  line-height: 1 !important;
  margin-right: 0 !important;
  white-space: nowrap !important;
}

.webchat-host .sendbox__toolbar-button,
.webchat-host .weDCCeq_sendbox__toolbar-button {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 14px !important;
  color: #d9dde9 !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  height: 32px !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 32px !important;
}

.webchat-host .sendbox__toolbar-button:last-child,
.webchat-host .weDCCeq_sendbox__toolbar-button:last-child {
  background: #c8a96e !important;
  color: #1f2430 !important;
}

.webchat-host .sendbox__toolbar-separator,
.webchat-host .weDCCeq_sendbox__toolbar-separator {
  background: #5a5e69 !important;
  align-self: stretch !important;
  flex: 0 0 1px !important;
  height: auto !important;
  margin: 0 2px !important;
  opacity: 1 !important;
  width: 1px !important;
}

.webchat-host .fluent-icon,
.webchat-host .wdGN4aG_fluent-icon {
  background-color: currentColor !important;
}


.webchat-host .webchat__send-box {
  margin-top: auto;
}

.webchat-host .webchat__send-box__main {
  align-items: center;
  background: #3a3f4e !important;
  border: 1px solid #5a5e69 !important;
  border-radius: 18px !important;
  box-sizing: border-box;
  gap: 8px;
  padding: 10px 14px;
}

.webchat-host .webchat__send-box__editable,
.webchat-host .webchat__send-box__text-box,
.webchat-host .webchat__send-box-text-box,
.webchat-host .webchat__send-box__attachment-bar {
  background: transparent !important;
}

.webchat-host .webchat__send-box-text-box__input,
.webchat-host .webchat__send-box-text-box__html-text-area,
.webchat-host .text-area,
.webchat-host .text-area-input {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #d9dde9 !important;
  font-family: Manrope, 'Segoe UI', sans-serif !important;
}

.webchat-host .webchat__send-box-text-box__input::placeholder,
.webchat-host .webchat__send-box-text-box__html-text-area::placeholder,
.webchat-host .text-area-input::placeholder {
  color: #d9dde9 !important;
  opacity: 1 !important;
}

.webchat-host .webchat__send-box-text-box__input:focus,
.webchat-host .webchat__send-box-text-box__html-text-area:focus,
.webchat-host .text-area-input:focus {
  outline: none !important;
}

.webchat-host .webchat__icon-button {
  border-radius: 14px !important;
}

.webchat-host .webchat__send-box__button .webchat__icon-button__shade {
  background: transparent !important;
}

.webchat-host .webchat__send-box__button .webchat__icon-button {
  color: #d9dde9 !important;
}

.webchat-host .webchat__send-box__button:last-child .webchat__icon-button__shade {
  background: #c8a96e !important;
  border-radius: 14px !important;
  opacity: 1 !important;
}

.webchat-host .webchat__send-box__button:last-child .webchat__icon-button {
  color: #1f2430 !important;
  min-height: 32px;
  min-width: 32px;
}

.webchat-host .webchat__send-box__button:last-child .webchat__icon-button svg,
.webchat-host .webchat__send-box__button:last-child .webchat__icon-button path {
  fill: currentColor !important;
  stroke: currentColor !important;
}

.webchat-host .webchat__send-box__button:first-child .webchat__icon-button {
  min-height: 32px;
  min-width: 32px;
}

.webchat-host .webchat__send-box .webchat__char-count,
.webchat-host .webchat__send-box [class*='char-count'],
.webchat-host .webchat__send-box [class*='limit'] {
  color: #d9dde9 !important;
}

/* Fluent theme input overrides */
.webchat-host .webchat-fluent .send-box,
.webchat-host .webchat-fluent .send-box__main,
.webchat-host .webchat-fluent .text-area,
.webchat-host .webchat-fluent .send-box-text-box,
.webchat-host .webchat-fluent .send-box-text-box__text-area,
.webchat-host .webchat-fluent .send-box__editable,
.webchat-host .webchat-fluent .send-box__text-box {
  background: #3a3f4e !important;
}

.webchat-host .webchat-fluent .send-box {
  margin-top: auto;
}

.webchat-host .webchat-fluent .send-box__main {
  align-items: center !important;
  border: 1px solid #5a5e69 !important;
  border-radius: 18px !important;
  box-sizing: border-box;
  gap: 8px !important;
  padding: 10px 14px !important;
}

.webchat-host .webchat-fluent .text-area,
.webchat-host .webchat-fluent .text-area:focus-within,
.webchat-host .webchat-fluent .send-box-text-box,
.webchat-host .webchat-fluent .send-box__text-box,
.webchat-host .webchat-fluent .send-box__editable {
  border: 0 !important;
  box-shadow: none !important;
}

.webchat-host .webchat-fluent .text-area-input,
.webchat-host .webchat-fluent .send-box-text-box__input,
.webchat-host .webchat-fluent .send-box-text-box__html-text-area {
  background: transparent !important;
  color: #d9dde9 !important;
  font-family: Manrope, 'Segoe UI', sans-serif !important;
}

.webchat-host .webchat-fluent .text-area-input::placeholder,
.webchat-host .webchat-fluent .send-box-text-box__input::placeholder,
.webchat-host .webchat-fluent .send-box-text-box__html-text-area::placeholder {
  color: #d9dde9 !important;
  opacity: 1 !important;
}

.webchat-host .webchat-fluent .submit-button,
.webchat-host .webchat-fluent .send-box__button:last-child .icon-button__shade,
.webchat-host .webchat-fluent .send-box__button:last-child .webchat__icon-button__shade {
  background: #c8a96e !important;
  border: 0 !important;
  border-radius: 14px !important;
  opacity: 1 !important;
}

.webchat-host .webchat-fluent .submit-button,
.webchat-host .webchat-fluent .send-box__button:last-child .icon-button,
.webchat-host .webchat-fluent .send-box__button:last-child .webchat__icon-button {
  color: #1f2430 !important;
  min-height: 32px !important;
  min-width: 32px !important;
}

.webchat-host .webchat-fluent .send-box__button:first-child .icon-button,
.webchat-host .webchat-fluent .send-box__button:first-child .webchat__icon-button {
  color: #d9dde9 !important;
}

.webchat-host .webchat-fluent .send-box__button:first-child .icon-button__shade,
.webchat-host .webchat-fluent .send-box__button:first-child .webchat__icon-button__shade {
  background: transparent !important;
}

.webchat-host .webchat-fluent .submit-button svg,
.webchat-host .webchat-fluent .submit-button path,
.webchat-host .webchat-fluent .send-box__button:last-child svg,
.webchat-host .webchat-fluent .send-box__button:last-child path {
  fill: currentColor !important;
  stroke: currentColor !important;
}

.empty-state {
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  animation: rise 350ms ease-out both;
  gap: 8px;
}

.empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #60753a;
  background: linear-gradient(160deg, #e8f2cb, #c8df99);
}

.empty-state h2 {
  margin: 2px 0 0;
  font-size: 28px;
  color: #f3f6fb;
}

.empty-state p {
  margin: 0;
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 14px;
}

/* WebChat bubble override for current WebChat DOM */
.webchat-host .webchat__bubble:not(.webchat__bubble--from-user) .webchat__bubble__content {
  background: #F6F1E6 !important;
  border: 2px solid #C8A96E !important;
  color: #000000 !important;
}

.webchat-host .webchat__bubble:not(.webchat__bubble--from-user) .webchat__bubble__nub-outline {
  fill: #F6F1E6 !important;
  stroke: #C8A96E !important;
  stroke-width: 2px !important;
}

.webchat-host .webchat__bubble.webchat__bubble--from-user .webchat__bubble__content {
  background: #FBF7EF !important;
  border: 2px solid #D9BE8C !important;
  color: #000000 !important;
}

.webchat-host .webchat__bubble.webchat__bubble--from-user .webchat__bubble__nub-outline {
  fill: #FBF7EF !important;
  stroke: #D9BE8C !important;
  stroke-width: 2px !important;
}

.webchat-host .part-grouping-decorator--from-bot .stacked-layout__main > .stacked-layout__avatar-gutter,
.webchat-host .w6hsPoW_part-grouping-decorator--from-bot .wRAis8G_stacked-layout__main > .wRAis8G_stacked-layout__avatar-gutter {
  width: 50px !important;
  min-width: 50px !important;
  display: flex !important;
  justify-content: top !important;
  align-items: flex-start !important;
}

.webchat-host .part-grouping-decorator--from-bot .stacked-layout__main > .stacked-layout__avatar-gutter::before,
.webchat-host .w6hsPoW_part-grouping-decorator--from-bot .wRAis8G_stacked-layout__main > .wRAis8G_stacked-layout__avatar-gutter::before {
  content: '🌿';
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid rgba(200, 169, 110, 0.45);
  background: linear-gradient(180deg, #3c4150, #323746);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #a6d26d;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  margin-top: 2px;
}

.webchat-host .part-grouping-decorator--from-bot .stacked-layout__status > .stacked-layout__avatar-gutter,
.webchat-host .w6hsPoW_part-grouping-decorator--from-bot .wRAis8G_stacked-layout__status > .wRAis8G_stacked-layout__avatar-gutter {
  width: 0 !important;
  min-width: 0 !important;
}

.webchat-host .part-grouping-decorator--from-bot .stacked-layout__status > .stacked-layout__avatar-gutter::before,
.webchat-host .w6hsPoW_part-grouping-decorator--from-bot .wRAis8G_stacked-layout__status > .wRAis8G_stacked-layout__avatar-gutter::before {
  content: none !important;
}

.webchat-host .part-grouping-decorator--from-bot .copilot-message-header__avatar,
.webchat-host .w6hsPoW_part-grouping-decorator--from-bot [class*='copilot-message-header__avatar'] {
  display: none !important;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(81, 194, 154, 0.45);
  }

  60% {
    box-shadow: 0 0 0 7px rgba(81, 194, 154, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(91, 194, 127, 0);
  }
}

@keyframes shell-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

@media (max-width: 760px) {
  .workspace-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .chat-header {
    padding: 10px 12px;
  }

  .agent-meta h1 {
    font-size: 22px;
  }

  .agent-meta p {
    font-size: 14px;
    max-width: 160px;
  }

  .status-group {
    gap: 10px;
  }

  .status-logo {
    height: 0px;
  }

  .empty-state h2 {
    font-size: 24px;
  }

  .webchat-host .webchat__basic-transcript__transcript {
    padding: 16px 12px 14px !important;
  }

  .webchat-host form.sendbox,
  .webchat-host .webchat__send-box,
  .webchat-host .webchat-fluent .send-box {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .starter-prompts {
    gap: 8px;
  }

  .starter-prompt {
    padding: 9px 12px;
  }
}
