/* Futuristic Glass Morphism Chat Widget - GashoTech */
:root {
    --chat-primary: #1abc9c;
    --chat-primary-dark: #16a085;
    --chat-neon: #00ffff;
    --chat-neon-glow: rgba(0, 255, 255, 0.5);
    --chat-bg-light: rgba(255, 255, 255, 0.25);
    --chat-bg-light-solid: #ffffff;
    --chat-bg-dark: rgba(26, 26, 26, 0.85);
    --chat-bg-dark-solid: #1a1a1a;
    --chat-text-light: #333333;
    --chat-text-dark: #ffffff;
    --chat-border-light: rgba(255, 255, 255, 0.3);
    --chat-border-dark: rgba(0, 255, 255, 0.3);
    --chat-glass-bg: rgba(255, 255, 255, 0.1);
    --chat-glass-border: rgba(255, 255, 255, 0.2);
}

/* Chat Widget Container */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Lato', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Futuristic Chat Button */
.chat-button {
    position: relative;
    background: var(--chat-primary);
    color: white;
    border: 2px solid var(--chat-neon);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    cursor: pointer;
    box-shadow:
        0 0 20px var(--chat-neon-glow),
        0 0 40px var(--chat-neon-glow),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.chat-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3) 0%, transparent 70%);
    animation: rotate 4s linear infinite;
    transition: opacity 0.3s;
}

.chat-button:hover {
    transform: scale(1.15) rotate(5deg);
    background: var(--chat-primary-dark);
    box-shadow:
        0 0 30px var(--chat-neon),
        0 0 60px var(--chat-neon),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
    border-color: #00ffff;
}

.chat-button:active {
    transform: scale(0.95);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Notification badge with glow */
.chat-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite, glow 1.5s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.8);
    border: 2px solid white;
    z-index: 1;
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 51, 102, 0.8);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 51, 102, 1);
    }
}

/* Futuristic Glass Morphism Chat Window */
.chat-window {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 380px;
    max-height: 550px;
    background: var(--chat-glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 1px solid var(--chat-glass-border);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 255, 255, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

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

/* Futuristic Header */
.chat-header {
    background: var(--chat-primary);
    color: white;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

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

.chat-header-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.chat-header-text {
    display: flex;
    flex-direction: column;
}

.chat-header-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    color: white;
}

.dark-mode .chat-header-title {
    color: white;
}

.chat-header-status {
    font-size: 12px;
    opacity: 0.95;
    margin: 2px 0 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.chat-header-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    animation: statusPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px #00ff00;
}

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

.chat-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 1;
}

.chat-close:hover {
    background: rgba(255, 51, 102, 0.8);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.8);
}

/* Futuristic Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05));
    max-height: 380px;
    position: relative;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--chat-primary), var(--chat-neon));
    border-radius: 4px;
    box-shadow: 0 0 10px var(--chat-neon-glow);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--chat-neon), var(--chat-primary));
}

.chat-message {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    animation: messageSlide 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

.message-bubble {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

.chat-message.bot .message-bubble {
    background: rgba(240, 240, 240, 0.9);
    color: var(--chat-text-light);
    border-bottom-left-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chat-message.user .message-bubble {
    background: var(--chat-primary);
    color: white;
    border-bottom-right-radius: 6px;
    box-shadow:
        0 4px 15px var(--chat-neon-glow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 6px;
    font-weight: 500;
}

/* Message Reactions */
.message-reactions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-message.bot:hover .message-reactions {
    opacity: 1;
}

.reaction-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--chat-glass-border);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.reaction-btn.active {
    background: var(--chat-primary);
    border-color: var(--chat-primary);
    box-shadow: 0 0 10px var(--chat-neon-glow);
}

.dark-mode .message-reactions {
    opacity: 0.7;
}

.dark-mode .reaction-btn {
    background: rgba(61, 61, 61, 0.7);
    border-color: var(--chat-border-dark);
}

.dark-mode .reaction-btn:hover {
    background: rgba(80, 80, 80, 0.8);
}

/* Futuristic Input Area */
.chat-input-container {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--chat-glass-border);
    display: flex;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.chat-input {
    flex: 1;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid var(--chat-glass-border);
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    color: var(--chat-text-dark);
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.chat-input:focus {
    border-color: var(--chat-neon);
    box-shadow:
        0 0 15px var(--chat-neon-glow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.chat-send {
    background: var(--chat-primary);
    color: white;
    border: 2px solid var(--chat-neon);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
    box-shadow:
        0 0 15px var(--chat-neon-glow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.chat-send:hover {
    transform: scale(1.1) rotate(10deg);
    background: var(--chat-primary-dark);
    box-shadow:
        0 0 25px var(--chat-neon),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.chat-send:disabled {
    background: rgba(150, 150, 150, 0.5);
    border-color: rgba(150, 150, 150, 0.5);
    cursor: not-allowed;
    transform: scale(1);
    box-shadow: none;
}

/* Futuristic Quick Replies */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px 20px;
}

/* Guide Categories Layout */
.guide-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.guide-category {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    padding: 12px;
    border: 1px solid var(--chat-glass-border);
}

.guide-category-title {
    color: var(--chat-primary);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.guide-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.guide-topic {
    background: rgba(255, 255, 255, 0.08);
    color: var(--chat-neon);
    border: 1px solid var(--chat-neon);
    border-radius: 15px;
    padding: 8px 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.guide-topic:hover {
    background: var(--chat-primary);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 4px 12px var(--chat-neon-glow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Original Quick Reply Styles */
.quick-reply:not(.guide-topic) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--chat-neon);
    border: 1px solid var(--chat-neon);
    border-radius: 20px;
    padding: 10px 18px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.quick-reply:not(.guide-topic):hover {
    background: var(--chat-primary);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 5px 15px var(--chat-neon-glow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Dark Mode Enhancements */
.dark-mode .chat-window {
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid var(--chat-border-dark);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 255, 255, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dark-mode .chat-messages {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2));
}

.dark-mode .chat-message.bot .message-bubble {
    background: rgba(61, 61, 61, 0.9);
    color: var(--chat-text-dark);
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.dark-mode .chat-input-container {
    background: rgba(0, 0, 0, 0.3);
    border-top-color: var(--chat-border-dark);
}

.dark-mode .chat-input {
    background: rgba(61, 61, 61, 0.8);
    color: var(--chat-text-dark);
    border-color: var(--chat-border-dark);
}

.dark-mode .chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Light mode chat input fix */
.chat-input {
    color: var(--chat-text-light);
}

.chat-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.dark-mode .quick-reply {
    background: rgba(61, 61, 61, 0.8);
    color: var(--chat-neon);
    border-color: var(--chat-neon);
}

.dark-mode .quick-reply:hover {
    background: var(--chat-primary);
    color: white;
}

.dark-mode .guide-category {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--chat-border-dark);
}

.dark-mode .guide-topic {
    background: rgba(61, 61, 61, 0.7);
}

/* Welcome Message Animation */
.welcome-message {
    animation: welcomeFade 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* Futuristic Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 18px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--chat-glass-border);
    width: fit-content;
}

.typing-dot {
    width: 10px;
    height: 10px;
    background: var(--chat-neon);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
    box-shadow: 0 0 10px var(--chat-neon-glow);
}

.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);
        opacity: 1;
    }
    30% {
        transform: translateY(-15px);
        opacity: 0.8;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 20px);
        height: 65vh;
        bottom: 80px;
        right: 10px;
    }

    .chat-button {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .chat-header-title {
        font-size: 14px;
    }

    .message-bubble {
        max-width: 90%;
    }

    .guide-topics {
        flex-direction: column;
    }

    .guide-topic {
        width: 100%;
        text-align: center;
    }
}

/* Extra glow effect for premium feel */
.chat-window::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid var(--chat-neon);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.chat-window.active::after {
    opacity: 0.5;
}
