@use 'ej2-base/styles/common/mixin' as *;
@include export-module('e-aiassistview-theme') {
  .e-aiassistview {
    border-color: $assist-view-border-color;
    background-color: $assist-view-bg-color;
    .e-view-content {
      color: $response-text-color;
    }
    .e-view-header {
      border-bottom-color: $assist-view-border-color;
      .e-toolbar-item::after {
        background-color: transparent;
      }
      .e-toolbar,
      .e-toolbar-items,
      .e-tbar-btn {
        background: $assist-view-bg-color;
      }
      .e-toolbar-item:not(.e-custom-view-header),
      .e-toolbar-item:not(.e-assist-view-header) {
        .e-tbar-btn {
          &:focus {
            @if ($skin-name == 'fluent2' or $skin-name == 'tailwind3') {
              box-shadow: none;
            }
            &:not(:focus-visible) {
              .e-icons {
                @if ($skin-name == 'fluent2') {
                  color: $toolbar-icon-color;
                }
                @if ($skin-name == 'tailwind3') {
                  color: $secondary-text-color-hover;
                }
              }
            }
          }
          &:focus-visible {
            @if ($skin-name == 'fluent2' or $skin-name == 'tailwind3') {
              background: $content-bg-color-alt1;
            }
            @if ($skin-name == 'fluent2') {
              box-shadow: $keyboard-focus;
            }
            @if ($skin-name == 'tailwind3') {
              box-shadow: $shadow-focus-ring2;
            }
          }
        }
      }
      .e-toolbar-item.e-active::after {
        background-color: $assist-header-border-bottom-color;
      }
      .e-toolbar-item.e-custom-view-header,
      .e-toolbar-item.e-assist-view-header {
        .e-btn:active,
        .e-btn:hover,
        .e-btn:focus {
          background: transparent;
          border-color: transparent;
        }
        .e-tbar-btn {
          background: transparent;
          &:focus {
            box-shadow: none;
          }
          &:focus-visible {
            box-shadow: $tbar-header-btn-focus-box-shadow;
            @if ($skin-name == 'material' or $skin-name == 'material-dark' or $skin-name == 'fabric' or $skin-name == 'fabric-dark' or $skin-name == 'bootstrap' or $skin-name == 'bootstrap-dark') {
              background: $tbar-header-hover-bg-color;
            }
          }
        }
      }
    }
    .e-suggestion-header {
      color: $suggesstions-header-color;
    }
    .e-suggestions {
      li {
        color: $suggested-content-text-color;
        box-shadow: $suggestion-li-box-shadow;
        @if ($skin-name == 'bootstrap5.3') {
          border: $suggestion-li-border;
        }
        @else {
          border: $suggestion-li-border solid $suggestion-li-border-color;
        }
      }
    }
    .e-prompt-icon,
    .e-output-icon {
      border: $prompt-output-icon-border solid $icon-border-color;
      color: $user-logo-color;
      @if ($skin-name == 'Material3' or $skin-name == 'Material3-dark') {
        background: $user-logo-bg-color;
      }
      @else {
        background-color: $user-logo-bg-color;
      }
    }
    .e-prompt-text {
      background: $suggested-content-bg-color;
      color: $suggested-content-text-color;
      @if ($skin-name == 'bootstrap5.3') {
        border: $prompt-text-border;
      }
      @else {
        border: $prompt-text-border solid $prompt-text-border-color;
      }
    }
    .e-views {
      .e-content-body {
        color: $response-text-color;
        a {
          @if $theme-name == 'tailwind' or $theme-name == 'Material3' or $theme-name == 'material' or $theme-name == 'fluent2' or $theme-name == 'FluentUI' or $theme-name == 'fabric' or $theme-name == 'bootstrap5' or $theme-name == 'bootstrap4' or $theme-name == 'bootstrap' or $theme-name == 'bootstrap5.3' {
            color: rgba(10, 83, 172, 1);
          }
          @if $theme-name == 'tailwind-dark' or $theme-name == 'Material3-dark' or $theme-name == 'material-dark' or $theme-name == 'fluentui-dark' or $theme-name == 'fabric-dark' or $theme-name == 'bootstrap-dark' or $theme-name == 'highcontrast' or $theme-name == 'bootstrap5.3-dark' or $theme-name == 'fluent2-dark' or $theme-name == 'fluent2-highcontrast' {
            color: rgba(124, 180, 249, 1);
          }
        }
        pre {
          background: $suggested-content-bg-color;
          code {
            color: $response-text-color;
            background: transparent;
          }
          span.e-code-copy {
            color: $response-text-color;
          }
        }
        tbody,
        td,
        tfoot,
        th,
        thead,
        tr {
          border: $assist-view-border solid $assist-view-border-color;
        }
        blockquote {
          border-left: $assist-blockquote-border solid $suggested-content-bg-color;
        }
        img,
        svg {
          background-color: $suggested-content-bg-color;
        }
      }
      .e-content-body code:not(pre code) {
        @if $theme-name == 'tailwind' or $theme-name == 'Material3' or $theme-name == 'material' or $theme-name == 'fluent2' or $theme-name == 'FluentUI' or $theme-name == 'fabric' or $theme-name == 'bootstrap5' or $theme-name == 'bootstrap4' or $theme-name == 'bootstrap' or $theme-name == 'bootstrap5.3' {
          background: rgba(255, 241, 241, 1);
          color: rgba(134, 18, 18, 1);
        }
        @if $theme-name == 'tailwind-dark' or $theme-name == 'Material3-dark' or $theme-name == 'material-dark' or $theme-name == 'fluentui-dark' or $theme-name == 'fabric-dark' or $theme-name == 'bootstrap-dark' or $theme-name == 'highcontrast' or $theme-name == 'bootstrap5.3-dark' or $theme-name == 'fluent2-dark' or $theme-name == 'fluent2-highcontrast' {
          background: rgba(74, 44, 44, 1);
          color: rgba(255, 212, 212, 1);
        }
      }
    }
    .e-footer {
      .e-assist-stop.e-icons {
        border-color: $response-stopper-border-color;
        color: $response-stopper-item-color;
        background-color: $response-stopper-bg-color;
        @if ($theme-name == 'fluent2-highcontrast') {
          color: rgba(27, 26, 25, 1);
        }
      }
    }
    .e-views,
    .e-custom-view,
    .e-assistview-content-section {
      &::-webkit-scrollbar-thumb {
        background: $scrollbar-color;
      }
    }
    .e-footer {
      .e-assist-textarea::-webkit-scrollbar-thumb {
        background: $scrollbar-color;
      }
      @if ($skin-name == 'Material3' or $skin-name == 'fluent2' or $skin-name == 'material' or $skin-name == 'material-dark') {
        &.e-footer-focus-wave-effect::before,
        &.e-footer-focus-wave-effect::after {
          background-color: $assist-footer-wave-color;
        }
      }
      .e-assist-textarea[placeholder]:empty::before {
        color: $assist-placeholder-color;
      }
      &:not(.e-footer-template) {
        border: $assist-footer-border solid $assist-footer-border-color;
        border-bottom-color: $assist-footer-border-btm-color;
        &.e-footer-focused {
          border: $assist-focused-border-width solid $assist-footer-focus-bdr-color;
          @if ($skin-name == 'fluent2') {
            border-bottom-color: $assist-footer-border-btm-color;
          }
          box-shadow: $assist-footer-border-shadow;
        }
        .e-assist-send,
        .e-assist-clear-icon:not(.e-assist-clear-icon-hide) {
          color: $send-icon-color;
          &.disabled {
            color: $send-icon-disabled-color;
          }
        }
      }
      .e-footer-icons-wrapper {
        .e-toolbar-item::after {
          background-color: transparent;
        }
        .e-toolbar,
        .e-toolbar-items,
        .e-tbar-btn {
          background: transparent;
          border: none;
          box-shadow: none;
        }
        .e-toolbar .e-toolbar-item {
          .e-tbar-btn {
            &:focus {
              box-shadow: none;
            }
            &:hover:not(:focus-visible),
            &:active {
              background: transparent;
              box-shadow: none;
              .e-icons {
                color: $send-icon-color;
              }
              .e-icons.disabled {
                color: $send-icon-disabled-color;
              }
              .e-assist-stop {
                color: $response-stopper-item-color;
                @if ($theme-name == 'fluent2-highcontrast') {
                  color: rgba(27, 26, 25, 1);
                }
              }
            }
            &:focus:not(:focus-visible) {
              outline: none;
              box-shadow: none;
              background: transparent;
            }
          }
        }
      }
    }
    .e-view-header {
      .e-toolbar {
        .e-assist-view-header,
        .e-custom-view-header {
          &.e-toolbar-item .e-tbar-btn:hover:active .e-icons,
          &.e-toolbar-item .e-tbar-btn:hover .e-icons,
          &.e-toolbar-item .e-tbar-btn:hover .e-tbar-btn-text,
          &.e-toolbar-item .e-tbar-btn:hover:active .e-tbar-btn-text {
            color: $header-text-color;
          }
        }
      }
    }
    .e-view-header {
      .e-toolbar .e-toolbar-item.e-active .e-tbar-btn:hover:active .e-icons,
      .e-toolbar .e-toolbar-item.e-active .e-tbar-btn:hover .e-icons,
      .e-toolbar .e-toolbar-item.e-active .e-tbar-btn:hover .e-tbar-btn-text,
      .e-toolbar .e-toolbar-item.e-active .e-tbar-btn:hover:active .e-tbar-btn-text,
      .e-toolbar .e-toolbar-item.e-active .e-tbar-btn .e-icons,
      .e-toolbar .e-toolbar-item.e-active .e-tbar-btn .e-tbar-btn-text {
        color: $header-active-text-color;
      }
    }
    &.e-rtl {
      .e-views {
        .e-content-body {
          blockquote {
            border-right: $suggested-content-border solid $suggested-content-bg-color;
          }
        }
      }
    }

    .e-view-content {
      .e-upload-failure-alert {
        background-color: $file-failure-bg-color;
        border: $file-failure-border;
        .e-failure-message {
          color: $file-failure-font-color;
        }
        .e-assist-circle-close {
          color: $file-failure-circle-close-icon-color;
        }
      }
    }
    
    .e-prompt-content .e-prompt-uploaded-files:has(.e-assist-uploaded-file-item) {
      background-color: $prompt-uploded-file-bg-color;
    }

    .e-footer .e-assist-drop-area,
    .e-prompt-content .e-prompt-uploaded-files {
      .e-assist-uploaded-file-item {
        border: $attached-file-border solid $attached-file-border-color;
        background-color: $attached-file-bg-color;
      }

      .e-assist-file-format-icon {
        color: $assist-file-document-icon-color;
      }

      .e-assist-file-size {
        color: $attached-file-size-color;
      }
    }

    .e-footer .e-assist-drop-area {
      .e-assist-progress-bar {
        background-color: $file-progress-bar-bg-color;
      }
      .e-assist-progress-fill {
        background-color: $file-progress-bar-success-color;
      }
      .e-assist-progress-fill.e-assist-upload-failed {
        background-color: $file-progress-bar-failure-color;
      }
    }
  }
  .e-prompt-toolbar,
  .e-content-footer {
    .e-toolbar,
    .e-toolbar .e-toolbar-items,
    .e-tbar-btn:not(:hover),
    .e-tbar-btn:not(:active),
    .e-tbar-btn:not(:focus) {
      background: $assist-view-bg-color;
    }
    .e-toolbar {
      box-shadow: unset;
      border: $assist-view-toolbar-border;
    }
  }
  .e-aiassist-view-toolbar-item .e-tbar-btn:not(:hover),
  .e-aiassist-view-toolbar-item .e-tbar-btn:not(:active),
  .e-aiassist-view-toolbar-item .e-tbar-btn:not(:focus) {
    background: transparent;
  }
}
