/* Live Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10001;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #b91c1c 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 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 12px 32px rgba(220, 38, 38, 0.5);
}

.chat-toggle svg {
    width: 28px;
    height: 28px;
    color: white;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #10b981;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 3px solid white;
    animation: pulse 2s infinite;
}

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

.chat-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chat-box.active {
    display: flex;
}

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

.chat-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b91c1c 100%);
    color: white;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.chat-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
}

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

.chat-header p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

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

.chat-close svg {
    width: 18px;
    height: 18px;
    color: white;
}

.chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    background: #f9fafb;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.chat-message.bot {
    align-items: flex-start;
}

.chat-message.user {
    align-items: flex-end;
}

.message-bubble {
    max-width: 75%;
    padding: 0.875rem 1.125rem;
    border-radius: 16px;
    word-wrap: break-word;
    animation: messageSlide 0.3s ease;
}

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

.chat-message.bot .message-bubble {
    background: white;
    color: var(--text-dark);
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b91c1c 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.chat-input-area {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
}

.chat-input {
    flex: 1;
    padding: 0.875rem 1.125rem;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input:focus {
    border-color: var(--primary-color);
}

.chat-input:disabled {
    background: #f9fafb;
    cursor: not-allowed;
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #b91c1c 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

.typing-indicator {
    display: flex;
    gap: 0.375rem;
    padding: 0.875rem 1.125rem;
    background: white;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    border: 1px solid #e5e7eb;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-light);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

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

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

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

@media (max-width: 768px) {
    .chat-widget {
        bottom: 1rem;
        right: 1rem;
    }
    
    .chat-box {
        width: calc(100vw - 2rem);
        max-width: 380px;
        height: 500px;
    }
}

@media (max-width: 480px) {
    .chat-box {
        width: calc(100vw - 1rem);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: -0.5rem;
    }
}

/* Full Screen Chat Modal */
.fullscreen-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    display: none;
}

.fullscreen-chat-modal.active {
    display: flex;
}

.fullscreen-chat-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.fullscreen-chat-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    display: flex;
    flex-direction: column;
    animation: slideInFullscreen 0.4s ease;
}

@keyframes slideInFullscreen {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fullscreen-chat-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b91c1c 100%);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

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

.fullscreen-chat-header .chat-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    padding: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
}

.fullscreen-chat-header h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.fullscreen-chat-header p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fullscreen-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.fullscreen-chat-close svg {
    width: 24px;
    height: 24px;
    color: white;
}

.fullscreen-chat-messages {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: #f9fafb;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(220, 38, 38, 0.05) 0%, transparent 50%);
}

.fullscreen-chat-messages .chat-message {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

.fullscreen-chat-messages .chat-message.bot {
    align-items: flex-start;
}

.fullscreen-chat-messages .chat-message.user {
    align-items: flex-end;
}

.fullscreen-chat-messages .message-bubble {
    max-width: 70%;
    padding: 1.25rem 1.5rem;
    border-radius: 24px;
    word-wrap: break-word;
    animation: messageSlideFullscreen 0.3s ease;
    font-size: 1.1rem;
    line-height: 1.6;
}

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

.fullscreen-chat-messages .chat-message.bot .message-bubble {
    background: white;
    color: var(--text-dark);
    border: 2px solid #e5e7eb;
    border-bottom-left-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fullscreen-chat-messages .chat-message.user .message-bubble {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b91c1c 100%);
    color: white;
    border-bottom-right-radius: 8px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.fullscreen-chat-input-area {
    padding: 2rem;
    background: white;
    border-top: 2px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.fullscreen-chat-input {
    flex: 1;
    padding: 1.25rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 30px;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.fullscreen-chat-input:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.fullscreen-chat-input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.7;
}

.fullscreen-chat-send-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #b91c1c 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.fullscreen-chat-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.5);
}

.fullscreen-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.fullscreen-chat-send-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Mobile Responsive for Full Screen Chat */
@media (max-width: 768px) {
    .fullscreen-chat-content {
        max-width: 100%;
    }
    
    .fullscreen-chat-header {
        padding: 1.5rem 1rem;
    }
    
    .fullscreen-chat-header .chat-logo {
        width: 50px;
        height: 50px;
    }
    
    .fullscreen-chat-header h4 {
        font-size: 1.25rem;
    }
    
    .fullscreen-chat-messages {
        padding: 1.5rem 1rem;
    }
    
    .fullscreen-chat-messages .message-bubble {
        max-width: 85%;
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }
    
    .fullscreen-chat-input-area {
        padding: 1.5rem 1rem;
    }
    
    .fullscreen-chat-input {
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }
    
    .fullscreen-chat-send-btn {
        width: 50px;
        height: 50px;
    }
    
    .fullscreen-chat-send-btn svg {
        width: 20px;
        height: 20px;
    }
}
