/* UNIQ Support Chat - Unified Project Style */
.support-chat-wrapper {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    font-family: 'Outfit', sans-serif;
}

.chat-trigger {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: #ffffff;
    color: #000000;
    border: none;
    box-shadow: 0 10px 40px -10px rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-trigger:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 50px -10px rgba(255, 255, 255, 0.5);
}

.chat-trigger.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8) translateY(20px);
}

.chat-window {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24rem;
    height: 36rem;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.9);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.chat-avatar {
    width: 2.75rem;
    height: 2.75rem;
    background: white;
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
}

.chat-header h4 {
    font-weight: 800;
    font-size: 1rem;
    margin: 0;
    letter-spacing: -0.02em;
    color: white;
}

.chat-status {
    font-size: 0.65rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.15rem;
}

.chat-status::before {
    content: '';
    width: 5px;
    height: 5px;
    background: currentColor;
    border-radius: 50%;
    animation: glow 2s infinite ease-in-out;
}

@keyframes glow {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.close-chat {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #a1a1aa;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-chat:hover {
    background: #ffffff;
    color: #000000;
    transform: rotate(90deg);
}

.chat-messages {
    flex: 1;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-behavior: smooth;
}

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

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.message {
    max-width: 85%;
    padding: 1rem 1.25rem;
    border-radius: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    animation: messageIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.message.bot {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e4e4e7;
    align-self: flex-start;
    border-bottom-left-radius: 0.4rem;
}

.message.user {
    background: #ffffff;
    color: #000000;
    align-self: flex-end;
    border-bottom-right-radius: 0.4rem;
    font-weight: 600;
    box-shadow: 0 10px 30px -10px rgba(255, 255, 255, 0.3);
}

.message a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 700;
}

.message-image {
    max-width: 100%;
    border-radius: 1rem;
    margin-bottom: 0.75rem;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-preview-container {
    padding: 1rem 1.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: none;
    position: relative;
    gap: 1rem;
    align-items: center;
}

.image-preview-container.active {
    display: flex;
}

.image-preview-container img {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    object-fit: cover;
    border: 2px solid white;
}

#removeImage {
    position: absolute;
    top: 0.5rem;
    left: 4.5rem;
    background: #000000;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.typing-indicator {
    padding: 0.5rem 2rem;
    display: none;
    gap: 6px;
}

.typing-indicator span {
    width: 5px;
    height: 5px;
    background: #a1a1aa;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

.chat-footer {
    padding: 1.5rem;
    background: rgba(9, 9, 11, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 0.625rem;
    transition: all 0.3s;
}

.chat-input-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

.attach-btn {
    background: none;
    border: none;
    color: #a1a1aa;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.attach-btn:hover {
    color: white;
}

#chatInput {
    flex: 1;
    background: none;
    border: none;
    color: white;
    padding: 0 0.5rem;
    font-size: 0.9rem;
    outline: none;
    font-weight: 500;
}

#chatInput::placeholder {
    color: #52525b;
}

.send-message {
    width: 2.5rem;
    height: 2.5rem;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.send-message:hover {
    transform: scale(1.05);
    background: #f4f4f5;
}

@media (max-width: 768px) {
    .support-chat-wrapper {
        bottom: 1rem;
        right: 1rem;
    }

    .chat-window {
        position: fixed;
        bottom: 0px;
        right: 0px;
        width: 100%;
        height: 100%;
        border-radius: 0;
        z-index: 2000;
    }

    .chat-trigger {
        width: 3.25rem;
        height: 3.25rem;
    }
}