/* Chat AI related CSS */

/* change the --lccChat-primary-colour to match the council's brand */
:root {
  --lccChat-primary-colour: rgb(25, 41, 135);
}

:root {
  --lccChat-BASE-max-height: calc(100vh - 10rem);
  --lccChat-BASE-min-height: max(150px, calc(min(256px, 100vh) - var(--lccChat-BASE-bottom-position)));
  --lccChat-BASE-max-width: calc(100vw - var(--lccChat-BASE-right-position));
  --lccChat-BASE-box-shadow: 1px 0 4px hsla(0, 0%, 9%, .3);
  --lccChat-BASE-bottom-position: 4rem;
  --lccChat-BASE-right-position: 1rem;
  --lccChat-BASE-top-position: auto - var(--lccChat-BASE-bottom-position);
  --lccChat-BASE-left-position: auto - var(--lccChat-BASE-right-position);
  --lccChat-BASE-height: calc(100%);
  --lccChat-BASE-z-index: 99999;
  --lccChat-BASE-width: min(375px, var(--lccChat-BASE-max-width));
  --lccChat-primary-hover-colour: rgb(6, 78, 59);
  --lccChat-secondary-colour: #f3f4f6;
  --lccChat-light-colour: hsl(220, 14%, 96%);
  --lccChat-dark-colour: #000;
  --lccChat-text-dark-colour: hsl(222, 47%, 11%);
  --lccChat-text-light-colour: #fff;
  --lccChat-border-light-colour: var(--lccChat-secondary-colour);
  --lccChat-border-dark-colour: var(--lccChat-primary-colour);
}

.lcc-chatbot--icon {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 0px;
  right: 40px;
  background-color: #6875f5;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  box-shadow: 2px 2px 3px #6875f5;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
}

/* #webchat-wrapper {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-color: var(--lccChat-border-light-colour);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,.2);
  bottom: var(--lccChat-BASE-bottom-position);
  display: flex;
  flex-direction: column;
  height: var(--lccChat-BASE-height);
  max-height: var(--lccChat-BASE-max-height);
  min-height: var(--lccChat-BASE-min-height);
  position: fixed;
  top: var(--lccChat-BASE-top-position);
  left: var(--lccChat-BASE-left-position);
  right: var(--lccChat-BASE-right-position);
  width: var(--lccChat-BASE-width);
} */
#webchat {
  height: 100%;
  width: 100%;
}

dialog#webchat-wrapper {
  @apply max-w-full max-h-full md:max-w-[calc(100%-2em-6px)] md:max-h-[calc(100%-2em-6px)];
}

#webchat .webchat__send-box__main {
  overflow: hidden;
  border-radius: 15px;
  display: flex;
  border: 2px solid rgba(6, 132, 27, 1);
}

#webchat .webchat__send-box__button {
  background-color: var(--lccChat-primary-colour);
  fill: var(--lccChat-text-light-colour);
  border-radius: 25px;
  height: 5px;
  margin: 5px;
}

#webchat .webchat__send-box__button:hover {
  background-color: var(--lccChat-light-colour);
  fill: var(--lccChat-text-dark-colour);
  border: 1px solid var(--lccChat-primary-colour);
  border-radius: 25px;
}

#webchat .webchat__send-box-text-box {
  padding: 6px;
  padding-left: 10px;
  border: none !important;
  outline: none !important;
  background: transparent !important;
}

#webchat .webchat__send-box-text-box__input:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

#webchat a {
  display: inline-flex;
  align-items: center;
  justify-items: center;
}

#webchat a img {
  margin-top: 0;
  margin-bottom: 0;
}

#webchat .webchat__bubble:not(.webchat__bubble--from-user) {
  width: 100%;
}

#webchat .webchat__bubble:not(.webchat__bubble--from-user) .webchat__bubble__content {
  color: var(--lccChat-text-dark-colour);
  background-color: var(--lccChat-light-colour);
  border-radius: .5rem;
  border-style: solid;
  border-width: 1px;
  position: relative;
}

#webchat .webchat__bubble.webchat__bubble--from-user .webchat__bubble__content {
  background-color: var(--lccChat-primary-colour);
  color: var(--lccChat-text-light-colour);
  border-radius: .5rem;
  border-style: solid;
  border-width: 1px;
  position: relative;
}

#webchat .webchat__imageAvatar__image img {
  margin: 0;
}

#webchat-nav-icons {
  gap: 0.4rem;
}

.chat-bg-primary {
  background-color: var(--lccChat-primary-colour);
}

.chat-bg-secondary {
  background-color: var(--lccChat-secondary-colour);
  color: var(--lccChat-primary-colour);
}

.chat-bg-primary:hover,
.chat-bg-primary:active {
  background-color: var(--lccChat-secondary-colour);
  color: var(--lccChat-primary-colour);
}

.chat-border-primary {
  border-color: var(--lccChat-primary-colour);
}

.chat-border-primary:hover {
  border-color: var(--lccChat-primary-hover-colour);
}

.chat-border-secondary {
  border-color: var(--lccChat-border-light-colour);
}

.chat-border-secondary:hover,
.chat-border-secondary:active {
  border-color: var(--lccChat-border-dark-colour);
}

.chat-text-primary {
  color: var(--lccChat-primary-colour);
}

.chat-text-primary-link {
  color: var(--lccChat-primary-hover-colour);
}

/* Webchat Nav Icon Tooltip */
#webchat-close,
#webchat-regenerate {
  position: relative;
  cursor: pointer;
  background-color: var(--lccChat-secondary-colour);
  color: rgba(6, 132, 27, 1);
  margin: 0%;
  border-radius: 25px;
  border: 2px solid transparent;
  outline: none;
  box-shadow: none;
}

#webchat-close:focus,
#webchat-regenerate:focus,
#webchat-close:focus-visible,
#webchat-regenerate:focus-visible {
  box-shadow: none !important;
  outline: none !important;
  border-color: black;
}

#webchat-close:hover,
#webchat-regenerate:hover {
  position: relative;
  cursor: pointer;
  background-color: white;
  color: black;
  border-color: black;
}

#webchat-close .tooltip-text,
#webchat-regenerate .tooltip-text {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 8px;
  position: absolute;
  top: 130%;
  left: 20%;
  transform: translateX(-50%);
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.3s ease;
  font-size: 12px;
  z-index: 9999 !important;
  font-family: "Sari-Medium";
  font-weight: 400;
}

#webchat-close:hover .tooltip-text,
#webchat-regenerate:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

#webchat-close .tooltip-text::after,
#webchat-regenerate .tooltip-text::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

#webchat .webchat__adaptive-card-renderer .ac-pushButton {
  border-style: solid;
  border-width: 1px;
  color: white;
  background-color: rgba(6, 132, 27, 1);
  margin-top: 20px;
  font-size: 15px;
  width: 100%;
}

#webchat .webchat__adaptive-card-renderer .ac-pushButton:hover {
  border-style: solid;
  border-width: 1px;
  color: rgba(6, 132, 27, 1);
  background-color: white;
  margin-top: 20px;
  font-size: 15px;
  width: 100%;
  border: 1px solid black;
}

.warning {
  position: absolute;
  top: 45px;
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  border-left: 6px solid #f0ad4e;
  padding: 16px 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  z-index: 2;
  gap: 14px;
}

.warning-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-top: 2px;
}

.warning-message {
  flex: 1;
}

.warning-message p {
  margin: 0;
}

.warning-message p+p {
  margin-top: 4px;
}

#close-btn {
  border: none;
  margin: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
  display: flex;
  justify-content: center;
}

#close-btn:hover {
  background-color: #8564041f;
}

#close-btn:focus-visible {
  outline: 2px solid #856404;
  outline-offset: 2px;
}

.textarea-warning {
  color: #e00000;
  margin: 0 15px;
  margin-top: 10px;
  font-size: 12px;
}

.ac-textRun{
  margin-bottom: 20px !important;
  font-size: 16px !important;
  color: #000 !important;
}

.ac-textRun[aria-hidden="true"] {
  color: red !important;
}

.ac-textInput {
  height: 100px;
}

/* Session Timeout Banner */

#chat-timeout-banner {
  background-color: #ffffff;
  color: #000;
  font-weight: bold;
  text-align: center;
  padding: 1rem;
  border-bottom: 1px solid #080808;
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  z-index: 999;
}

#chat-timeout-banner p {
  margin: 0;
  font-size: 14px;
}

#chat-timeout-banner button {
  margin-top: 10px;
  background-color: rgba(6, 132, 27, 1);
  color: white;
  border: none;
  padding: 5px 10px;
  margin-left: 8px;
  border-radius: 4px;
  cursor: pointer;
}

#chat-timeout-banner button:hover {
  background-color: rgb(255, 255, 255);
  color: rgba(6, 132, 27, 1);
  border: none;
  padding: 5px 10px;
  margin-left: 8px;
  border: 1px solid black;
  border-radius: 4px;
  cursor: pointer;
}

/* Chat Restart Banner */
/* Session Timeout Banner */

#chat-restart-confirm {
  background-color: #ffffff;
  color: #000;
  font-weight: bold;
  text-align: center;
  padding: 0.5rem;
  border-bottom: 1px solid #080808;
  position: absolute;
  top: 45px;
  left: 0;
  right: 0;
  z-index: 999;
}

#chat-restart-confirm p {
  margin: 0;
  font-size: 18px;
  font-family: "Sari-Medium";
  font-weight: 600;
}

#chat-restart-confirm button {
  margin-top: 10px;
  background-color: rgba(6, 132, 27, 1);
  color: white;
  border: none;
  margin-left: 8px;
  border-radius: 4px;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  font-family: "Sari-Medium";
  font-weight: 400;
  border: 2px solid transparent;
  border-radius: 5px;
}

#chat-restart-confirm button:hover {
  background-color: rgb(255, 255, 255);
  color: rgba(6, 132, 27, 1);
  margin-left: 8px;
  /* border: 1px solid black;
  border-radius: 4px; */
  border-color: black;
  cursor: pointer;
  justify-content: center;
  align-items: center;
}

/* Reaction buttons container */

.reaction-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding-top: 4px;
  font-size: 0.9rem;
  color: #444;
  margin-right: 10px;
  justify-content: flex-end;
}
.reaction-container span {
  font-family: Calibri,
    Helvetica Neue,
    Arial,
    sans-serif;
  font-size: 16px;
  margin-left: 10px;
}

.reaction-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.2s ease;
}

.reaction-btn:hover {
  background: white;
  color:rgba(6, 132, 27, 1);
  transform: scale(1.2);
  opacity: 0.9;
}

.reaction-btn.selected{
  transform: scale(1.25);
  background-color: rgba(0,0,0,0.05);
}

.reaction-btn .label-text {
  margin-left: 3px;
  font-size: 0.9rem;
  color: #444;
  transition: opacity 0.2s ease;
  font-family: "Sari-Medium";
  font-weight: 400;
}

.reaction-btn.selected .label-text {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.05);
}

.reaction-btn:hover .label-text {
  opacity: 1;
}

.reaction-icon-label {
  display: flex;
  align-items: center;
  gap: 6px;
}
/* Restart Chat Disabled */
#webchat-regenerate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#webchat-regenerate:disabled .tooltip-text {
  display: none;
  pointer-events: none;
}


#webchat .webchat__icon-button__shade{
  background-color: transparent;
}

#webchat .webchat__icon-button__keyboard-focus-indicator{
  border: none !important;
}

#webchatHead {
  font-size: 18px;
  font-weight: 600;
  font-family: 'Sari-Medium';
}

#webchat .webchat__send-box-text-box__input::placeholder {
  font-family: "Sari-Medium";
  font-weight: 400;
  font-size: 14px;
}

#webchat-open::before {
  content: "";
  position: absolute;
  bottom: -23px;
  left: 23px;
  width: 24px;
  height: 22px;
  /* border-width: 22px 1px 0 23px;
  border-style: solid;
  border-color: #ffffff transparent; */
  background: #ffffff;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

#webchat-open:after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 25px;
  width: 20px;
  height: 21px;
  /* border-width: 20px 0 0 20px;
  border-style: solid;
  border-color: var(--lccChat-primary-colour) transparent; */
  background: var(--lccChat-primary-colour);
  clip-path: polygon(0 0, 100% 0, 100% 100%); /* last one at 95? */
}

#webchat-open:hover::before {
  /* border-color: var(--lccChat-border-dark-colour) transparent; */
  background: var(--lccChat-border-dark-colour);
}

#webchat-open:hover::after {
  /* border-color: var(--lccChat-secondary-colour) transparent; */
  background: var(--lccChat-secondary-colour);
}

#webchat li::marker{
  color: currentColor;
}

#webchat li:has(a) {
  list-style-type: none;
  padding-left: 0;
  margin-left: 0;
}

#webchat ul:has(li a) {
  padding-left: 0;
  margin-left: 0;
}

#webchat input::placeholder{
  font-family: Calibri, Helvetica Neue, Arial, sans-serif !important;
  font-size: 16px !important;
}
