.chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    font-family: "Plus Jakarta Sans", "Space Grotesk", "Inter", sans-serif;
}

.chat-toggle {
    background: #111a2b;
    color: #e6edf7;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

.chat-panel {
    position: absolute;
    right: 0;
    bottom: 60px;
    width: 320px;
    max-height: 480px;
    display: flex;
    flex-direction: column;
    background: #111a2b;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    border: 1px solid rgba(184, 198, 220, 0.18);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-panel.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-header {
    padding: 0.9rem 1rem;
    background: #080d18;
    color: #e6edf7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h4 {
    margin: 0;
    font-size: 0.95rem;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.chat-new-chat {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.chat-new-chat:hover {
    background: rgba(255, 255, 255, 0.22);
}

.chat-close {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.chat-messages {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    background: #0b1220;
}

.chat-message {
    max-width: 85%;
    padding: 0.6rem 0.8rem;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-message.user {
    align-self: flex-end;
    background: #1e2b44;
    color: #e6edf7;
}

.chat-message.bot {
    align-self: flex-start;
    background: #1a2438;
    color: #dbe7fa;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem;
    border-top: 1px solid rgba(184, 198, 220, 0.14);
    background: #111a2b;
}

.chat-input input {
    flex: 1;
    border: 1px solid rgba(184, 198, 220, 0.25);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
    background: #0b1220;
    color: #e6edf7;
}

.chat-input button {
    border: none;
    background: #1e2b44;
    color: #e6edf7;
    border-radius: 10px;
    padding: 0 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 600px) {
    .chat-panel {
        width: min(92vw, 360px);
        right: -6px;
    }
}
