/* Live Chat Widget - Uttishta */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    font-family: var(--font-family, 'Urbanist', sans-serif);
}

.chat-widget-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.chat-widget-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
}

.chat-widget-toggle .chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-widget-toggle .chat-badge.hidden {
    display: none;
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 480px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-widget.open .chat-window {
    display: flex;
}

.chat-header {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.chat-status {
    font-size: 0.75rem;
    opacity: 0.95;
}

.chat-status .fa-circle {
    font-size: 0.5rem;
    color: #86efac;
    margin-right: 4px;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.chat-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(255,255,255,0.3);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-welcome {
    background: #e0e7ff;
    color: #3730a3;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.chat-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-msg.admin {
    align-self: flex-start;
    background: #fff;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.chat-msg-time {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 4px;
}

.chat-input-area {
    padding: 12px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: #3b82f6;
}

.chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s, opacity 0.2s;
}

.chat-send:hover {
    transform: scale(1.05);
}

.chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 480px) {
    .chat-widget {
        bottom: 16px;
        right: 16px;
    }
    .chat-window {
        width: calc(100vw - 32px);
        height: 70vh;
        bottom: 64px;
    }
}
