:root {
  --background-color: #f5f5f5;
  --text-color: #242424;
  --icon-margin: 8px;
  --action-icon-margin: 16px;
  --breakpoint-sm: 859px;
}

.store-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  width: 100%;
  background-color: var(--background-color);
  box-sizing: border-box;
  border-radius: 4px;
  margin-bottom: 16px;
}

.store-assistant-header .header-content {
  display: flex;
  align-items: center;
}

.store-assistant-header .chat-icon {
  margin-right: var(--icon-margin);
}

.store-assistant-header .header-title {
  color: var(--text-color);
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 22px;
  margin-bottom: 0px;
}

@media (max-width: var(--breakpoint-sm)) {
  .store-assistant-header {
    height: auto;
  }

  .store-assistant-header .header-title {
    font-size: 0.875rem;
  }
}

@media (forced-colors: active) {
  .store-assistant-header .fui-Button:focus,
  .store-assistant-header .fui-Button:focus-visible,
  .store-assistant-header .fui-Button[data-fui-focus-visible],
  .store-assistant-header .sa-minimize-button:focus,
  .store-assistant-header .sa-minimize-button:focus-visible,
  .store-assistant-header .sa-minimize-button[data-fui-focus-visible],
  .store-assistant-header .sa-close-button:focus,
  .store-assistant-header .sa-close-button:focus-visible,
  .store-assistant-header .sa-close-button[data-fui-focus-visible] {
    outline: 3px solid Highlight !important;
    outline-offset: 2px !important;
    border: 1px solid ButtonText !important;
    forced-color-adjust: auto !important;
  }
}

.end-chat-modal {
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  flex-grow: 1;
  width: 100%;
}

.end-chat-modal .content {
  color: var(--Neutral-Foreground-1-Rest, #242424);
  text-align: center;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  width: 100%;
  max-width: 288px;
  margin-top: auto;
  margin-bottom: auto;
}

.end-chat-modal .actions {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.end-chat-modal .buttonGroup {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.end-chat-modal .button {
  width: 100%;
}

/* Accessibility: Focus indicators for End Chat Modal buttons */
.end-chat-modal .button:focus,
.end-chat-modal .button:focus-visible,
.end-chat-modal .button[data-fui-focus-visible] {
  outline: 2px dashed #000000 !important;
  outline-offset: 2px !important;
}

/* High contrast mode support */
@media (forced-colors: active) {
  .end-chat-modal .button:focus,
  .end-chat-modal .button:focus-visible,
  .end-chat-modal .button[data-fui-focus-visible] {
    outline: 3px solid Highlight !important;
    outline-offset: 2px !important;
    border: 1px solid ButtonText !important;
    forced-color-adjust: auto !important;
  }
}

.end-chat-modal .content p {
  margin-top: 0; 
  margin-bottom: 0; 
}

.active-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #107c10;
  color: white;
  padding: 4px 16px;
  box-sizing: border-box;
  width: 100%;
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.11),
    0px 3px 7px 0px rgba(0, 0, 0, 0.13);
}

.active-message {
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px; 
}

.end-button {
  color: var(--Flowkit-White, #fff);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
  background-color: #107c10; 
  padding: 3px, 8px, 3px, 8px;
  height: 24px;
  min-width: 36px;
  box-sizing: border-box;
  stroke: #fff;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid white;
}

.ctaSurvey-button {
  width: 100%;
  margin-bottom: 8px !important;
}

.ctaSurvey-button:last-child {
  margin-bottom: 0 !important;
}

.ctaSurvey-text {
  color: #242424;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  margin-bottom: 8px;
}

.ctaSurvey-container {
  display: flex;
  flex-direction: column;
  padding: 16px;
  box-sizing: border-box;
  padding: 12px 16px 12px 16px !important;
  margin: 2px;
}

.chatLimitation-button {
  width: 100%;
  margin-bottom: 0 !important;
}

.chatLimitation-text {
  color: #242424;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  margin-bottom: 8px;
  width: 100%;
}

.chatLimitation-container {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin: 2px;
  padding: 12px 16px 12px 16px !important;
}

.sidecar-chat {
  max-height: 100%;
  overflow-y: auto;
  height: 550px;
  flex: 1;
  padding-bottom: 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sidecar-chat::-webkit-scrollbar {
  width: 4px;
}

.sidecar-chat::-webkit-scrollbar-track {
  background-color: #ebebeb;
}

.sidecar-chat::-webkit-scrollbar-thumb {
  background-color: #424242;
  border-radius: 4px;
}

.sidecar-chat::-webkit-scrollbar-thumb:hover {
  background-color: #242424;
}

.sidecar-chat .chat-markdown {
  user-select: text;
}

.sidecar-chat > [data-sa-chat-message="true"] {
  box-sizing: border-box;
  border: 2px dotted transparent;
  border-radius: 4px;
}

.sidecar-chat > [data-sa-chat-message="true"]:focus,
.sidecar-chat > [data-sa-chat-message="true"]:focus-visible {
  outline: none;
  border-color: #000000;
}

@media (forced-colors: active) {
  .sidecar-chat > [data-sa-chat-message="true"]:focus,
  .sidecar-chat > [data-sa-chat-message="true"]:focus-visible {
    border: 3px solid Highlight;
    forced-color-adjust: auto;
  }
}

/* Define CSS variables for colors, spacing, dimensions, etc. */
:root {
  --color-neutral-background3: #f5f5f5;
  --spacing-horizontal-l: 16px;
  --spacing-vertical-s: 8px;
  --spacing-vertical-top: 10px;
  --border-radius-medium: 4px;
  --header-height: 64px;
  --provider-width: 320px;
  --provider-height: 720px;
  --provider-desktop-right: 12px;
  --provider-desktop-bottom: 12px;
  --provider-backtotop-bottom: 64px;
  --provider-desktop-bottom-s: 10px;
}

/* Prevent body scroll when chat is open */
body.chat-open {
  overflow: hidden;
}

/* Root container for the store assistant */
.storeassistantroot {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: auto;
}

/* Styles for the provider container */
.provider {
  background-color: var(--color-neutral-background3);
  padding: var(--spacing-horizontal-l);
  border-radius: var(--border-radius-medium);
  border: var(--None, 1px) solid var(--Neutral-Stroke-2-Rest, #E0E0E0);
  box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.11), 0px 6px 14px 0px rgba(0, 0, 0, 0.13);
  display: flex;
  row-gap: 12px;
  flex-direction: column;
  /* --available-vh is set by JS (useAvailableViewportHeight hook) to account for
     CSS zoom or DPI-scaling that 100vh doesn't reflect.  Falls back to 100vh
     when JS hasn't run yet. */
  height: min(var(--provider-height), calc(var(--available-vh, 100vh) - var(--spacing-vertical-top) - var(--provider-desktop-bottom)));
  width: var(--provider-width);
  box-sizing: border-box;
  transition: opacity 0.5s linear, height 0.3s ease, max-height 0.3s ease;
  z-index: 9999;
  position: fixed;
  right: var(--provider-desktop-right);
  bottom: var(--provider-desktop-bottom);
}

/* Hidden state for the provider */
.provider.is-hidden {
  visibility: hidden;
  opacity: 0;
  height: 0;
  transition: opacity 0.5s linear, visibility 0.1s 0.5s, height 0.1s 0.5s;
}

/* Minimized state for the provider */
.provider--minimized {
  bottom: 12px;
  overflow: hidden;
  max-height: 64px;
  height: min(var(--header-height), calc(var(--available-vh, 100vh) - var(--spacing-vertical-top)))!important;
}

/* Chat container styles */
.chat {
  height: 550px;
  overflow-y: auto;
}

/* Hiding the scrollbar for Webkit browsers like Chrome and Safari */
.chat::-webkit-scrollbar {
  display: none;
}

/* Hiding the scrollbar for Firefox */
.chat {
  scrollbar-width: none;
}

/* Adjustments when back-to-top button is present */
.has-back-to-top .provider--minimized {
  bottom: 64px;
}

.has-back-to-top .provider {
  bottom: 12px;
  height: min(var(--provider-height), calc(var(--available-vh, 100vh) - var(--spacing-vertical-top) - var(--provider-backtotop-bottom))); 
}

/* Responsive adjustments for smaller screens */
@media (max-width: 859px) {
  .provider {
    height: 100%;
    max-height: var(--available-vh, 100vh);
    width: 100%;
    overflow: hidden;
    right: 0;
    bottom: 0;
  }
  .provider--minimized {
    width: 100%;
  }
}

/* Responsive adjustments for medium screens */
@media (min-width: 541px) {
  .has-back-to-top.is-mobile .provider--minimized {
    width: min(calc(100% - 12px), 140px);
    right: 12px;
    bottom: 64px;
  }
  .has-back-to-top.is-mobile .provider--minimized .store-assistant-header .header-title {
    display: none;
  }
  .has-back-to-top.is-mobile .provider--minimized .store-assistant-header svg.chat-icon {
    height: 32px;
    width: 32px;
  }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 539px) {
  .has-configurator-v3 .provider--minimized {
    width: min(calc(100% - 12px), 140px);
    right: 12px;
    bottom: 73px;
  }
  .has-configurator-v3 .provider--minimized .store-assistant-header .header-title {
    display: none;
  }
  .has-configurator-v3 .provider--minimized .store-assistant-header svg.chat-icon {
    height: 32px;
    width: 32px;
  }
}

/* Full height chat container */
.chat {
  height: var(--available-vh, 100vh);
  -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
}

/* Hide scrollbar for Webkit browsers like Chrome and Safari */
.chat::-webkit-scrollbar {
  display: none;
}

/* Overrides to MWF styles */
.provider span:focus:not(.button-compose *),
.provider button:focus:not(.button-compose *) {
    outline: none;
}

/* Responsive adjustments for smaller screens, makes the store assistant chat at the bottom of the page for smaller screens */
@media (max-width: 860px) {
  .provider {
      bottom: 0 !important;
  }
}

.copilot-container a {
  color: #0067b8; 
  text-decoration: none;
}

.copilot-container a:hover {
  text-decoration: underline;
}

/* Accessibility: restore visible keyboard focus for chat send button. */
.copilot-container .fai-ChatInput__send:focus,
.copilot-container .fai-ChatInput__send:focus-visible,
.copilot-container .fai-ChatInput__send[data-fui-focus-visible],
.copilot-container [data-fluent-copilot-chat-input-send-button]:focus,
.copilot-container [data-fluent-copilot-chat-input-send-button]:focus-visible,
.copilot-container [data-fluent-copilot-chat-input-send-button][data-fui-focus-visible] {
  outline: 2px dashed #000000 !important;
  outline-offset: 2px !important;
}

@media (forced-colors: active) {
  .copilot-container .fai-ChatInput__send:focus,
  .copilot-container .fai-ChatInput__send:focus-visible,
  .copilot-container .fai-ChatInput__send[data-fui-focus-visible],
  .copilot-container [data-fluent-copilot-chat-input-send-button]:focus,
  .copilot-container [data-fluent-copilot-chat-input-send-button]:focus-visible,
  .copilot-container [data-fluent-copilot-chat-input-send-button][data-fui-focus-visible] {
    outline: 3px solid Highlight !important;
    outline-offset: 2px !important;
    border: 1px solid ButtonText !important;
    forced-color-adjust: auto !important;
  }
}

/* iOS Safari auto-zooms inputs with font-size < 16px.
   Use 16px on touch devices to prevent zoom. */
@supports (-webkit-touch-callout: none) {
  .copilot-container .fai-ChatInput__editor,
  .copilot-container .fai-EditorInput,
  .copilot-container [data-fluent-copilot-chat-input-editor] {
    font-size: 16px !important;
  }
}
.chat-markdown {
    margin: 0;
    padding: 0;
}

.chat-markdown table {
    border-collapse: collapse;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    display: block;
    font-size: 0.8em;
}

@media (max-width: 859px) {
    .chat-markdown table {
        font-size: 0.8em;
    }
}

.chat-markdown th,
.chat-markdown td {
    padding: 0.125rem;
    border: 1px solid black;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-markdown ul,
.chat-markdown ol {
    padding-left: 1em;
    margin: 0.25em 0;
    list-style: disc outside none;
}

.chat-markdown ol {
    list-style: decimal outside none;
}

.chat-markdown ul li,
.chat-markdown ol li {
    padding-left: 0.25em;
    margin: 0.25em 0;
}

.chat-markdown p:not(:last-child) {
    margin-bottom: 0.75em;
    margin-top: 0px;
    padding: 0px;
}

.chat-markdown p:last-child {
    margin: 0;
}

.chat-markdown h1,
.chat-markdown h2,
.chat-markdown h3,
.chat-markdown h4 {
    margin: 0.5em 0;
    font-weight: bold;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    border: 0;
}
/* Xbox Client Styles - Legacy Design */
.sa-default-entry-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  height: 56px;
  border-radius: 28px;
  background: linear-gradient(275.43deg, #0067B8 14.09%, #0067B8 46.66%, #1C84D6 84.29%);
  color: #FFFFFF;
  font-weight: 400;
  font-size: 14px;
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 1001;
  transition: bottom 0.3s ease-out; /* Smooth transition for bottom property */
}
/* When back-to-top button is not visible, apply the default position */
.sa-default-entry-container.no-back-to-top {
  bottom: 12px;
}

.chat-button--with-back-to-top {
  bottom: 54px;
}

.chat-button--no-back-to-top {
  bottom: 12px;
}

/* Back to Top Button Visibility */
.fixed-back-to-top.stuck {
  /* Add any specific styles for the back-to-top button when it's stuck */
  z-index: 1000;
  position: fixed;
  right: 12px;
  bottom: 12px;
}

/* Smooth transition for the back-to-top button */
.fixed-back-to-top {
  transition: opacity 1s cubic-bezier(.19,1,.22,1) !important;
}

.is-mobile .sa-default-entry-container {
  width: 56px;
  justify-content: center;
}
.sa-default-entry-container:focus-within {
  text-decoration: underline;
}

@media screen and (min-width: 540px) {
  .fixed-sticky.fixed-back-to-top.pageHasChatContainer {
      bottom: 60px !important;
  }
}
@media (max-width: 539px) {
  .has-configurator-v3 .sa-default-entry-container {
    bottom: 73px;
  }
}
.sa-default-entry-glyph {
  padding: 0!important;
  font-size: 28px;
  display: flex;
  flex-direction: column;
}
.sa-default-entry-text {
  margin-left: 20px;
}
.sa-default-entry-text>* {
  margin: 0;
}
.sa-default-entry-image {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  margin-right: 4px;
}
.sa-default-entry-button {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  border-radius: 28px;
}

/* Highlight Entry Point */
.sa-highlight-entry-content {
  border-radius: 8px;
  padding: 16px;
  max-width: 300px;
  background-color: #000000;
  color: #FFFFFF;
  position: fixed;
  right: 75px;
  bottom: 56px;
  z-index: 1001;
}
.is-mobile .sa-highlight-entry-content {
  right: 12px;
  bottom: 12px;
}
@media (min-width: 541px) {
  .has-back-to-top.is-mobile .sa-highlight-entry-content {
    bottom: 64px;
  }
  .has-back-to-top .sa-highlight-entry-image {
    bottom: 12px;
  }
}
@media (max-width: 539px) {
  .has-configurator-v3 .sa-highlight-entry-content {
    bottom: 119px;
  }
  .has-configurator-v3.is-mobile .sa-highlight-entry-content {
    bottom: 73px;
  }
  .has-configurator-v3 .sa-highlight-entry-image {
    bottom: 73px;
  }
}
.sa-highlight-entry-header {
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  margin-bottom: 2px;
  margin-top: 0px;
}
.sa-highlight-entry-subheader {
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  margin-bottom: 12px;
}
.sa-highlight-entry-chat-now-button, .sa-highlight-entry-no-thanks-button {
  border: 0px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 20px;
  padding: 5px;
}
.sa-highlight-entry-no-thanks-button {
  border-radius: 4px;
  background-color: #FFFFFF;
  color: #292929!important;
  margin-top: 10px;
}
.sa-highlight-entry-image {
  width: 72px;
  height: 72px;
  border-radius: 36px;
  border: 1px solid #0067B8;
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 1001;
}

/* Animation */
.sa-default-entry-container,
.sa-highlight-entry-container .sa-highlight-entry-content,
.sa-highlight-entry-container .sa-highlight-entry-image {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 0.5s, transform 0.5s linear;
}
.sa-default-entry-container.is-hidden,
.sa-highlight-entry-container.is-hidden .sa-highlight-entry-content,
.sa-highlight-entry-container.is-hidden .sa-highlight-entry-image {
  opacity: 0;
  visibility: hidden;
  transform: translateX(100%);
  transition: opacity 0.5s, transform 0.5s, visibility 0.5s linear;
}

.sa-highlight-entry-no-thanks-button {
  background-color: #fff !important;
  color: #292929 !important;
  margin-top: 10px;
}

.sa-highlight-entry-chat-now-button {
  background-color: #0067b8 !important;
  color: #fff !important;
}

.sa-highlight-entry-chat-now-button, .sa-highlight-entry-no-thanks-button {
  border: 0 !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  line-height: 20px !important;
  padding: 5px !important;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.sa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4375em;
  font-weight: 600;
  border: .125rem solid transparent;
  position: relative;
  border-radius: .125rem;
  background-color: #0067b8;
  color: #fff;
  text-decoration: none;
  padding: .625rem .75rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

/* Font-based icon removed - now using React icon component (ChatIcon) */

.sa-default-entry-text.d-none {
    display: none !important;
}

.sa-highlight-entry-container.is-hidden { 
  display: none; 
}

/* HTML dir style for chat icon and chat window */
html[dir="rtl"] .dir-rtl { left: 12px !important; right: auto !important}
