﻿.page-hint {
    color: rgba(255,255,255,0.2);
    font-size: 14px;
    font-family: 'DM Mono', monospace;
    user-select: none;
}

/* ── Floating toggle button ── */
#chatToggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4f94e8, #2e8cff);
    color: #0b1222;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(79, 148, 232, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1000;
}

    #chatToggle:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 10px 30px rgba(79, 148, 232, 0.55);
    }

    #chatToggle svg {
        transition: transform 0.3s ease, opacity 0.2s ease;
    }

    #chatToggle .icon-close {
        position: absolute;
        opacity: 0;
        transform: rotate(-90deg) scale(0.7);
    }

    #chatToggle.open .icon-chat {
        opacity: 0;
        transform: rotate(90deg) scale(0.7);
    }

    #chatToggle.open .icon-close {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }

/* Unread badge */
#chatBadge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff4f6b;
    border: 2px solid #090c12;
    display: none;
}

    #chatBadge.visible {
        display: block;
    }

/* ── Chat window ── */
#chatWindow {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 340px;
    height: 500px;
    background: #141820;
    border-radius: 16px;
    border: 1px solid rgba(79, 148, 232, 0.2);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
    transform-origin: bottom right;
    /* closed state */
    opacity: 0;
    transform: scale(0.85) translateY(16px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

    #chatWindow.open {
        opacity: 1;
        transform: scale(1) translateY(0);
        pointer-events: all;
    }

/* Header */
.chat-header {
    padding: 14px 18px;
    background: rgba(79, 148, 232, 0.08);
    border-bottom: 1px solid rgba(79, 148, 232, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.chat-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f94e8, #2e8cff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #0b1222;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
    flex-shrink: 0;
}

.chat-header-info {
    flex: 1;
}

.chat-header-name {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #e8ecf5;
}

.chat-header-status {
    font-size: 11px;
    color: #7bd4a2;
    font-family: 'DM Mono', monospace;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7bd4a2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .chat-messages::-webkit-scrollbar {
        width: 4px;
    }

    .chat-messages::-webkit-scrollbar-track {
        background: transparent;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: rgba(79, 148, 232, 0.3);
        border-radius: 999px;
    }

.msg {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    animation: msgIn 0.2s ease both;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg.bot {
    align-self: flex-start;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e8ecf5;
    border-bottom-left-radius: 4px;
}

.msg.user {
    align-self: flex-end;
    background: rgba(79, 148, 232, 0.18);
    border: 1px solid rgba(79, 148, 232, 0.25);
    color: #d6eaff;
    border-bottom-right-radius: 4px;
}

.msg-meta {
    font-size: 10px;
    margin-top: 4px;
    font-family: 'DM Mono', monospace;
    opacity: 0.45;
    text-align: right;
}

.msg.bot .msg-meta {
    text-align: left;
}

/* Typing indicator */
.typing-indicator {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8b95b0;
    animation: bounce 1.2s infinite;
}

    .typing-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-5px);
    }
}

/* Input area */
.chat-input-area {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.15);
}

    .chat-input-area input {
        flex: 1;
        padding: 9px 14px;
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,0.12);
        background: rgba(255,255,255,0.05);
        color: whitesmoke;
        font-size: 13px;
        font-family: 'Instrument Sans', sans-serif;
        outline: none;
        transition: border 0.2s ease, box-shadow 0.2s ease;
    }

        .chat-input-area input:focus {
            border-color: #4f94e8;
            box-shadow: 0 0 0 3px rgba(79, 148, 232, 0.15);
        }

        .chat-input-area input::placeholder {
            color: rgba(255,255,255,0.25);
        }

    .chat-input-area button {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: linear-gradient(135deg, #4f94e8, #2e8cff);
        color: #0b1222;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

        .chat-input-area button:hover {
            transform: scale(1.08);
            box-shadow: 0 4px 14px rgba(79, 148, 232, 0.4);
        }
