* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

#chat-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; }
#chat-container.chat-minimized #chat-window { display: none; }
#chat-container.chat-minimized #chat-toggle { display: flex; }
#chat-container:not(.chat-minimized) #chat-toggle { display: none; }

#chat-toggle {
    width: 76px; height: 76px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, #006064, #00bcd4); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 28px rgba(0, 96, 100, 0.35);
    padding: 4px;
    animation: chat-float 2.8s ease-in-out infinite;
}
#chat-toggle:hover { transform: translateY(-2px) scale(1.03); }

.chat-logo-ring {
    width: 68px; height: 68px; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    box-shadow: inset 0 0 0 3px rgba(255,255,255,0.55);
}
.chat-logo-video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

@keyframes chat-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

#chat-window {
    width: 360px; height: 500px; background: #fff; border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 96, 100, 0.22);
    display: flex; flex-direction: column; overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #006064, #00838f, #00bcd4); color: #fff; padding: 12px 16px;
    font-weight: 600; font-size: 15px;
    display: flex; justify-content: space-between; align-items: center;
}
.chat-header-brand { display: flex; align-items: center; gap: 10px; }
.chat-header-logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #fff; }
.chat-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }

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

.chat-msg {
    max-width: 85%; padding: 10px 14px; border-radius: 12px;
    font-size: 14px; line-height: 1.4; word-wrap: break-word;
}
.chat-bot { background: #f0f2f5; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-user { background: #00838f; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat-chip {
    padding: 6px 12px; border-radius: 16px; border: 1px solid #d9d9d9;
    background: #fff; font-size: 13px; cursor: pointer; color: #333;
}
.chat-chip:hover { background: #e0f7fa; border-color: #00acc1; }

.chat-footer { border-top: 1px solid #eee; padding: 8px 12px; }
.chat-book-btn {
    display: block; text-align: center; padding: 8px; margin-bottom: 8px;
    background: #00acc1; color: #fff; border-radius: 8px;
    text-decoration: none; font-weight: 600; font-size: 14px;
}
.chat-book-btn:hover { background: #00838f; }

.chat-input-row { display: flex; gap: 8px; }
#chat-input {
    flex: 1; padding: 10px 14px; border: 1px solid #d9d9d9;
    border-radius: 20px; font-size: 14px; outline: none;
}
#chat-input:focus { border-color: #00acc1; }
#chat-send {
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: #00acc1; color: #fff; font-size: 16px; cursor: pointer;
}
#chat-send:hover { background: #00838f; }

@media (max-width: 480px) {
    #chat-container {
        right: clamp(8px, 3vw, 20px);
        bottom: clamp(8px, 3vw, 20px);
    }
    #chat-window {
        width: clamp(300px, 86vw, 360px);
        height: clamp(460px, 73vh, 640px);
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 64px);
        border-radius: clamp(12px, 4vw, 18px);
    }
    #chat-messages { padding: clamp(10px, 3vw, 16px); }
    .chat-header { padding: 10px 14px; }
}

@media (max-width: 360px), (max-height: 700px) {
    #chat-window {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 56px);
    }
    .chat-msg { font-size: 13px; padding: 8px 10px; }
    .chat-chip { font-size: 12px; padding: 6px 10px; }
}
