
/* Small toggle square */
#chatToggle {
    position: fixed;
    right: 0;
    top: 60%;
    width: 45px;
    height: 45px;
    background: #286090;
    border:1px solid #204d74;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s;
    background-image: url("images/infox.png");
    background-size: 100%;
}
#chatToggle:hover { transform: scale(1.1); }

/* Chat window */
#chatWindow {
    position: fixed;
    right: 0;
    top: 20%;
    width: 550px;
    height: 50%; /* fixed height for desktop */
    min-height: 360px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.chatWindowFullScreen {
    width:100%;
    height:80%;
}

/* Full screen on mobile */
@media(max-width: 600px) {
    #chatWindow {
        width: 100%;
        height: 100%;
        top: 0;
        right: 0;
        border-radius: 0;
    }
}

/* Header with close button */
#chatHeader {
    background: #286090;
    border:1px solid #204d74;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatHeaderIcon {
    width:28px;
    height:28px;
}

#chatHeaderButtons {
    display: flex;
    gap: 6px;
}

#chatHeaderButtons button {
    background: transparent;
    border: 1px solid cornflowerblue !important;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

/* Scrollable content area */
#chatHistory {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #f5f5f5;
}

/* Input area */
#chatInputArea {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
    background: #eee;
}
#chatInput {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
#chatSend {
    margin-left: 8px;
    padding: 8px 12px;
    border: none;
    background: #286090;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

/* Smooth fade in/out */
#chatWindow.show {
    opacity: 1;
    visibility: visible;
}

#chatToggle.show {
    opacity: 1;
    visibility: visible;
}

#chatWindow.chatWindowFullScreen {
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
}