/* Chat Widget Styles */
.chat-widget-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5);
}

.chat-toggle-icon {
    font-size: 28px;
}

.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    border: 3px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 520px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

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

.chat-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chat-header-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.chat-header-text p {
    font-size: 13px;
    opacity: 0.9;
    margin: 2px 0 0;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chat-close:hover {
    opacity: 1;
}

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

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    animation: messageSlide 0.3s ease;
}

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

.chat-message.bot {
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.urgent {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    font-weight: 500;
}

.chat-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.chat-input-container {
    display: flex;
    gap: 10px;
}

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

.chat-input:focus {
    border-color: #2563eb;
}

.chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2563eb;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-send:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chat-quick-btn {
    padding: 8px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 13px;
    color: #2563eb;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-quick-btn:hover {
    background: #2563eb;
    color: white;
}

.chat-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    width: fit-content;
}

.chat-typing-dot {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

.chat-success {
    text-align: center;
    padding: 40px 20px;
}

.chat-success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.chat-success h3 {
    color: #059669;
    font-size: 20px;
    margin-bottom: 8px;
}

.chat-success p {
    color: #6b7280;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chat-widget-container {
        bottom: 16px;
        right: 16px;
    }
    
    .chat-window {
        width: calc(100vw - 32px);
        height: 460px;
        right: 0;
    }
}

/* Hide on very small screens in landscape */
@media (max-height: 500px) and (orientation: landscape) {
    .chat-window {
        height: 300px;
    }
}
