:root {
    --freemom-wizard-bgColor--light: #fafafa;
    --freemom-wizard-borderColor: #ddd;
    --freemom-wizard-borderColor--hover: #bbb;
    --freemom-wizard-borderColor--alt: var(--qui-color-secondary);
    --freemom-wizard-radius-sm: 0.5rem;
    --freemom-wizard-radius: 1rem;
    --freemom-wizard-radius--lg: 2rem;
}

/***************/
/* Page design */
/***************/
body.type-freemom-quiqqer-template-types-postingWizard {
    --qui-body-container-top: 0; /* Somit bleibt Menü "über dem" Chat */
}

body.type-freemom-quiqqer-template-types-postingWizard .page-footer--smartPosting {

    color: var(--freemom-color-muted);
    background-color: transparent;
    padding-top: 0;
    margin-top: auto;
    padding-block: 0.5rem;
}

.page-footer--smartPosting-inner {
    display: flex;
    font-size: 0.75rem;
    justify-content: center;
    gap: 0.5rem;
}

body.type-freemom-quiqqer-template-types-postingWizard .page-footer--smartPosting a {
    color: var(--freemom-color-muted);
}

body.type-freemom-quiqqer-template-types-postingWizard .page-footer--smartPosting a:is(:hover, :focus) {
    color: var(--qui-color-body);
}

/* separator */
body.type-freemom-quiqqer-template-types-postingWizard .page-footer--smartPosting a:last-of-type ~ span {
    display: none;
}

@media screen and (hover: hover) {
    /* scrollbar */
    ::-webkit-scrollbar {
        width: 0.25rem;
    }

    ::-webkit-scrollbar-track {
        background-color: transparent;
    }

    ::-webkit-scrollbar-thumb {
        background: var(--freemom-wizard-borderColor);
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--freemom-wizard-borderColor);
    }
}

/**********/
/* Wizard */
/**********/
.posting-wizard {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    width: 100%;
    height: calc(100vh - var(--qui-nav-height));
}

@media screen and (max-width: 767px) {
    .posting-wizard {
        padding-bottom: 0;
    }
}

/*******************/
/* Default prompts */
/*******************/
.posting-wizard-prompts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    /*margin-bottom: 2rem;*/
}

@media screen and (max-width: 767px) {
    .posting-wizard-prompts {
        grid-template-columns: 1fr;
    }
}

/* one entry */
.posting-wizard-prompts__prompt {
    --accent-color: #7e1cc812;
    --animation-delay: 100ms;

    cursor: pointer;
    position: relative;
    font-size: 0.875rem;
    border-radius: var(--freemom-wizard-radius);
    padding: 1rem;
    background-color: var(--freemom-wizard-bgColor--light);
    background-image: linear-gradient(132deg, var(--accent-color), transparent 20%);
    /*background-image: linear-gradient(132deg, #2E054D10, transparent 20%);*/
    border: 4px solid #fff;
    outline: 1px solid var(--freemom-wizard-borderColor);
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 1rem;
    transition-property: opacity, bottom;
    transition-timing-function: ease;
    transition-duration: var(--qui-transition-duration-normal);
    transition-delay: var(--animation-delay);
}

.posting-wizard-prompts__prompt[data-visible="0"] {
    pointer-events: none;
    opacity: 0;
    bottom: -5px;
}

.posting-wizard-prompts__prompt[data-visible="1"] {
    opacity: 1;
    bottom: 0;
}

.posting-wizard-prompts__prompt:nth-child(6n+1) {
    --accent-color: #7e1cc812;
    --animation-delay: 100ms;
}

.posting-wizard-prompts__prompt:nth-child(6n+2) {
    --accent-color: rgb(21 131 86 / 9%);
    --animation-delay: 200ms;
}

.posting-wizard-prompts__prompt:nth-child(6n+3) {
    --accent-color: rgb(70 181 215 / 14%);
    --animation-delay: 300ms;
}

.posting-wizard-prompts__prompt:nth-child(6n+4) {
    --accent-color: rgb(234 213 40 / 14%);
    --animation-delay: 400ms;
}

.posting-wizard-prompts__prompt:nth-child(6n+5) {
    --accent-color: rgb(230 64 108 / 7%);
    --animation-delay: 500ms;
}

.posting-wizard-prompts__prompt:nth-child(6n+6) {
    --accent-color: rgb(33 94 216 / 9%);
    --animation-delay: 600ms;
}

.posting-wizard-prompts__prompt:hover {
    outline-color: var(--freemom-wizard-borderColor--alt);
}

.posting-wizard-prompts__prompt .icon {
    font-size: 1.25rem;
    color: var(--qui-color-secondary--light);
    text-align: center;
}

.posting-wizard-prompts__prompt .title {
    font-weight: bold;
    color: var(--qui-color-secondary--light);
}

.posting-wizard-prompts__prompt .prompt {
    display: none;
}

/* ribbon */
.promptRibbonContainer {
    position: absolute;
    overflow: hidden;
    inset: 0;
}

.posting-wizard-prompts__promptRibbon {
    position: absolute;
    background: var(--freemom-color-teal);
    box-shadow: 0 0 0 999px var(--freemom-color-teal);
    clip-path: inset(0 -100%);
    inset: 0 0 auto auto;
    transform-origin: 0 0;
    transform: translate(29.3%) rotate(45deg);
    color: #fff;
}

/* animation */
.posting-wizard-box-animation {
    --thinkness: 10px;
}

.posting-wizard-box-animation:before {
    transition: 0.3s;
    opacity: 0.6;
    content: "";
    position: absolute;
    inset: calc(var(--thinkness) * -1);
    border-radius: 1.25rem;
    filter: blur(0);
    z-index: -1;
    background-image: linear-gradient(125deg, #a794c6, #d0e7ed, #a794c6, #faf9fc, #489999, #d0e7ed, #a794c6);
    background-size: 200% 200%;
    background-position: 100% 100%;
    /*animation: boxAnimation 7s ease-in-out infinite, boxBlur 10s ease-in-out infinite;*/
    animation: boxAnimation 10s ease-in-out infinite;
}

.posting-wizard-box-animation:hover:before {
    animation-play-state: paused;
    filter: blur(16px);
}

@keyframes boxAnimation {
    0% {
        background-position: 100% 100%;
    }
    50% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 100%;
    }
}

@keyframes boxBlur {
    0% {
        filter: blur(12px);
    }
    50% {
        filter: blur(5px);
    }

    100% {
        filter: blur(12px);
    }
}


/*************************/
/* Scroll chat to bottom */
/*************************/
.posting-wizard-scrollToBottom {
    position: relative;
    margin-bottom: 1rem;
    z-index: 1;
}

.posting-wizard-scrollToBottom .btn {
    position: absolute;
    width: 2rem;
    line-height: 2rem;
    text-align: center;
    border-radius: 50%;
    background-color: #fff;
    border: none !important;
    outline: 1px solid var(--qui-color-secondary--lighter);
    padding: 0;
    left: calc(50% - 1rem);
    bottom: 0;
    color: var(--qui-color-secondary--lighter) !important;
    font-size: 1.25rem;
    transition: 0.2s ease !important;
}

.posting-wizard-scrollToBottom .btn:hover {
    color: var(--qui-color-secondary--light) !important;
    background-color: #fff !important;
    outline-color: var(--qui-color-secondary--light);
    filter: none;
}

.posting-wizard-scrollToBottom .btn[data-show="0"] {
    pointer-events: none;
    transform: translateY(8px);
    opacity: 0;
}

/******************/
/* Action (input) */
/******************/
.posting-wizard-form {
    display: flex;
    background-color: var(--freemom-wizard-bgColor--light);
    border-radius: 2rem;
    padding: 0;
    gap: 1rem;
    border: 4px solid #fff;
    outline: 1px solid var(--freemom-wizard-borderColor);
    position: relative;
}

.posting-wizard-form:before {
    content: "";
    position: absolute;
    top: -55px; /* border 4px + outline 1px*/
    left: 0;
    width: 100%;
    height: 50px;
    background-image: linear-gradient(to top, #fff 20%, transparent);
    pointer-events: none;
}

.posting-wizard-form:hover {
    outline-color: var(--freemom-wizard-borderColor--hover);
}

.posting-wizard-form:focus-within {
    outline-color: 0 0 0 1px var(--qui-color-main);
}

.posting-wizard-form button {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 100% !important;
    padding: 0 !important;

    line-height: 50px;
    height: 50px;
    width: 50px;
}

.posting-wizard-form button:is(:hover, :focus) {
    background-color: var(--qui-color-main);
    color: #fff;
    opacity: 0.75;
}

.posting-wizard-form label {
    display: flex;
    flex-grow: 1;
    margin-bottom: 0;
}

.posting-wizard-form input[type="text"] {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

.posting-wizard-form textarea {
    min-height: initial;
    max-height: 6rem;
    field-sizing: content;
    resize: none;
}

/**********/
/* Footer */
/**********/
.posting-wizard-footer {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    margin-inline: 1rem;
    align-items: baseline;
    justify-content: space-between;
}

.posting-wizard-footer__disclaimer {
    color: var(--freemom-color-muted);
    font-size: 0.75rem;
}

.posting-wizard-reload .btn,
.posting-wizard-footer__disclaimerSwitcherContainer .btn {
    opacity: 0.5;
}

@media screen and (hover: hover) {
    .posting-wizard-reload .btn:is(:hover, :focus),
    .posting-wizard-footer__disclaimerSwitcherContainer .btn:is(:hover, :focus) {
        opacity: 1;
    }
}

.posting-wizard-footer__action {
    display: flex;
    gap: 1rem;
}

@media screen and (max-width: 767px) {
    .posting-wizard-footer {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 0.25rem;
    }

    .posting-wizard-footer__disclaimer {
        text-align: center;
    }
}

/* disclaimer switcher */
@media screen and (min-width: 768px) {
    .posting-wizard-footer__disclaimerSwitcherContainer {
        display: none;
    }
}

@media screen and (max-width: 767px) {
    .btn-disclaimerSwitcher[data-state="hidden"] .hide-text,
    .btn-disclaimerSwitcher[data-state="visible"] .show-text {
        display: none;
    }

    .posting-wizard-reload {
        margin-left: auto;
    }

    .posting-wizard-reload .btn,
    .posting-wizard-footer__disclaimerSwitcherContainer .btn {
        padding-block: 0.5em !important
    }

    .posting-wizard-footer__disclaimer[data-mobile-disclaimer-state="hidden"],
    .page-footer--smartPosting:not([data-mobile-disclaimer-state="visible"]) {
        display: none;
    }

}


/** messages
 ============================================ */

.posting-wizard-chat {
    scroll-behavior: smooth;
    flex-grow: 1;
    overflow: auto;
    padding: 1rem;
}

[data-name="posting-wizard-chat"] .message {
    --message-direction: row;
    --message-borderRadius: 0 var(--freemom-wizard-radius) var(--freemom-wizard-radius) var(--freemom-wizard-radius);
    --message-content-marginInline: 0 4rem; /* 4rem = gap + avatar width */
    --message-content-borderColor: #f2f2f2;
    --message-avatar-bgColor: #fff;
    --message-avatar-color: var(--qui-color-secondary--light);

    display: flex;
    align-items: flex-start;
    flex-direction: var(--message-direction);
    gap: 1rem;
    margin-bottom: 3rem;
}

@media screen and (max-width: 767px) {
    [data-name="posting-wizard-chat"] .message {
        margin-bottom: 1rem;
    }
}

[data-name="posting-wizard-chat"] .message-user {
    --message-direction: row-reverse;
    --message-borderRadius: var(--freemom-wizard-radius) 0 var(--freemom-wizard-radius) var(--freemom-wizard-radius);
    --message-content-marginInline: 4rem 0;
    --message-avatar-bgColor: #fff;
    --message-avatar-color: inherit;
    --message-content-bgColor: #efedf4;
}

[data-name="posting-wizard-chat"] .message-ai {
    --message-avatar-bgColor: #fff;
    --message-avatar-color: inherit;
    --message-content-bgColor: #fff;
}

[data-name="posting-wizard-chat"] .message-system {
    --message-content-borderColor: transparent;
}

[data-name="posting-wizard-chat"] .message-system .message__avatar {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
}

[data-name="posting-wizard-chat"] .message-system .message__content {
    width: 100%;
    padding: 0;
    margin-inline: auto;
    max-width: 100%;
    margin-right: 4rem;
}

[data-name="posting-wizard-chat"] .message.message-welcome .message__content {
    max-width: calc(100% - 8rem); /* width of avatar for both sides */
    margin-inline: auto;
    width: 40rem;
    text-align: center;
    padding: 0;
}

[data-name="posting-wizard-chat"] .message__avatar {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    outline: 1px solid #eee;
    border-radius: 50%;
    background: var(--message-avatar-bgColor);
    color: var(--message-avatar-color);
    box-shadow: rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;
}

[data-name="posting-wizard-chat"] .message__content {
    border-radius: var(--message-borderRadius);
    background-color: var(--message-content-bgColor);
    flex-grow: 0;
    max-width: 800px;
    margin: 0;
    padding: 1rem 1.5rem;
    border: 1px solid var(--message-content-borderColor)
}

.message-wrapper--current {
    min-height: 60dvh;
}

@media screen and (max-width: 1024px) {
    .message-system .message__avatar {
        display: none !important;
    }

    [data-name="posting-wizard-chat"] .message-system .message__content {
        margin-right: 0;
    }
}

@media screen and (max-width: 767px) {
    [data-name="posting-wizard-chat"] .message.message-welcome .message__content {
        max-width: 100%;
    }

    .message__avatar {
        display: none !important;
    }
}

/**************/
/* Animations */
/**************/
@keyframes fadeInWord {
    to {
        opacity: 1;
    }
}

.word {
    display: none;
    opacity: 0;
}

.word.text-is-centered {
    display: inline-block;
}

.word.visible {
    animation: fadeInWord 500ms ease-in-out forwards;
    display: inline-block;
}

/* animation: shinning */
.animation-textShinning {
    background: #222 linear-gradient(to right, #222 0%, #fff 50%, #222 100%) 0 0 no-repeat;
    -webkit-background-size: 150px;
    color: rgba(255, 255, 255, 0.3);
    -webkit-background-clip: text;
    -webkit-animation-name: shine;
    -webkit-animation-duration: 2s;
    -webkit-animation-iteration-count: infinite;
    text-shadow: 0 0px 0px rgba(255, 255, 255, 0.5);
}

@-webkit-keyframes shine {
    0%, 10% {
        background-position: -150px;
    }
    100% {
        background-position: calc(100% + 150px);
    }
}

/***************/
/* Finish CTAs */
/***************/
.finishCTAs__entries {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media screen and (max-width: 767px) {
    .finishCTAs__entries {
        grid-template-columns: 1fr;
    }
}

.finishCTAs__entry {
    --accent-color: var(--qui-color-secondary--light);
    --title-color: var(--qui-color-secondary--light);
    --icon-color: var(--qui-color-secondary--light);

    cursor: pointer;
    position: relative;
    font-size: 1rem;
    border-radius: var(--freemom-wizard-radius);
    padding: 1rem;
    background-color: var(--freemom-wizard-bgColor--light);
    /*background-image: linear-gradient(132deg, var(--accent-color), transparent 20%);*/
    border: 4px solid #fff;
    outline: 1px solid var(--freemom-wizard-borderColor);
    display: grid;
    grid-template-columns: clamp(1.5rem, 10%, 4rem) 1fr;
    gap: 1rem;
    background-image: radial-gradient(circle at -50px -50px, var(--accent-color), transparent 150px);
}

.finishCTAs__entry:hover {
    outline-color: var(--freemom-wizard-borderColor--alt);
}

.finishCTAs__entry .icon {
    font-size: 2rem;
    color: var(--icon-color);
    text-align: center;
}

.finishCTAs__entry .title {
    font-weight: bold;
    color: var(--title-color);
}

.finishCTAs__entry .description {
    font-size: 0.875rem;
}

.finishCTAs__entry--login {
    --accent-color: var(--freemom-color-teal);
    --icon-color: var(--freemom-color-teal);
    --title-color: var(--freemom-color-teal);
}

.finishCTAs__entry--contact {
    grid-column: 1 / 3;
    display: block;
    text-align: center;
    outline: none;
    background-image: none;
}

@media screen and (max-width: 767px) {
    .finishCTAs__entry--contact {
        grid-column: 1 / 2;
    }
}

.finishCTAs__entry--contact a {
    color: inherit;
    font-weight: bold;
    text-decoration: underline;
}

/*************************************/
/* Post wizard auf volle Höhe setzen */
/*************************************/
.slideout-panel, .body-container {
    height: 100dvh;
}

.main-content-wrapper {
    flex-grow: 1;
    height: 500px; /* man braucht height, sonst funktioniert nicht */
}

.grid-container.main-content,
.main-content > [role="main"] {
    height: 100%;
}

body .posting-wizard {
    padding-top: 0;
    height: 100%;
}

body [data-name="posting-wizard-chat"] {
    padding-top: calc(var(--qui-nav-height) + 10px + 4rem); /* 4rem --> etwas mehr Abstand zur Navigation*/
    background-image: radial-gradient(circle at 40% 50%, rgb(133 93 205 / 20%), transparent 30%), radial-gradient(circle at 60% 70%, rgb(73 153 153 / 20%), transparent 25%), radial-gradient(circle at 65% 40%, rgb(239 127 114 / 20%), transparent 40%);
    background-size: 60rem 60vh;
    background-repeat: no-repeat;
    background-position: top center;
}

@media screen and (max-width: 767px) {
    body [data-name="posting-wizard-chat"] {
        background-image: radial-gradient(circle at 40% 40%, rgb(133 93 205 / 20%), transparent 30%), radial-gradient(circle at 60% 50%, rgb(73 153 153 / 20%), transparent 25%), radial-gradient(circle at 65% 0%, rgb(239 127 114 / 20%), transparent 40%);
        background-size: 60rem 50vh;
    }
}

/*  */
.grid-container.main-content {
    max-width: 100%;
    padding-inline: 0;
}

body .posting-wizard {
    padding-inline: 0;
}

body .posting-wizard-formWrapper,
body .posting-wizard-footer {
    padding-inline: 1rem;
}

body .posting-wizard-prompts,
body .posting-wizard-formWrapper,
body .posting-wizard-footer {
    max-width: var(--max-container-width);
    margin-inline: auto;
    width: 100%;
}

body [data-name="posting-wizard-chat"] {
    /*overflow: initial;*/
    /*padding: 0;*/
}

body .posting-wizard-chat-inner {
    max-width: var(--max-container-width);
    margin-inline: auto;
    width: 100%;
}

/***********/
/* Preview */
/***********/
.message--preview .message__content h1,
.message--preview .message__content h2 {
    margin-bottom: 0.5em;
    font-weight: bold;
}

.message--preview .message__content h1 {
    font-size: 1.45rem;
}

.message--preview .message__content h2 {
    font-size: 1.25rem;
    margin-top: 1rem;
}

.message--preview .message__content h3 {
    font-size: 1.125rem;
    margin-top: 1rem;
}

.message--preview .message__content ul {
    list-style-type: none;
    margin-left: 2rem;
    padding-left: 0;
}

.message--preview .message__content li {
    padding: 0;
    position: relative;
}

.message--preview .message__content li:before {
    content: "\f00c";
    font-size: 1em;
    line-height: 1;
    font-family: 'FontAwesome';
    left: -1.5rem;
    position: absolute;
    color: var(--qui-color-primary);
    top: 0.4em;
}
