/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #004fff 0%, #335eff 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 79, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 79, 255, 0.6);
    animation: gentlePulse 1s ease-in-out;
}

.chatbot-button i {
    font-size: 24px;
}

.chatbot-button.active {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

@keyframes gentlePulse {
    0%, 100% {
        box-shadow: 0 6px 16px rgba(0, 79, 255, 0.6);
    }
    50% {
        box-shadow: 0 8px 20px rgba(0, 79, 255, 0.8);
    }
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 550px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: scale(0);
    transform-origin: bottom right;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chatbot-window.active {
    transform: scale(1);
    opacity: 1;
}

.chatbot-header {
    background: linear-gradient(135deg, #004fff 0%, #335eff 100%);
    color: white;
    padding: 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #004fff;
    font-size: 20px;
}

.chatbot-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chatbot-title p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

/* NEW STYLE FOR LANGUAGE TOGGLE */
.lang-toggle {
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
  flex-shrink: 0; /* Prevents it from shrinking */
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chatbot-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    flex-shrink: 0; /* Prevents it from shrinking */
}

.chatbot-close:hover {
    opacity: 0.8;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
}

.chatbot-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
}

.chatbot-message.bot .message-content {
    background: white;
    color: #1f2937;
    align-self: flex-start;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chatbot-message.user .message-content {
    background: linear-gradient(135deg, #004fff 0%, #335eff 100%);
    color: white;
    align-self: flex-end;
}

.message-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
    align-self: flex-end;
}

.chatbot-message.bot .message-time {
    align-self: flex-start;
}

.chatbot-buttons {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
    border-top: 1px solid #e5e7eb;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.chatbot-buttons.active {
    max-height: 400px;
    overflow-y: auto;
    padding: 16px 20px;
}

.chatbot-buttons.collapsed {
    max-height: 0;
    padding: 0 20px;
}

.chatbot-button-option {
    padding: 10px 14px;
    background: white;
    border: 2px solid #004fff;
    color: #004fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-button-option:hover {
    background: #004fff;
    color: white;
    transform: translateX(4px);
}

.chatbot-button-option i {
    font-size: 14px;
    min-width: 16px;
}

.chatbot-button-option.primary {
    background: linear-gradient(135deg, #004fff 0%, #335eff 100%);
    color: white;
    border: none;
}

.chatbot-button-option.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 79, 255, 0.3);
}

.chatbot-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
    display: flex;
    gap: 8px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: #004fff;
}

.chatbot-send {
    padding: 12px 20px;
    background: linear-gradient(135deg, #004fff 0%, #335eff 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.chatbot-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 79, 255, 0.3);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.quick-menu-toggle {
    padding: 10px 16px;
    background: #f3f4f6;
    border: none;
    color: #004fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.quick-menu-toggle:hover {
    background: #e5e7eb;
}

.quick-menu-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.quick-menu-toggle.active i {
    transform: rotate(180deg);
}

.button-category {
    margin-bottom: 12px;
}

.category-title {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-left: 4px;
}

.category-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 70px;
    }
    
    .chatbot-container {
        bottom: 15px;
        right: 15px;
    }
    
    .chatbot-button {
        width: 55px;
        height: 55px;
    }
    
    .chatbot-buttons.active {
        max-height: 350px;
    }
}