.chatbot-container {
    position: fixed;
    bottom: 30px; 
    right: 30px;  
    z-index: 9998;
    font-family: var(--body-font);
}

.chatbot-toggle {
    width: 55px;  
    height: 55px; 
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--background-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3); 
    cursor: pointer;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
    z-index: 900; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em; 
    position: relative;
}

.chatbot-toggle:hover {
    background: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    box-shadow: 0 6px 20px rgba(0, 100, 209, 0.5);
    transform: translateY(-3px) scale(1.05);
}

.chatbot-toggle:active,
.chatbot-toggle:focus {
    background: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 100, 209, 0.7);
    transition: all 0.1s ease;
}

.chatbot-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 18px;
    height: 18px;
    background: var(--gold-color);
    border: 2px solid var(--background-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: bold;
    color: var(--text-color);
    animation: pulse 2s infinite;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

.chatbot-window {
    position: fixed;
    bottom: 100px; 
    right: 10px;
    left: 10px;
    width: auto;
    max-width: 350px;
    height: 500px;
    background: var(--background-color);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    animation: slideInUp 0.3s ease;
    margin-left: auto;
}

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

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

.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), #a00000);
    color: var(--background-color);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header h4 {
    font-family: var(--heading-font);
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-keys-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--background-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--back-color);
}

.chatbot-message {
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

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

.message-bot {
    text-align: left;
}

.message-user {
    text-align: right;
}

.message-bubble {
    display: inline-block;
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message-bot .message-bubble {
    background: var(--background-color);
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-user .message-bubble {
    background: var(--primary-color);
    color: var(--background-color);
    border-bottom-right-radius: 5px;
}

.message-bubble a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.message-bubble a:hover {
    border-bottom-color: var(--secondary-color);
}

.message-user .message-bubble a {
    color: var(--gold-color);
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-action-btn {
    background: var(--secondary-color);
    color: var(--background-color);
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--secondary-color);
}

.quick-action-btn:hover {
    background: var(--background-color);
    color: var(--secondary-color);
}

.chatbot-input-area {
    padding: 15px 20px;
    background: var(--background-color);
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 10px 15px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: var(--body-font);
}

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

.chatbot-send {
    background: var(--primary-color);
    color: var(--background-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.chatbot-send:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.chatbot-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    background: var(--background-color);
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 85%;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typingPulse 1.4s infinite;
}

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

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

@keyframes typingPulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .chatbot-container {
        bottom: 90px; 
        right: 20px;  
    }
    
    .chatbot-toggle {
        width: 50px;  
        height: 50px; 
        font-size: 1.2em; 
    }
    
    .chatbot-window {
        bottom: 140px; 
        right: 5px;
        left: 5px;
        height: 65vh;
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        bottom: 80px; 
        right: 15px;  
    }
    
    .chatbot-toggle {
        width: 45px;  
        height: 45px; 
        font-size: 1.1em; 
    }
    
    .chatbot-window {
        bottom: 125px; 
        right: 5px;
        left: 5px;
        height: 60vh;
        max-height: 450px;
    }
}

@media (max-width: 320px) {
    .chatbot-container {
        bottom: 75px;
        right: 10px;
    }
    
    .chatbot-toggle {
        width: 42px;
        height: 42px;
        font-size: 1em;
    }
    
    .chatbot-window {
        bottom: 120px; 
        right: 3px;
        left: 3px;
        height: 55vh;
        max-height: 400px;
        border-radius: 10px;
    }
    
    .chatbot-header {
        padding: 12px 15px;
    }
    
    .chatbot-header h4 {
        font-size: 1rem;
    }
    
    .chatbot-messages {
        padding: 15px;
    }
    
    .chatbot-input-area {
        padding: 12px 15px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .chatbot-container {
        bottom: 60px;
    }
    
    .chatbot-window {
        height: 80vh;
        bottom: 105px; 
    }
}
.chatbot-gallery-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 6px;
    overflow: hidden;
}

.chatbot-gallery-item:hover {
    transform: scale(1.04);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}