﻿:root {
    --dss-blue: #000F55;
    --dss-red: #FF2846;
    --dss-light-blue: #c7e5ff;
    --dss-light-grey: #f5f0f0;
    --dss-dark-grey: #e0dcdc;
    --dss-pink: #ffd1e0;
    --dss-black: #333333;
    --dss-white: #ffff;
    --dss-primacare-grey: #e8e8e8;
    --dss-primacare-dark-grey: #a7a7a7;
    --dss-primacare-dark-green: #8ac0c4;
    --dss-primacare-green: #b5d6d9;
    --dss-primacare-light-green: #d3e7e9;
    --dss-runa-orange: #ff4d1d;
    --dss-lb-blue: #78a8c4;
    --dss-sampension-blue: #54a8d1;
    --dss-ap-orange: #FF4D1D;
    --dss-topdanmark-blue: #131947;
    --dss-velliv-blue: #006E64;
    --dss-velliv-orange: #FFA032;
    --dss-velliv-dark-orange: #BE6E00;
    --dss-corti-agent-message: #F2F3F6;
}

.corti-questionnaire .title-container {
    padding: 1.4rem 2rem;
    border-radius: 15px 15px 0 0;
    background-color: var(--dss-blue);
    color: var(--dss-white);
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease, margin-bottom 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
    overflow: hidden;
}

.corti-questionnaire .title {
    font-size: 2rem;
}

@media (max-width: 768px) {
    .corti-questionnaire .title-container.hidden {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
        margin-bottom: 0;
        pointer-events: none;
        padding: 0px;
    }
}

.corti-questionnaire .chat-container {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    height: 75vh;
    transition: max-height 0.3s ease;
}

@media (max-width: 768px) {
    .corti-questionnaire .chat-container {
        height: 80vh;
    }
}

@media (max-width: 768px) {
    .corti-questionnaire .chat-container.tall {
        height: 96vh;
    }
}

.corti-questionnaire .chat-window {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 0.5rem;
    margin-bottom: 1rem;
    scroll-behavior: smooth;
    flex: 1 1 auto;
    min-height: 0;
    overflow-anchor: none; /* VERY important property for the scroll behavior to work */
}

@media (max-width: 768px) {
    .corti-questionnaire .chat-window {
        padding-right: 0.3rem;
    }
}

/* In order to achieve behavior where a new message is automatically scrolled to the top of the viewport before typing begins an artificial whitespace has to be created within the flexbox */
@media (max-width: 768px) {
    .corti-questionnaire .chat-spacer {
        min-height: 70vh;
        flex-grow: 1;
    }
}

@media (min-width: 768px) {
    .corti-questionnaire .chat-spacer {
        min-height: 50vh;
        flex-grow: 1;
    }
}


/* Shared message styling */
.corti-questionnaire .message {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.45;
}

.corti-questionnaire .message p:last-child {
    margin-bottom: 0rem;
}

.corti-questionnaire .agent-message {
    background-color: var(--dss-corti-agent-message);
    align-self: flex-start;
    border-radius: 1rem 1rem 1rem 1rem; 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.corti-questionnaire .user-message {
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.25);
    align-self: flex-end;
}


/* Input area at bottom */
.corti-questionnaire .answer-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.corti-questionnaire textarea.auto-grow {
    resize: none;
    overflow: hidden;
    max-height: 40vh; 
}

.corti-questionnaire .answer-input input {
    flex: 1;
    font-size: 0.8rem;
}
.corti-questionnaire .auto-answer-container,
.corti-questionnaire .answer-input {
    flex-shrink: 0; 
}

.corti-questionnaire textarea.auto-grow:disabled {
    background-color: white;
    color: inherit;
    opacity: 1;
    cursor: default;
}

/* Auto answers */

.corti-questionnaire .auto-answer-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem; 
    scroll-behavior: smooth;
}

.corti-questionnaire .auto-answer-btn {
    flex-shrink: 0; 
    height: max-content;
    font-size: 0.8rem;
    background-color: var(--dss-white);
    color: var(--dss-blue);
    font-weight: bold;
    border-radius: 25px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--dss-dark-grey);
    box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    text-decoration: none;
}

.auto-answer-container::-webkit-scrollbar {
    height: 6px;
}

.auto-answer-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.auto-answer-container::-webkit-scrollbar {
    display: none;
}

/* END: Auto answers */

.corti-questionnaire .answer-option-btn {
    background-color: var(--dss-corti-agent-message);
    color: var(--dss-blue);
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    border: 1px solid rgba(0, 0, 0, 0.08); 
    width: fit-content;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); 
}

.corti-questionnaire .redflag-send-answer-option-btn {
    background-color: var(--dss-blue);
    color: var(--dss-corti-agent-message);
    font-weight: 600;
    border-radius: 30px;
    padding: 0.55rem 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: fit-content;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    display: block;
    margin-top: 0.5rem;
}

.corti-questionnaire .redflag-send-answer-option-btn:hover {
    background-color: #000F55;
}

.corti-questionnaire .redflag-send-answer-option-btn:active {
    transform: scale(0.97);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.corti-questionnaire .redflag-send-answer-option-btn:focus-visible {
    outline: 2px solid var(--dss-corti-agent-message);
    outline-offset: 2px;
}

.corti-questionnaire .redflag-send-answer-option-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (max-width: 768px) {
    .corti-questionnaire .redflag-send-answer-option-btn {
        font-weight: 800;
    }
}

.corti-questionnaire .answer-option-btn:disabled {
    opacity: 0.5;
    cursor: default;
}



.corti-questionnaire .corti-send-btn {
    padding: 6px 6px;
    text-decoration: none;
    cursor: pointer;
    border-radius: 24px;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
    opacity: 1;
}

.corti-questionnaire .date-option-btn {
    height: 100%;
}

.corti-questionnaire .date-wrapper{
    max-width: 250px;
}

.corti-questionnaire input[type="date"].date-picker {
    color: var(--dss-blue);
    color-scheme: light;
}

.corti-questionnaire input[type="date"].date-picker::-webkit-calendar-picker-indicator {
    filter: invert(6%) sepia(100%) saturate(8000%) hue-rotate(238deg) brightness(68%) contrast(133%);
}

.corti-questionnaire .date-picker {
    width: fit-content;
    min-width: 20ch;
}

.corti-questionnaire .answer-option-btn:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.corti-questionnaire .answer-option-btn:active {
    transform: scale(0.97);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.corti-questionnaire .answer-option-btn:focus-visible {
    outline: 2px solid var(--dss-blue);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .corti-questionnaire .answer-option-btn {
        font-weight: 800;
        background-color: rgba(0, 0, 0, 0.04);
    }
}

.corti-questionnaire .answer-option-btn.selected {
    background-color: #000F55;
    color: var(--dss-white);
}

/* END: Answer option button */

.corti-questionnaire .date-picker {
    min-height: 100%;
}

.corti-questionnaire .form-control:focus {
    border-color: var(--dss-blue);
    box-shadow: var(--dss-blue);
}

.corti-questionnaire .claim-redirect-link {
    color: var(--dss-blue);
    text-decoration: none;
    font-weight: 800;
}

.corti-questionnaire .thinking-indicator {
    display: flex;
    gap: 6px;
    padding: 10px;
    margin: 10px 0;
    align-items: center;
    justify-content: flex-start;
}

.corti-questionnaire .thinking-indicator .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dss-blue);
    animation: bounce 1.4s infinite ease-in-out both;
}

.corti-questionnaire .thinking-indicator .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.corti-questionnaire .thinking-indicator .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Upload Files Shared */

.corti-questionnaire .upload-btn {
    background-color: var(--dss-blue);
    color: var(--dss-white);
    font-weight: 400;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 15, 85, 0.25);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.corti-questionnaire .upload-btn:hover {
    background-color: var(--dss-topdanmark-blue);
    box-shadow: 0 4px 10px rgba(0, 15, 85, 0.35);
}

.corti-questionnaire .upload-btn:active {
    transform: scale(0.97);
    box-shadow: 0 1px 3px rgba(0, 15, 85, 0.2);
}

.corti-questionnaire .upload-btn:focus-visible {
    outline: 2px solid var(--dss-light-blue);
    outline-offset: 2px;
}

.corti-questionnaire .upload-file-list {
    margin-top: 0.75rem;
    padding-left: 0;
    list-style: none;
    margin-bottom: 0.4rem;
}

.corti-questionnaire .upload-file-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.4rem;
}

.corti-questionnaire .upload-file-list .file-size {
    color: var(--dss-primacare-dark-grey);
}

.corti-questionnaire .upload-file-list button {
    margin-left: auto;
    background: none;
    border: none;
    color: currentColor;
    background-color: rgba(0, 0, 0, 0.06);
    font-weight: bold;
    cursor: pointer;
}

.corti-questionnaire .upload-referral-title {
    font-size: 18px;
    text-align: center;
}


.corti-questionnaire .upload-file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.corti-questionnaire .uploaded-file-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.corti-questionnaire .uploaded-file-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.25);
    padding: 0.6rem 0.8rem;
}

.corti-questionnaire .file-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    flex-shrink: 0;
}

.corti-questionnaire .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.7rem;
    border-radius: 2rem;
}

.corti-questionnaire .file-info {
    display: flex;
    flex-direction: column;
}

.corti-questionnaire .file-main-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.corti-questionnaire .file-name {
    font-weight: 600;
    text-decoration: underline;
}

.corti-questionnaire .file-size {
    color: rgba(0, 0, 0, 0.55);
    font-size: 0.85em;
}

.corti-questionnaire .upload-status {
    font-size: 0.75rem;
    color: #2e7d32; 
    margin-top: 0.15rem;
}

/* Upload file desktop */

.corti-questionnaire .agent-message:has(.upload-referral-question){
    background: none;
    border: 1px solid var(--dss-dark-grey);
    width: 80%;
}

.corti-questionnaire .upload-referral-inner-box {
    padding: 3rem 1.5rem 1.5rem 1.5rem; 
    background-color: var(--dss-corti-agent-message);
    border: 2px dotted;
    border-radius: 1rem;
    border-color: var(--dss-dark-grey);
    flex-direction: column; 
    justify-content: center;
    align-items: center; 
    text-align: center; 
    height: 100%; 
}

/* Upload file mobile */

.corti-questionnaire .upload-desktop {
    display: flex;
}

.corti-questionnaire .upload-mobile {
    display: none;
}

@media (max-width: 768px) {

    .corti-questionnaire .upload-desktop {
        display: none;
    }

    .corti-questionnaire .upload-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .corti-questionnaire .upload-referral-title {
        display: none;
    }

    .corti-questionnaire .upload-referral-text-mobile {
        margin-bottom: 0.5rem;
    }

    .corti-questionnaire .agent-message:has(.upload-referral-question) {
        background: var(--dss-corti-agent-message);
        border: 2px dotted;
        border-radius: 1rem;
        border-color: var(--dss-dark-grey);
    }

    .corti-questionnaire .upload-referral-inner-box {
        border: none;
    }
}

.corti-questionnaire .image-thumbnail {
    width: auto;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #dee2e6;
    max-height: 300px;
    max-width: 500px;
}

@media (max-width: 768px) {
    .corti-questionnaire .image-thumbnail {
        max-height: 200px;
        max-width: 200px;
    }
}

.corti-questionnaire .upload-referral-inner-box.drag-over {
    border: 2px dashed #0078d4;
    background-color: rgba(0, 120, 212, 0.05);
}

.corti-questionnaire .help-btn {
    font-size: 0.8rem;
    color: var(--dss-blue);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    display: flex;
    justify-content: flex-end;
}

.corti-questionnaire .help-pop-up-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.corti-questionnaire .help-pop-up {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 680px;
    width: 90%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    max-height: 80vh;
    overflow-y: auto;
}

.corti-questionnaire .help-pop-up-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: inherit;
    line-height: 1;
}

.corti-questionnaire .help-pop-up img,
.corti-questionnaire .help-pop-up video,
.corti-questionnaire .help-pop-up iframe {
    max-width: 100%;
    height: auto;
}

.corti-questionnaire .consent-info-btn{
    cursor: pointer;
    color: var(--dss-blue);
    text-decoration: underline; 
}

.corti-questionnaire .skip-file-btn {
    background-color: var(--dss-white);
    font-weight: 700;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: 1px solid var(--dss-dark-grey);
    box-shadow: 0 2px 6px rgba(0, 15, 85, 0.1);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.corti-questionnaire .skip-file-btn:hover {
    background-color: var(--dss-white);
    box-shadow: 0 4px 10px rgba(0, 15, 85, 0.15);
}