/* ==========================================
   YUCATAN PROPERTIES - CHATBOT
   ========================================== */

#yp-chat-button {
    position: fixed;
    right: 25px;
    top: 25px;
    bottom: auto;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: #245b80;
    color: #fff;
    font-size: 27px;
    cursor: pointer;
    z-index: 99999;
    box-shadow: 0 3px 12px rgba(0,0,0,.25);
}

#yp-chat-button:hover {
    background: #194663;
}

#yp-chat-window {
    display: none;
    position: fixed;
    right: 25px;
    top: 100px;
    bottom: auto;
    width: 360px;
    max-width: calc(100vw - 30px);
    height: 500px;
    max-height: calc(100vh - 130px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,.25);
    z-index: 99999;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

#yp-chat-window.yp-chat-open {
    display: flex;
    flex-direction: column;
}

#yp-chat-header {
    background: #245b80;
    color: #fff;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#yp-chat-header strong {
    font-size: 16px;
}

#yp-chat-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
    line-height: 1;
}

#yp-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f5f7f9;
}

.yp-chat-message {
    margin-bottom: 12px;
    padding: 11px 13px;
    border-radius: 10px;
    max-width: 90%;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.yp-chat-bot {
    background: #fff;
    color: #333;
    border: 1px solid #e2e6e9;
    margin-right: auto;
}

.yp-chat-user {
    background: #245b80;
    color: #fff;
    margin-left: auto;
}

.yp-chat-loading {
    color: #777;
    font-style: italic;
}

#yp-chat-footer {
    display: flex;
    padding: 12px;
    gap: 8px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
}

#yp-chat-input {
    flex: 1;
    min-width: 0;
    resize: none;
    height: 42px;
    max-height: 90px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    outline: none;
}

#yp-chat-input:focus {
    border-color: #245b80;
}

#yp-chat-send {
    width: 45px;
    border: none;
    border-radius: 6px;
    background: #245b80;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

#yp-chat-send:disabled {
    opacity: .5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    #yp-chat-button {
        right: 15px;
        top: 15px;
        bottom: auto;
    }
    
    #yp-chat-window {
        right: 10px;
        top: 85px;
        bottom: auto;
    }
}