.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    font-family: "Montserrat", Arial, sans-serif;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #d4b06a, #b8923f);
    box-shadow: 0 12px 28px rgba(31, 42, 99, 0.35);
    cursor: pointer;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.chat-toggle:hover { transform: scale(1.06); }

.chat-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 460px;
    max-height: 70vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ece7db;
}

.chat-panel.open { display: flex; }

.chat-panel-header {
    background: #1f2a63;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-panel-header img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
}

.chat-panel-header strong { display: block; font-size: 14px; }
.chat-panel-header span { font-size: 11.5px; color: #c7cbe0; }
.chat-panel-header div { flex: 1; }

.chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.8;
}
.chat-close:hover { opacity: 1; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f7f4ee;
}

.chat-bubble {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chat-bubble-bot {
    background: #ffffff;
    border: 1px solid #ece7db;
    color: #24262d;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-bubble-user {
    background: #1f2a63;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble-typing {
    color: #9a9ea6;
    font-style: italic;
}

.chat-bubble a { color: inherit; text-decoration: underline; }

.chat-form {
    display: flex;
    border-top: 1px solid #ece7db;
    padding: 10px;
    gap: 8px;
    background: #fff;
}

.chat-form input {
    flex: 1;
    border: 1px solid #ddd6c4;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13.5px;
    font-family: inherit;
}

.chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #d4b06a, #b8923f);
    color: #241c08;
    font-size: 15px;
    cursor: pointer;
}

@media (max-width: 480px) {
    .chat-widget { right: 14px; bottom: 14px; }
    .chat-panel { width: calc(100vw - 28px); }
}
