:root {
    --gdchat-main: #0b2a4a;
    --gdchat-bg: #f4f7f9;
    --gdchat-text: #1a202c;
    --gdchat-radius: 16px;
    --gdchat-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.gdchat {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Bubble Trigger */
.gdchat-bubble {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    background: var(--gdchat-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    padding: 0;
}

.gdchat-bubble:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

.gdchat-bubble-dot {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Proactive Bubble */
.gdchat-bubble-text-container {
    position: absolute;
    right: 74px;
    bottom: 10px;
    pointer-events: none;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.gdchat-bubble-text {
    display: block;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #1a202c;
    padding: 11px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
}

.gdchat-bubble-text::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
}

/* Chat Panel - GLASSMORPHISM */
.gdchat-panel {
    width: 390px;
    height: 590px;
    max-height: 85vh;
    display: none;
    flex-direction: column;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    transform: translateY(40px) scale(0.92);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    position: absolute;
    bottom: 0px;
    right: 0px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.gdchat-panel.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Header */
.gdchat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--gdchat-main);
    color: #fff;
    position: relative;
}

.gdchat-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.gdchat-title {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.02em;
}

.gdchat-actions {
    display: flex;
    gap: 8px;
}

.gdchat-close, .gdchat-new {
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 12px;
    padding: 7px 11px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.gdchat-close:hover, .gdchat-new:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Messages Area */
.gdchat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: rgba(248, 250, 253, 0.4);
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Message Bubbles */
.gdchat-msg {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: gdchatFadeIn 0.4s ease-out forwards;
}

@keyframes gdchatFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.gdchat-user { align-self: flex-end; align-items: flex-end; }
.gdchat-bot { align-self: flex-start; align-items: flex-start; }

.gdchat-msg-bubble {
    padding: 14px 20px;
    padding: 11px 15px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.gdchat-user .gdchat-msg-bubble {
    background: var(--gdchat-main);
    color: #fff;
    border-bottom-right-radius: 6px;
    font-weight: 500;
}

.gdchat-bot .gdchat-msg-bubble {
    background: #fff;
    color: #2d3748;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom-left-radius: 6px;
}

.gdchat-msg-bubble strong {
    font-weight: 800;
    color: inherit;
}

.gdchat-bot .gdchat-msg-bubble a {
    color: var(--gdchat-main);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gdchat-user .gdchat-msg-bubble a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* AI Badge */
.gdchat-bot-info {
    font-size: 9px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    margin-left: 4px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.gdchat-bot-info i {
    font-size: 12px;
    color: var(--gdchat-main);
    opacity: 0.7;
}

/* Typing Indicator */
.gdchat-typing {
    display: flex;
    gap: 6px;
    padding: 8px 18px;
    align-items: center;
}

.gdchat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gdchat-main);
    opacity: 0.4;
    animation: gdchatTyping 1.4s infinite ease-in-out;
}

.gdchat-typing span:nth-child(2) { animation-delay: 0.2s; }
.gdchat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes gdchatTyping {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.4); opacity: 0.9; }
}

/* Quick Replies (Chips) */
.gdchat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 2px 0 10px 0;
    animation: gdchatFadeIn 0.5s ease-out;
}

.gdchat-chip {
    background: #fff;
    border: 1px solid var(--gdchat-main);
    color: var(--gdchat-main);
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.gdchat-chip:hover {
    background: var(--gdchat-main);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/* Footer & Input */
.gdchat-form {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.gdchat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 11px 14px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    background: #f8fafc;
    resize: none;
    max-height: 120px;
    min-height: 42px;
    line-height: 18px;
    font-family: inherit;
    box-sizing: border-box;
}

.gdchat-input:focus {
    background: #fff;
    border-color: var(--gdchat-main);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

.gdchat-send {
    background: var(--gdchat-main);
    color: #fff;
    border: none;
    border-radius: 14px;
    height: 42px;
    padding: 0 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gdchat-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gdchat-send:active { transform: scale(0.95); }

/* Responsive */
@media (max-width: 480px) {
    .gdchat { right: 14px; bottom: 14px; }
    .gdchat-panel {
        width: calc(100vw - 28px);
        height: calc(100vh - 78px);
        right: 0;
        bottom: 0;
    }
}

.gdchat-msg-img {
    max-width: 100%;
    border-radius: 16px;
    margin-top: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
