/* Theme colors */
:host {
    --color-hdm-red: #e20c3c;
    --color-hdm-lightgrey: #9ea3a3;
    --color-hdm-darkgrey: #3e4847;
    --color-hdm-white: #ffffff;
}

:host(.vicky) {
    --color-main-accent: var(--color-hdm-red); 
    --color-secondary-accent: var(--color-hdm-darkgrey); 
    --color-font: var(--color-hdm-white); 
    --color-border: var(--color-hdm-lightgrey); 
    --color-background: var(--color-hdm-white);
}

/* App window */
:host {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 70vh;
    margin: 0;
    padding: 0;
    max-width: 500px;
    transition: right 300ms;
    transition-timing-function: ease-out;
    contain: strict;
    border-width: 1px 0px 1px 1px;
	border-color: var(--color-hdm-lightgrey);
	border-style: solid;
	color: var(--color-hdm-white) !important;
    background-color: var(--color-hdm-white);
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 2;
}



/* Top header */
header {
    flex: 0 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    background-color: var(--color-hdm-red);
}

header h2 {
    margin: 0 0 -10px -40px;
    justify-self: center;
    font-family: 'Gochi Hand', cursive;
    font-size: 60px;
    font-weight: normal;
    text-transform: uppercase;
}

header .close {
    flex: 0 1 40px;
}

header .font {
    flex: 0 1 60px;
}

header button {
    height: 100%;
}

/* animated icon buttons */
button>img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 300ms;
}

button:hover>img {
    transform: scale(1.2);
}

/* Chat */
.chat-scroll-wrapper {
    flex: 0 1 100%;
    overflow-x: hidden;
    overflow-y: scroll;
}

.chat-list {
    min-height: 90%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 25px;
    list-style: none;
}

/* Message bubble */
.chat-message {
    position: relative;
    flex: 0 1 auto;
    max-width: 75%;
    margin: 5px;
    padding: 15px;
    white-space: pre-line;
}

.chat-message.question {
    align-self: flex-end;
    background-color: var(--color-hdm-lightgrey);
    color: black;
}

.chat-message.answer {
    align-self: flex-start;
    background-color: var(--color-hdm-darkgrey);
}

.chat-message p {
    margin: 0;
}

.chat-message a {
    color: var(--color-hdm-red);
}

/* Triangle after message */
.chat-message::before {
    display: block;
    content: "";
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
}

.chat-message.question::before {
    right: -13px;
    border-width: 9px 13px 0 0;
    border-color: var(--color-hdm-lightgrey) transparent transparent transparent;
}

.chat-message.answer::before {
    left: -13px;
    border-width: 0 13px 9px 0;
    border-color: transparent var(--color-hdm-darkgrey) transparent transparent;
}

/* Loading indicator */
.loading-indicator:not(.visible) {
    display: none;
}

.loading-indicator {
    flex: 0 0 auto;
    font-size: smaller;
    color: var(--color-hdm-darkgrey);
    padding: 0 10px;
}

/* Error message */
.hidden { display: none; }

/* Input field*/
.input-wrapper {
    flex: 0 0 60px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-color: var(--color-hdm-darkgrey);
    margin: 0; 
    padding: 10px 0 2px 25px;
    gap: 5px 0; 
}

.input-wrapper label {
    flex: 0 1 100%;
}

.input-wrapper input {
    flex: 2 1 auto;
    height: 4rem;
}

.input-wrapper button {
    flex: 0 0 60px;
    height: 4rem;
    padding: 10px 0;
}

/* General Inputs */
button,
input {
    background-color: transparent;
    border: none;
    color: inherit;
    font-size: inherit;
}

/* General accessibility stuff */
:host(.font-xl) {
    font-size: 22px !important;
    line-height: 2 !important;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus:not(::-moz-focusring) {
    outline: none;
}

*:focus-visible {
    outline: solid var(--color-hdm-red);
}

*:-moz-focusring {
    outline: solid var(--color-hdm-red);
}

header *:focus-visible {
    outline: solid var(--color-hdm-white);
}

header *:-moz-focusring {
    outline: solid var(--color-hdm-white);
}