/*
 * Layout für den Versicherungsvergleich (iFrame-Rechner).
 * Farben und Komponenten kommen aus style.css / Bootstrap.
 */

html.check-html,
body.check-body {
    height: 100%;
}

body.check-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: #f5f7fe;
}

.check-boot {
    position: fixed;
    inset: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fe;
}

.check-boot[hidden],
.check-shell[hidden] {
    display: none !important;
}

.check-shell {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: #f5f7fe;
}

.check-split {
    display: flex;
    flex: 1;
    min-height: 0;
}

.check-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.check-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #fff;
}

.check-stage .frame {
    position: absolute;
    inset: 0;
}

.check-stage .frame-embed {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
}

.check-stage .frame-loading {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    color: #6c757d;
}

.check-stage .frame.is-loaded .frame-loading {
    display: none;
}

.check-chat-fab {
    position: fixed;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 1030;
}

.check-footer {
    flex: 0 0 auto;
}

.check-footer a {
    font-size: 13px;
}

.check-chat-log {
    min-height: 0;
    overflow-y: auto;
}

.check-chat-msg {
    max-width: 92%;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.check-chat-msg--user {
    margin-left: auto;
    background: #0d2b5c;
    color: #fff;
}

.check-chat-msg--assistant {
    background: #f0f3fa;
    color: #212529;
}

.check-chat-msg--error {
    background: #f8d7da;
    color: #842029;
}

.check-chat-form {
    flex: 0 0 auto;
}

#chat-placeholder[hidden] {
    display: none !important;
}

@media (min-width: 992px) {
    .check-chat {
        display: flex;
        flex-direction: column;
        flex: 0 0 360px;
        width: 360px;
        min-height: 0;
        background: #fff;
    }

    .check-chat .offcanvas-body {
        flex: 1 1 auto;
        min-height: 0;
    }

    .check-chat .btn-close {
        display: none;
    }
}
