/* chat.css - Premium Support Chat Widget */

.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    height: 450px;
    background-color: #12161f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
    font-family: 'Inter', sans-serif;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Collapsed state styling */
.chat-widget.collapsed {
    height: 48px;
    width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.chat-header {
    background: linear-gradient(135deg, #1f2833, #0b0c10);
    color: #fff;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.online-indicator {
    width: 8px;
    height: 8px;
    background-color: #00e676;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #00e676;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 12px #00e676; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.chat-toggle-icon {
    font-size: 14px;
    color: #ffb703;
    transition: transform 0.3s ease;
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #0f121a;
    display: flex;
    flex-direction: column;
}

/* Custom scrollbar for chat */
.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: #0f121a;
}

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

.chat-body::-webkit-scrollbar-thumb:hover {
    background: #ffb703;
}

.chat-messages-container {
    display: flex;
    flex-direction: column-reverse; /* Shows latest messages at the bottom */
    gap: 15px;
}

/* Individual message styling */
.chat-message-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.4;
    word-break: break-word;
    position: relative;
    animation: slideInMsg 0.3s ease forwards;
}

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

.chat-message-bubble.incoming {
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: #f5f5f7;
    border-top-left-radius: 2px;
}

.chat-message-bubble.outgoing {
    align-self: flex-end;
    background: linear-gradient(135deg, #ffb703, #fb8500);
    color: #0b0c10;
    font-weight: 500;
    border-top-right-radius: 2px;
}

.chat-message-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 5px;
    text-align: right;
    display: block;
}

.chat-message-bubble.outgoing .chat-message-meta {
    color: rgba(11, 12, 16, 0.6);
}

.chat-footer {
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    background-color: #12161f;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-footer input {
    flex-grow: 1;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.chat-footer input:focus {
    outline: none;
    border-color: #ffb703;
    box-shadow: 0 0 8px rgba(255, 183, 3, 0.2);
}

.chat-footer button {
    background-color: #ffb703;
    color: #0b0c10;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.chat-footer button:hover {
    background-color: #fb8500;
    transform: scale(1.05);
}
