﻿.blurred {
    filter: blur(5px);
    pointer-events: none;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 550px;
    height: 350px;
    background: white;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: none;
}

    .popup.active {
        display: inline-grid;
        animation: fadeIn 0.3s ease-in-out;
    }

.popup-header {
    font-weight: bold;
    font-size: 22px;
    color: #333;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 22px;
    color: #888;
}

    .close-btn:hover {
        color: #333;
    }

.warning-btn {
    float: right;
    width: 180px;
    height: 50px;
    font-size: 18px;
}

.chat-header-controls {
    display: flex;
    align-items: center;
}

.header-btn.expand-btn {
    margin-right: 4px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    transition: background 0.2s, color 0.2s;
}
.header-btn.expand-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #eee;
}

.chat-header-controls .close-btn {
    margin-left: 8px;
    position: static;
    top: auto;
    right: auto;
    width: 28px;
    height: 28px;
    font-size: 22px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    color: #fff !important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    line-height: initial !important;
    font-weight: normal !important;
}

.chat-header-controls .close-btn:hover {
    background: rgba(255,255,255,0.15) !important;
    color: #eee !important;
}

.chat-container {
    width: 30vw;
    height: 60vh;
    max-width: 90vw;
    max-height: 90vh;
    min-width: 280px;
    min-height: 250px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    bottom: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
}

.chat-header {
    background: #6b46c1;
    color: white;
    padding: 10px 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    height: 45px;
}

.chat-header-icon-container {
    background: white;
    color: #6b46c1;
    border: none;
    margin-right: 15px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.chat-header svg {
    width: 14px;
    height: 14px;
}

.chat-header span.header-title {
    font-size: clamp(14px, 1.2vw, 1.125rem);
}

.chat-header span:not(.header-title) {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    line-height: 1.25rem;
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
    background: #f8f9fa;
}

.message {
    margin-bottom: 10px;
    max-width: 80%;
}

    .message.bot {
        background: #6b46c1;
        color: white;
        padding: 10px;
        border-radius: 10px;
        font-size: 0.875rem;
        line-height: 1.25rem;
        position: relative;
        margin-left: 40px;
        text-align: start;
        width: fit-content;
    }

    .message.user {
        background: #e9ecef;
        padding: 10px;
        border-radius: 10px;
        margin-left: auto;
        font-size: 0.875rem;
        line-height: 1.25rem;
        text-align: end;
        width: fit-content;
    }

.bot-icon {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 23px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #6b46c1;
    border-radius: 50%;
    padding: 5px;
}

    .bot-icon svg {
        width: 14px;
        height: 14px;
        stroke: white;
    }

.chat-input {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-top: 1px solid #dee2e6;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

    .chat-input textarea {
        flex: 1;
        border: 1px solid #ccc;
        box-shadow: none;
        transition: border 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
        border-radius: 5px;
        margin-right: 10px;
        /* font-size: 0.875rem; */
        font-size: 12px;
        line-height: 1.25rem;
        padding: 10px 15px;
        resize: none;
        min-height: 35px;
        height: 40px;
    }

        .chat-input textarea:focus {
            outline: none;
            border: 1px solid #a08cd8;
            box-shadow: 0 0 5px rgba(107, 70, 193, 0.5);
        }

        .chat-input textarea::placeholder {
            /* font-size: 0.875rem; */
            font-size: 12px;
            line-height: 1.25rem;
        }

    .chat-input button {
        background: #6b46c1;
        color: white;
        border: none;
        padding: 5px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
    }

        .chat-input button svg {
            width: 12px;
            height: 12px;
            stroke: white;
        }

        .chat-input button:hover {
            background: #553c9a;
        }

.response-message {
    font-size: 12px;
    
}

.timestamp {
    font-size: 10px;
    margin-top: 4px;
    text-align: end;
}

.typing-indicator {
    color: #666;
    font-style: italic;
    padding: 5px 15px;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #6b46c1;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

    .chat-toggle svg {
        width: 18px;
        height: 18px;
    }

.chat-expand {
    position: fixed;
    bottom: 20px;
    right: 70px;
    background: #6b46c1;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

    .chat-expand svg {
        width: 18px;
        height: 18px;
    }

.expanded-chat {
    width: 40vw;
    height: 70vh;
    max-width: 90vw;
    max-height: 90vh;
    min-width: 320px;
    min-height: 350px;
}