/* Live Chat Widget Styles */
#liveChatWidget {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 1050;
}

#liveChatToggle {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 1051;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

#liveChatToggle:hover {
    transform: scale(1.05);
}

#liveChatUnreadBadge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    min-width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Floating Chat Windows (No Modal Overlay) */
.floating-chat-window {
    position: fixed;
    bottom: 7rem;
    right: 2.5rem;
    width: 380px;
    max-width: calc(100vw - 3rem);
    z-index: 1049;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-window-content {
    display: flex;
    flex-direction: column;
    height: 500px;
    max-height: calc(100vh - 10rem);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-window-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-window-title {
    margin: 0;
    font-size: 1rem;
    flex: 1;
}

.chat-window-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-window-footer {
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
}

/* Chat Messages Container */
.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    max-height: 350px;
}

/* Initial Chat Form Styles */
#liveChatInitWindow .chat-window-body {
    padding: 1rem;
    overflow-y: auto;
}

#liveChatInitWindow .form-control,
#liveChatInitWindow .form-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

#liveChatInitWindow .form-control:focus,
#liveChatInitWindow .form-select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    box-shadow: none;
}

#liveChatInitWindow .form-select option {
    background: #2c3e50;
    color: #fff;
}

/* Chat Input Styles */
#liveChatInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

#liveChatInput:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    box-shadow: none;
}

/* Minimized Chat State */
.floating-chat-window.minimized .chat-window-body,
.floating-chat-window.minimized .chat-window-footer {
    display: none;
}

.floating-chat-window.minimized {
    height: auto;
}

/* Chat Message Styles */
.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    margin-bottom: 1rem;
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message.admin {
    align-self: flex-start;
}

.chat-message.system {
    align-self: center;
    max-width: 100%;
}

.chat-message .message-content {
    position: relative;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    word-wrap: break-word;
}

.chat-message.user .message-content {
    background: var(--bs-accent);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.chat-message.admin .message-content {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 0.25rem;
}

.chat-message.system .message-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    text-align: center;
}

.chat-message .message-time {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    opacity: 0.8;
}

.chat-message.user .message-time {
    text-align: right;
}

.chat-message.admin .message-time {
    text-align: left;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.typing-indicator .dots {
    display: flex;
    gap: 0.25rem;
}

.typing-indicator .dots span {
    width: 0.5rem;
    height: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator .dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator .dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 576px) {
    .floating-chat-window {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 6rem;
    }
    
    #liveChatToggle {
        bottom: 2rem;
        right: 2rem;
    }
    
    .chat-message {
        max-width: 95%;
    }
} 