/* BASE */
#chatwindow {
    border-radius: 4px;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}


#heading {
    background-color: #006cb7;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    height: 48px;
    overflow: hidden;
    width: 100%;
}

#webchat h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    color:#F1F0F0;
    font-family: 'Open Sans', sans-serif;
    font-size: 24px;
    line-height: 14px;
    font-weight: 700;
}

#webchat p {
    font-family: 'Open Sans', Arial, Helvetica, sans-serif !important;
    line-height: normal;
}

#webchat p em {
    font-family: 'Open Sans', Arial, Helvetica, sans-serif !important;
    line-height: normal;
    font-size: 13px;
    font-style: normal !important;
}

#webchat {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif !important;
}

/* Smooth scrolling */
#webchat .webchat__basic-transcript__activity {
  scroll-margin-top: 65px; /* your sticky header height */
}

/* Bubbles and Avatars */

.webchat__stacked-layout__avatar-gutter {
    display: flex;
    justify-content: flex-end;
}

.webchat__render-markdown p, .webchat__render-markdown ul li, .webchat__render-markdown ol li, .webchat__render-markdown strong {
    line-height: normal;
    color: #121e2f !important
}

.webchat__render-markdown ul li, .webchat__render-markdown ol li {
    padding: 8px 0 !important;
}

.webchat__render-markdown ul, .webchat__render-markdown ol {
    font-family: 'Open Sans', Arial, Helvetica, sans-serif !important;
    padding-bottom: 10px;
}

.webchat__bubble__content {
    border-radius: 10px !important;
    border-color: rgb(225 228 239) !important;
    background-color: #f3f3f4 !important;
    flex-grow: 0 !important;
    /*padding: 5px 5px 0px 5px;*/
}

.webchat__bubble--from-user .webchat__bubble__content {
    background: #0E2A45 !important;
    padding: 10px !important;
    border-radius: 11px !important;
    border-width: 0px !important;
}

.webchat__bubble--from-user .webchat__bubble__content .webchat__text-content {
    padding: 0 !important;
}

.webchat__stacked-layout__attachment-row .webchat__bubble .webchat__bubble__content {
    flex-grow: 1 !important;
}

.webchat__bubble--from-user .webchat__bubble__content .webchat__text-content .webchat__text-content__markdown .webchat__render-markdown p {
    color: #ffffff !important;
}

.webchat__stacked-layout__status .webchat__stacked-layout__avatar-gutter, .webchat__stacked-layout__status .webchat__stacked-layout__nub-pad {
    width: 0 !important;
}

/* SEND form */
.webchat__send-box__main {
    border-radius: 0px;
    height: 140px;
    position: relative;
}

/* Upload button */
.webchat__send-box__main .webchat__upload-button-new {
    width: 57px !important;
    height: 57px !important;
    background-color: #006cb7 !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    cursor: pointer;
    overflow: visible !important;
    position: absolute !important;
    bottom: 76px;
    left: 13px;
    cursor: pointer;
    justify-content: center;
}

.webchat__upload-button-new svg {
    width: 28px;
    height: 28px;
}

.webchat__send-box__main .cam-upld-btn {
    width: 57px !important;
    height: 57px !important;
    background-color: #006cb7 !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    cursor: pointer;
    overflow: visible !important;
    position: absolute !important;
    bottom: 76px;
    left: 10px;
    cursor: pointer;
    justify-content: center;
}

.button-disabled {
    pointer-events: none !important;
    opacity: 0.4 !important;
}

.webchat__send-box__main #webchat-cam-upld #cam-upld-icon-wrap {
    display: flex;
    align-items: center;
    pointer-events: none;
}

.webchat__send-box__main .webchat__upload-button-new .webchat__icon-button {
    width: 57px !important;
    height: 57px !important;
    cursor: pointer !important;
}

.webchat__send-box__main .webchat__upload-button-new .webchat__attachment-icon {
    display: flex !important;
    align-items: center;
    bottom: 1px;
    left: -2px;
}

.webchat__send-box__main .webchat__upload-button-new .webchat__attachment-icon svg, .webchat__send-box__main .cam-upld-btn svg {
    fill: transparent !important;
    border-color: #fff;
    width: 28px !important;
    height: 28px !important;
    left: 1px;
    bottom: 0px;
    position: relative;
    transform: scale(0.9);
}

.webchat__send-box__main .cam-upld-btn svg {
    left: -1px !important;
    bottom: 1px !important;
}

.webchat__attachment-icon__checkmark-icon {
    border: none !important;
}

/* Send button */
.webchat__send-button {
    background-color: #006cb7 !important;
    cursor: pointer;
    border-radius: 50px;
    width: 43px !important;
    height: 43px !important;
    position: absolute !important;
    right: 6px;
    bottom: 16px;
}

.webchat__icon-button__shade {
    display: none;
}

.webchat__send-button .webchat__send-icon {
    fill: #ffffff !important;
}

/* Typing form */
.webchat__send-box__main {
    border: none !important;
}

.webchat__send-box__main .webchat__send-box-text-box {
    flex: none !important;
    width: 100%;
    display: flex !important;
    align-items: flex-start !important;
    font-size: 17px !important;
    font-weight: 500;
    padding: 5px !important;
    box-sizing: border-box;
    height: 54px !important;
    border-radius: 50px !important;
    border: 2px solid #0e2a451f;
    background-color: #e8f0f7 !important;
    color: #262626 !important;
    font-family: 'Open Sans', sans-serif !important;
    left: 0px;
    bottom: -75px;
}

.webchat__send-box__main .webchat__send-box-text-box .webchat__send-box-text-box__input {
    font-weight: 500;
    color: #262626 !important;
    padding-left: 14px !important;
    max-width: 85%;
}

.webchat__send-box__main .webchat__send-box-text-box .webchat__send-box-text-box__input::placeholder {
    color: #0e2a45bb !important;
    font-family: 'Open Sans', sans-serif !important;
    font-size: 20px !important;
    font-weight: 600;
}

/* Messages */
.webchat__stacked-layout__main{
    flex-direction: column-reverse !important;
}

.webchat__stacked-layout__avatar-gutter {
    width: 0px !important;
}

.webchat__bubble__nub-pad {
    display: none !important;
}

.webchat__stacked-layout__nub-pad {
    display: none !important;
}

.webchat__stacked-layout__content {
    margin-bottom: 10px;
}

.webchat__stacked-layout__message-row {
    display: block !important;
}

.webchat__stacked-layout--from-user .webchat__stacked-layout__message-row {
    display: flex !important;
}

/* TYPING indicator */
.webchat__typingIndicator {
    background: #ffffff !important;
    border-radius: 25px !important;
    width: 100% !important;
    display: flex !important;
}

.webchat__typingIndicator::before {
    content: 'Torkel tänker...'; 
    color: #0E2A45; 
    font-size: 16px; 
    margin-left: 8px;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    font-weight: 600;
    width: 100%;
    display: flex;
  }

  .webchat__typingIndicator {
    animation: fadeInOut 1.5s infinite ease-in-out;;
  }

  @keyframes fadeInOut {
    0% {
      opacity: 0; /* Completely transparent */
    }
    50% {
      opacity: 1; /* Fully visible */
    }
    100% {
      opacity: 0; /* Fade out to transparent */
    }
  }

/* Quick responses - buttons */

.react-film__filmstrip .react-film__filmstrip__list {
    flex-direction: row-reverse !important;
}

.webchat__suggested-actions__item-box button.webchat__suggested-action {
    border: none !important;
    border-radius: 25px;
    background-color: #006cb7 !important;
    color: #ffffff;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 20px;
}

.webchat--css-bprbz-9g7ov9.webchat__suggested-action {
    padding: 23px 27px !important;
}

/* Arrows */
.react-film__flipper .react-film__flipper__slider .react-film__flipper__body {
    background-color: #006cb7 !important;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif !important;
    font-weight: 600;
    font-size: 14px !important;
}

.react-film__flipper--left {

}

.react-film__flipper--right {

}

/*  References */
.webchat__render-markdown__pure-identifier {
    background-color: #006cb7 !important;
    color: white !important; 
    width: 20px;
    height: 20px;
    display: inline-flex;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    font-size: 14px !important;
    justify-content: center;
    align-items: center;
    margin-right: 3px;
}

.webchat__render-markdown__pure-identifier:before, .webchat__render-markdown__pure-identifier:after, .webchat__render-markdown__pure-identifier img {
    display: none !important;
}

.webchat__link-definitions__list {
    gap: 8px !important;
}

.webchat__link-definitions__list-item-body {
    padding: 0px !important;
}

.webchat__link-definitions__badge {
    background: transparent !important;
    border: none !important;
    font-weight: 700;
    font-size: 14px !important;
    margin: 0 !important;
    color: #ffffff !important;
    background-color: #006cb7 !important;
    width: 20px;
    height: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 50px !important;
}

.webchat__link-definitions__list-item-box {
    background-color: transparent !important;
    border: none !important;
}

.webchat__link-definitions__list-item-text {
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: normal;
}

.webchat__render-markdown__citation {
    text-decoration: none !important;
    line-height: normal;
}

.webchat__citation-modal-dialog__body .webchat__render-markdown p {
    line-height: 24px;
    font-size: 15px;
}

.cam-upld-btn {

}

#uploading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    display: flex;
    background-color: #ffffffeb;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.uploader-img {
    width: 90px;
    height: 90px;
}

.uploader-text {
    font-family: 'Open Sans Condensed Bold', sans-serif !important;
    color: #006cb7;
    font-size: 29px;
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 55px;
    padding: 0 40px;
    text-align: center;
}

.uploader-error-img {
    display: none;
    width: 90px;
    height: 90px;
    justify-content: center;
    align-items: center;
}

.retry-button {
    font-family: 'Open Sans Condensed Bold', sans-serif !important;
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 20px;
    color: #fff;
    background-color: #006cb7;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    border-radius: 50px;
  }
  .retry-button:hover {
    background-color: #005699;
  }

#chatbot-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Semi-transparent background */
    z-index: 99999; /* Should be below chatbot but above other content */
    pointer-events: none; /* Prevent interaction with overlay itself */
}
#chatbot-widget.open ~ #chatbot-overlay {
    pointer-events: auto; /* Allow clicks on overlay to close chatbot */
}

/* PROMPT BOX */
#chatbot-prompt-box {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    display: none;
    background-color: #006cb7;
    padding: 25px;
    border-radius: 5px;
}

.prompt-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.prompt-header p {
    line-height: normal !important;
    font-size: 18px; 
}

.prompt-row {
    display: flex;
    flex-direction: column;
}

.prompt-subheading {
    color: #fff !important;
    font-size: 30px;
    line-height: 34px;
    padding: 0 0 10px 0 !important;
}

.prompt-info {
    width: 65%;
}

.prompt-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid #7dcaff;
}

.prompt-input-wrap {
    width: 100%;
    position: relative;
}

#chatbot-prompt-box p {
    color: #fff;
}


#chatbot-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc !important;
    border-radius: 5px;
    width: 100%;
    max-width: 100% !important;
    font-weight: 600 !important;
    font-size: 20px !important;
    color: #006cb7 !important;
    text-align: left !important;
    border-color: RGBA(255, 255, 255, 0) !important;
    border-style: solid !important;
    border-radius: 5px 5px 5px 5px !important;
    padding: 14px 70px 14px 14px !important;
    background-color: #fff!important;
}

#chatbot-input::placeholder {
    color: #006cb7 !important;
}
#chatbot-send {
    padding: 10px 15px;
    background-color: #006cb7 !important;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    position: absolute;
    right: 0;
    width: 60px;
    height: 47px;
    margin: 5px;
}

.arrow-send-icon {
    width: 29px !important;
    height: 29px !important;
    pointer-events: none !important;
}

@media screen and (min-width: 321px) and (max-width: 768px) {
    #chatbot-prompt-box {
        padding: 20px;
    }

    .prompt-subheading {
        font-size: 27px;
        line-height: 30px;
        width: 105% !important;
    }

    .prompt-avatar {
        width: 90px;
        height: 90px;
    }

    .prompt-info p {
        width: 150% !important;
        font-size: 17px !important
    }

    .prompt-header {
        align-items: flex-start
    }

    #chatbot-input::placeholder {
        font-size: 18px !important;
    }

    #chatbot-input {
        font-size: 18px !important;
    }
}