@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

#chatbot-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
}

.chat-float-btn {
    position: fixed;
    right: 10px;
    bottom: 20px;
    z-index: 9999;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
    outline: none;
    pointer-events: auto;
    max-width: calc(100vw - 20px);
}

.chat-float-btn img {
    width: clamp(70px, 20vw, 150px);
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
    display: block;
}

#chat-modal {
    position: fixed;
    right: 10px;
    bottom: 90px;
    width: min(360px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    height: min(520px, calc(100vh - 120px));
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(2,6,23,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    font-family: 'Montserrat', sans-serif;
    pointer-events: auto;
}

#chat-modal.open { display: flex; }

#chat-modal header {
    background: #602b82;
    color: white;
    padding: 10px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}

#chat-modal header .title { font-weight:700; font-size:0.95rem; }

#chat-modal .close-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.95);
    font-size: 18px;
    cursor:pointer;
}


#chat-panel { 
    display: flex;
    flex-direction: column;
    flex: 1; 
    overflow: hidden; 
}

#chat-window {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    display:flex;
    flex-direction:column;
    gap:8px;
    background: #f7f8fb;
}

.message {
    padding: 8px 12px;
    border-radius: 16px;
    max-width: 80%;
    line-height: 1.4;
    font-size: 14px;
    word-wrap: break-word;
}

.user-message {
    background-color: #602b82;
    color: white;
    align-self:flex-end;
    border-bottom-right-radius:4px;
}

.bot-message {
    background-color: #602b82;
    color: #ffffff;
    align-self:flex-start;
    border-bottom-left-radius:4px;
}

#input-container {
    display:flex;
    gap:8px;
    padding:10px;
    border-top:1px solid #eee;
    background:white;
}

#user-input {
    flex-grow:1;
    padding:8px 12px;
    border-radius:20px;
    border:1px solid #ddd;
    outline:none;
    font-size:14px;
}

#send-btn {
    width:40px;
    height:40px;
    border-radius:50%;
    border:none;
    background:#602b82;
    color:white;
    cursor:pointer;
    font-size:16px;
}


.options-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    margin-top: 8px;
}

.option-button {
    background-color: #fff;
    border: 1px solid #602b82;
    color: #602b82;
    padding: 10px 14px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    transition: background-color 0.2s, color 0.2s;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.option-button:hover {
    background-color: #602b82;
    color: #fff;
}

@media (max-width: 640px) {
    #chat-modal {
        right: 8px;
        bottom: 85px;
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
    }
    
    .chat-float-btn {
        right: 8px;
        bottom: 12px;
    }
}

@media (max-width: 480px) {
    .chat-float-btn {
        right: 8px;
        bottom: 10px;
    }

    .chat-float-btn img {
        width: clamp(60px, 18vw, 100px);
        max-width: calc(100vw - 16px);
    }

    #chat-modal {
        left: 8px;
        right: 8px;
        bottom: 75px;
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        height: min(75vh, 480px);
    }
    
    #chat-window {
        padding: 8px;
        gap: 6px;
    }
    
    .message {
        padding: 7px 10px;
        font-size: 13px;
        max-width: 85%;
    }
    
    #chat-modal header {
        padding: 8px 10px;
    }
    
    #chat-modal header .title {
        font-size: 0.9rem;
    }
    
    .options-container {
        gap: 6px;
    }
    
    .option-button {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 38px;
    }
}