:root {
    --black: #000;
    --black-50: rgba(0, 0, 0, 0.50196);
    --black-20: rgba(0, 0, 0, 0.2);
    --black-10: rgba(0, 0, 0, 0.10196);
    --white: #fff;
    --white-25: rgba(255, 255, 255, 0.1451);
    --white-50: rgba(255, 255, 255, 0.1451);
    --gray: #f6f6f6;
    --lime: #94d600;
    --blue-lt: #6cc5e9;
    --orange: #ff6c00;
    --pink: #cf009f;
    --teal: #0099a9;
    --purple: #59007b;
    --purple-lt: #982eb4;
    --purple-lt-25: rgba(152, 46, 180, 0.1451);
    --purple-dk: #340e51;
    --purple-dk-90: rgba(52, 14, 81, 0.86667);
    --lora: "lora", sans-serif;
    --lato: "lato", sans-serif;
    --gutter: clamp(1rem, 3.333vw + 0.333rem, 3rem);
    --container: max(var(--gutter), calc((100% - 84rem) / 2));
    --space-fw: max(3rem, min(8vw, 4rem));
    --transition: 0.3s ease;
    --shadow: 0 1rem 1.5rem var(--black-20);
    scroll-behavior: smooth;
}

/* set the default to box-sizing: border-box */
/*html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

strong {
    font-weight: 600;
}*/

.chat__frame ol,
.chat__frame ul {
    list-style: none;
}

.chat__frame {
    color: #000;
    font-size: 0.9625em;
    font-family: var(--lato), serif;
    line-height: 1.6;
    background: #f0f0f0;
    border: solid 1px;
    margin: 0 auto;
    max-height: 500px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.chat__frame h1 {
    margin: 0;
    color: var(--white);
    font-family: "lora", serif !important;
    font-size: clamp(1.375rem, 0.6vw + 1.2rem, 1.75rem);
    font-weight: 100;
    letter-spacing: normal;
    line-height: 1.45;
    width: auto;
}

/* Heading before disclaimer text. */
.chat__frame h2 {
    display: block;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    font-family: "lora", serif !important;
    font-size: 1.5em;
    font-weight: 400;
}

.chat__frame .Header__group-wrapper {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--purple-dk);
    border-bottom: 1px solid var(--white-25);
    z-index: 2;
}

.chat__frame .Header__group {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1em var(--container);
    background: var(--purple-dk);
    color: var(--white);
    font-size: 0.875rem;
}

.access-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Style popup disclaimer modal */
dialog {
    border: none;
}

.chat__frame {
    display: block;
    padding-left: var(--container);
    padding-right: var(--container);
    margin-bottom: 1rem;
}

.chatlist {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* 7em top, 0 left and right, 12em bottom */
    margin: 7em 0 12em;
    /* <ul>s by default have padding and margin */
    padding: 0;
}

/* Style bot output and user input */
.chatlist .bot__output_standard {
    display: inline-block; /* Ensure the bubble width adapts to the content */
    word-wrap: break-word;
    word-break: break-word;
    padding: 1.25em 1.5em;
    color: #000;
    background: #fff;
    border: none;
    border-radius: 1em;
    margin-bottom: 1em;
    max-width: 51.5em;
}

.chatlist .bot__output,
.chatlist .userInput {
    display: inline-block;
    word-wrap: break-word;
    word-break: break-word;
    padding: 1.25em 1.5em 1em 1.5em;
    color: #000;
    background: #fff;
    border: none;
    border-radius: 1em;
    margin-bottom: 1em;
    max-width: 51.5em;
    white-space: pre-wrap;
}

.chatlist .bot__output {
    text-align: left;
}

.chatlist .userInput {
    align-self: flex-end;
    text-align: right;
    padding: 0.5em 1.5em;
    border-radius: 2em;
}

.chatlist .bot__output {
    display: inline-block; /* Width adapts to the content */
    word-wrap: break-word; /* Break long words */
    word-break: break-word; /* Prevent text overflow */
    text-align: left;
}

/* Modify user input colors */
.chatlist .userInput {
    color: #fff;
    background: var(--purple);
}

/* Adjust padding and border-radius of longer response outputs */
.chatlist .userInput + .bot__output {
    padding: 1.25em 1.5em;
    border-radius: 1em;
}

/* Heading before link list. */
.bot__output span {
    display: block;
    margin: 1em 0 0.25em;
    font-family: "lora", serif !important;
    font-size: 22px;
    font-weight: 500;
}

/* Adjust tommiebot-link-list spacing and colors */
.tommiebot-link-list {
    padding: 0;
}

.tommiebot-link-list li {
    padding: 0.15em 0;
}

.tommiebot-link-list a {
    color: var(--purple-lt);
    text-decoration: underline;
}

.tommiebot-feedback-div {
    display: flex;
    margin-top: 20px;
    align-items: center;
}

/* Heading before thumbs up/down. */
.tommiebot-feedback-div p {
    display: block;
    margin-top: 0;
    margin-bottom: 0;
    color: #767676;
    font-size: 0.7em;
    white-space: nowrap;
}

.tommiebot-feedback-div label {
    color: #666;
}

.tommiebot-feedback-buttons-div {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 1em;
}

/* Style Read Aloud Button */
.tommiebot-read-aloud-div {
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: left;
}

.tommiebot-read-aloud-buttons {
    display: flex;
    position: relative;
}

.tommiebot-read-aloud-button {
    display: flex;
    background: transparent;
    border: solid transparent;
    border-radius: 50%;
    width: 2.7em;
    height: 2.7em;
    padding: .5em;
    align-items: center;
    justify-content: left;
}

.tommiebot-read-aloud-button svg {
    display: flex;
    width: 24px;
    height: 24px;
    color: black;
    overflow: visible;
    fill: none;
    justify-content: center;
    align-items: center;
}

.tommiebot-read-aloud-button:hover,
.tommiebot-read-aloud-button:focus {
    background: var(--black-10);
}

.tommiebot-read-aloud-button.active {
    background: var(--purple);
}

.tommiebot-read-aloud-button.active svg {
    color: white;
}

/* Style Feedback input */
.tommiebot-thumbsupdown-div {
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: left;
}

.tommiebot-thumbsupdown-buttons {
    display: flex;
    position: relative;
    gap: 5px;
}

.thumbsup-btn,
.thumbsdown-btn {
    display: flex;
    background: transparent;
    border: solid transparent;
    border-radius: 50%;
    width: 2.7em;
    height: 2.7em;
    align-items: center;
    justify-content: left;
}

.thumbsup-btn svg,
.thumbsdown-btn svg{
    display: flex;
    width: 24px;
    height: 24px;
    color: black;
    overflow: visible;
    fill: none;
    justify-content: center;
    align-items: center;
}

.thumbsup-btn:hover,
.thumbsup-btn:focus,
.thumbsdown-btn:hover,
.thumbsdown-btn:focus {
    background: var(--black-10);
}

.thumbsup-btn.active,
.thumbsdown-btn.active {
    background: var(--purple);
}

.thumbsup-btn.active svg,
.thumbsdown-btn.active svg {
    color: white;
}

/* Reveal feedback when thumbs up/down is active */
/* .thumbsup-btn.active ~ *,
.thumbsdown-btn.active ~ * {
	display: flex;
} */

.text-tommiebot-feedback-div{
    display: flex;
    position: relative;
    width: 100%;
    align-items: end;
}

.text-feedback-form {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: left;
}

.text-feedback-form textarea {
    resize: none;
    /* display: none; */
    height: 3.2em;
    width: 100%;
    padding: 0.8em 9em 0.5em 1em;
    margin-left: 0.75em;
    color: #333;
    font: inherit;
    font-size: 0.8em;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 9em;
    overflow: hidden;
}

.text-feedback-form textarea::placeholder {
    opacity: 1;
    color: #666;
}

.feedback-submit-btn {
    /* display: none; */
    background: var(--purple-lt);
    position: absolute;
    right: 0;
    height: 1em;
    padding: 1.1em 1.2em 2.1em 1.2em;
    color: white;
    font-size: 0.75em;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 9em;
}

.feedback-submit-btn:hover {
    color: #fff;
    background: var(--purple);
}

.feedback-submit-btn:active {
    color: #fff;
    background: var(--purple);
}

.chatlist .followup-div {
    display: flex;
    will-change: auto;
    margin-top: 0;
}

.chatlist .followup-toggle-button {
    display: flex;
    margin: 0 auto;
    padding: 0.3em 0.9em;
    cursor: pointer;
    background-color: transparent;
    color: var(--purple);
    fill: var(--purple);
    font-size: 1em;
    border: none;
    border-radius: 9em;
    align-items: center;
}

.chatlist .followup-toggle-button:hover {
    text-decoration: underline;
}

.chatlist .followup-toggle-button.active {
    background-color: var(--purple);
    color: white;
    fill: white;
}

.tommiebot-input-box-div {
    position: relative;
    bottom: 0;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background: #fff;
    border: none;
    border-radius: 50vh;
    margin-bottom: 1em;
}

/* Reduce max-width of elements in prompt area */
/*.tommiebot-input-box-div > * {
    padding-left: var(--container);
    padding-right: var(--container);
}
*/
#jumpingdots {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    margin: 0;
    text-align: center;
    z-index: 2;
}

#jumpingdots .dot {
    background-color: var(--purple-lt);
    display: inline-block; /* block is also ok because inline by default */
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 3px;
    animation: jumpingdots 1.3s linear infinite;

    &:nth-child(2) {
         animation-delay: -1.1s;
    }

    &:nth-child(3) {
         animation-delay: -0.9s;
    }
}

@keyframes jumpingdots {
    0%,
    60%,
    100% {
        transform: initial;
    }
    30% {
        transform: translateY(-15px);
    }
}

/* Style tommiebot-inputform */
#tommiebot-inputform {
    position: relative;
    color: #000;
    height: 4em;
    margin-top: 1em;
}

/* we need to set the height on <form> and <textarea> */

#tommiebot-inputform textarea {
    overflow: hidden;
    resize: none;
    width: 100%;
    height: 4em;
    line-height: 2;
    color: #000;
    padding: 1.25em 1.5em;
    padding-right: 4em; /* we need extra padding on the right so the text wraps on mobile */
    background: #fff;
    border-radius: 50vh; /* use 50vh for pill shape border-radius */
    border: none;
    font: inherit;
}

#tommiebot-inputform textarea::placeholder {
    opacity: 1;
    color: #000;
}

#tommiebot-inputform input[type="submit"] {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0.5em;
    width: 4em;
    height: 4em;
    margin: 0 auto;
    padding: 0;
    color: #fff;
    font-size: 0.825em;
    font-weight: 700;
    letter-spacing: 1px;
    text-indent: -9em;
    border: none;
    border-radius: 9em;
    background-color: var(--purple-lt);
    background-image: url(https://s3.amazonaws.com/ust-style-static-files.aws.stthomas.edu/dist-castor3/img/castor-2-icons-white.svg);
    /*background-repeat: no-repeat;*/
    background-position: -2.5rem -27rem;
    background-size: 600%;
}

#tommiebot-inputform input[type="submit"]:hover {
    cursor: pointer;
    background-color: var(--purple);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.error[id="tommiebotinput"] {
    position: relative;
    animation: shake 0.1s linear;
    animation-iteration-count: 3;
}

@keyframes shake {
    0% {
        left: -5px;
    }
    100% {
        right: -5px;
    }
}
