.memori-widget {
    position: relative;
    width: 100%;
    padding: 1em;
}

.memori-widget,
.memori-widget * {
    box-sizing: border-box;
}

.memori-widget > .memori-spin {
    height: calc(100vh - 50px);
}

.memori--grid {
    display: flex;
    height: calc(100% - 50px);
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 870px) {
    .memori--grid {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        overflow-x: visible;
        overflow-y: scroll;
    }
}

.memori--embed .memori--grid .memori--chat-history {
    max-height: 100%;
    overflow-x: visible;
    overflow-y: scroll;
}

.memori--grid-column {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: flex-start;
}

.memori--grid-column-left {
    position: relative;
    width: 50%;
    margin-right: 1rem;
}

@media (max-width: 870px) {
    .memori--grid-column-left {
        width: 100%;
        height: auto;
        max-height: 200px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

.memori--grid-column-right {
    width: 50%;
    margin-left: 1rem;
}

@media (max-width: 870px) {
    .memori--grid-column-right {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 870px) {
    .memori--active .memori--grid-column-right {
        overflow-x: hidden;
        overflow-y: scroll;
    }
}

.memori--select {
    margin-top: 1rem;
}

.memori--select label {
    margin: 0.5rem 0 0.25rem;
    color: var(--dark-gray);
    font-size: 0.8em;
}

.memori--select select {
    display: block;
    width: 100%;
}

.memori--global-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 100vh;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.memori--global-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100svh;
    background-color: #eee;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: blur(var(--memori-blur-background, 0));
}

@media (max-width: 870px) {
    .memori--global-background-image {
        min-height: 100vh;
    }
}

.memori--powered-by {
    position: absolute;
    z-index: 1000;
    bottom: 0;
    left: 0;
    display: inline-flex;
    flex-wrap: wrap;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    background-color: var(--memori-inner-bg, transparent);
    color: var(--memori-text-color, rgba(0, 0, 0, 0.85)) !important;
    font-size: 0.7em;
}

@media (max-width: 870px) {
    .memori--powered-by {
        top: 3rem;
        bottom: auto;
    }
}

.memori--powered-by a {
    color: var(--memori-text-color, rgba(0, 0, 0, 0.85)) !important;
    text-decoration: underline;
}

.memori--powered-by a:hover,
.memori--powered-by a:focus {
    color: var(--memori-text-color, rgba(0, 0, 0, 0.85)) !important;
    opacity: 0.8;
    text-decoration: underline;
}

.memori--powered-by img {
    max-width: 2rem;
    max-height: 2rem;
    margin-right: 0.25rem;
}

.memori--powered-by p {
    margin-bottom: 0;
    color: var(--memori-text-color, rgba(0, 0, 0, 0.85)) !important;
}

.memori--conversation-button {
    z-index: 1;
}

.memori--conversation-button svg {
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
}

.memori--conversation-button + .memori--conversation-button {
    margin-left: 0.33rem;
}

.memori--conversation-button:hover,
.memori--conversation-button:active,
.memori--conversation-button:focus {
    border-color: var(--memori-primary) !important;
}

.memori--conversation-button:active,
.memori--conversation-button:focus {
    box-shadow: 0 0.2rem 0.33rem #b5b6c4 !important;
    color: var(--memori-primary) !important;
}

.memori.memori-widget.chat-focused .memori--powered-by,
.memori.memori-widget.chat-focused
    .memori-website_assistant--close-button-wrapper
    button.memori-website_assistant--close-button {
    display: none;
}

.memori.memori--auto-start .memori--start-panel {
    display: none;
}
