:root {
    --bg: #efeae2;
    --user: #dcf8c6;
    --bot: #ffffff;
    --context: #d3d3d3;
    --bar: #f0f0f0;
    --accent: #128c7e;
}

body {
    margin: 0;
    background: var(--bg);
}

#appContainer {
  position: relative;
  height: 100dvh;
}

/* Chat */
.msg {
    padding: 8px 10px;
    margin: 6px 0;
    border-radius: 7px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
}

#text {
    max-height: 100px;
    overflow-y: auto;
}

.user {
    background: var(--user);
    margin-left: auto;
    border-top-right-radius: 0;
}

.bot {
    background: var(--bot);
    margin-right: auto;
    border-top-left-radius: 0;
}

.context {
    background: var(--context);
    margin-right: auto;
    border-top-left-radius: 0;
    font-style: italic;
}

.label {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 4px;
}

.label-situation {
    background: #128c7e;
    color: white;
    margin-top: 10px;
    display: block;
    width: fit-content;
    margin-left: auto;
}

.label-context {
    background: #6c757d;
    color: white;
    margin-top: 4px;
}

.label-prompt {
    background: #0d6efd;
    color: white;
}

.prompt-indicator {
    position: fixed;
    right: 20px;
    bottom: 120px;
    font-size: 64px;
    opacity: 0.25;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.prompt-indicator.show {
    opacity: 0.6;
}

.blurred {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    transition: filter 0.3s ease;
}

/* Box for Declaration of consent and demographic input */
/* Overlay */
.overlay {
    position: absolute;
    inset: 0;

    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 15px;
    overflow-y: auto;
    z-index: 2000;
}

.overlay.tutorial {
    background: rgba(0,0,0,0.65);
    pointer-events: auto;
}

.overlay.tutorial .modal-box {
    pointer-events: auto;
}

.tooltip {
    z-index: 3000;
}

.is-invalid {
    border-color: #dc3545 !important;
}

/* highlight Explanation tutorial */
.highlight-target {
    position: relative;
    z-index: 3001;
    box-shadow: 0 0 0 6px rgba(255,255,255,0.8),
                0 0 20px rgba(0,0,0,0.4);
    border-radius: 8px;
    animation: pulseHighlight 1.4s infinite;
}

@keyframes pulseHighlight {
    0% {
        box-shadow: 0 0 0 6px rgba(255,255,255,0.8),
                    0 0 20px rgba(0,0,0,0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255,255,255,0.9),
                    0 0 28px rgba(0,0,0,0.45);
    }
    100% {
        box-shadow: 0 0 0 6px rgba(255,255,255,0.8),
                    0 0 20px rgba(0,0,0,0.4);
    }
}

/* Modal box */
.modal-box {
    display: flex;
    flex-direction: column;
    background: #fff;

    width: min(95%, 720px);
    max-height: 95dvh;

    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);

    overflow-y: auto;
}

.modal-box h5 {
    margin-bottom: 10px;
}

.modal-box p {
    font-size: 14px;
}

.modal-box .actions {
    margin-top: 15px;
    text-align: right;
}

.consent-scroll {
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 14px;

    min-height: 300px;
    max-height: 65dvh;
}

@media (max-width: 576px) {
    .overlay {
        align-items: center;
    }

    .modal-box {
        max-height: 95dvh;
        border-radius: 16px;
    }
}

