/* Chatbot Widget Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.chatbot-button {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35 0%, #32CD32 100%);
    border: none;
    box-shadow: 0 6px 24px rgba(255, 107, 53, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    animation: pulse-button 2s infinite;
}

@keyframes pulse-button {
    0%, 100% {
        box-shadow: 0 6px 24px rgba(255, 107, 53, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 0 8px 30px rgba(255, 107, 53, 0.6), 0 0 0 6px rgba(255, 255, 255, 0.3);
    }
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.5), 0 0 0 6px rgba(255, 255, 255, 0.3);
    animation: none;
}

.chatbot-button i {
    color: white;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chatbot-button .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff0000;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    height: 420px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #FF6B35 0%, #32CD32 100%);
    padding: 10px 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 12px rgba(255, 107, 53, 0.2);
}

.chatbot-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.1px;
}

.chatbot-header .status-indicator {
    width: 6px;
    height: 6px;
    background: #32CD32;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    animation: pulse 2s infinite;
    box-shadow: 0 0 6px rgba(50, 205, 50, 0.6);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.chatbot-header h3 i {
    font-size: 14px;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 12px;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg) scale(1.1);
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f5f6f8;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chatbot-message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
}

.chatbot-message.bot .chatbot-message-avatar {
    background: linear-gradient(135deg, #FF6B35 0%, #32CD32 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.chatbot-message.user .chatbot-message-avatar {
    background: #e9ecef;
    color: #495057;
}

.chatbot-message-content {
    max-width: 80%;
    padding: 7px 10px;
    border-radius: 10px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.35;
    font-size: 11px;
}

.chatbot-message.bot .chatbot-message-content {
    background: white;
    color: #2d3748;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.1);
}

.chatbot-message.user .chatbot-message-content {
    background: linear-gradient(135deg, #FF6B35 0%, #32CD32 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}

.chatbot-message-content a {
    color: #FF6B35;
    text-decoration: underline;
    font-weight: 600;
}

.chatbot-message.user .chatbot-message-content a {
    color: white;
    text-decoration: underline;
}

.chatbot-whatsapp-button-container {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.chatbot-whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #25D366;
    color: white !important;
    padding: 7px 12px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
    white-space: nowrap;
    width: 100%;
    justify-content: center;
}

.chatbot-whatsapp-button:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    color: white !important;
}

.chatbot-whatsapp-button * {
    color: white !important;
}

.chatbot-whatsapp-button i {
    font-size: 14px;
}

.chatbot-typing {
    display: flex;
    gap: 3px;
    padding: 7px 10px;
    background: white;
    border-radius: 10px;
    border-bottom-left-radius: 4px;
    max-width: 80%;
}

.chatbot-typing span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.chatbot-input-container {
    padding: 8px 10px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 5px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.chatbot-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 7px 12px;
    font-size: 11px;
    outline: none;
    transition: all 0.3s ease;
    min-width: 0;
    width: 100%;
    background: #f9fafb;
}

.chatbot-input:focus {
    border-color: #FF6B35;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}


.chatbot-send {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35 0%, #32CD32 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    background: linear-gradient(135deg, #E55A2B 0%, #28B828 100%);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Tablet Responsive */
@media (max-width: 992px) {
    .chatbot-window {
        width: 360px;
        height: 580px;
    }
    
    .chatbot-header {
        padding: 18px;
    }
    
    .chatbot-header h3 {
        font-size: 16px;
    }
    
    .chatbot-messages {
        padding: 18px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 15px;
        right: 15px;
        left: auto;
    }

    .chatbot-window {
        width: calc(100vw - 30px);
        max-width: 400px;
        height: calc(100vh - 100px);
        max-height: 650px;
        min-height: 500px;
        bottom: 75px;
        right: 0;
        left: auto;
        margin: 0;
        border-radius: 15px;
    }

    .chatbot-button {
        width: 56px;
        height: 56px;
    }

    .chatbot-button i {
        font-size: 22px;
    }
    
    .chatbot-header {
        padding: 16px;
    }
    
    .chatbot-header h3 {
        font-size: 16px;
        gap: 8px;
    }
    
    .chatbot-header h3 i {
        font-size: 18px;
    }
    
    .chatbot-close {
        width: 28px;
        height: 28px;
    }
    
    .chatbot-messages {
        padding: 15px;
        gap: 12px;
    }
    
    .chatbot-message-avatar {
        width: 32px;
        height: 32px;
    }
    
    .chatbot-message-content {
        max-width: 80%;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .chatbot-input-container {
        padding: 12px;
        gap: 8px;
    }
    
    .chatbot-input {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .chatbot-send {
        width: 42px;
        height: 42px;
    }
    
    .chatbot-whatsapp-button {
        padding: 9px 14px;
        font-size: 13px;
    }
}

/* Small Mobile Responsive */
@media (max-width: 576px) {
    .chatbot-container {
        bottom: 12px;
        right: 12px;
        left: auto;
    }

    .chatbot-window {
        width: calc(100vw - 24px);
        height: calc(100vh - 80px);
        max-height: 600px;
        min-height: 450px;
        bottom: 70px;
        right: 0;
        left: auto;
        margin: 0;
        border-radius: 12px;
    }

    .chatbot-button {
        width: 52px;
        height: 52px;
    }

    .chatbot-button i {
        font-size: 20px;
    }
    
    .chatbot-header {
        padding: 14px;
    }
    
    .chatbot-header h3 {
        font-size: 15px;
        gap: 6px;
    }
    
    .chatbot-header h3 i {
        font-size: 16px;
    }
    
    .chatbot-close {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .chatbot-messages {
        padding: 12px;
        gap: 10px;
    }
    
    .chatbot-message-avatar {
        width: 30px;
        height: 30px;
    }
    
    .chatbot-message-avatar i {
        font-size: 14px;
    }
    
    .chatbot-message-content {
        max-width: 85%;
        padding: 9px 12px;
        font-size: 12px;
        line-height: 1.4;
    }
    
    .chatbot-input-container {
        padding: 10px;
        gap: 6px;
    }
    
    .chatbot-input {
        padding: 9px 14px;
        font-size: 13px;
    }
    
    .chatbot-send {
        width: 40px;
        height: 40px;
    }
    
    .chatbot-send i {
        font-size: 14px;
    }
    
    .chatbot-whatsapp-button {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }
    
    .chatbot-whatsapp-button i {
        font-size: 16px;
    }
    
    .chatbot-typing {
        padding: 10px 14px;
        max-width: 80%;
    }
    
    .chatbot-typing span {
        width: 6px;
        height: 6px;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .chatbot-container {
        bottom: 10px;
        right: 10px;
    }

    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 70px);
        max-height: 550px;
        min-height: 400px;
        bottom: 65px;
        border-radius: 10px;
    }

    .chatbot-button {
        width: 48px;
        height: 48px;
    }

    .chatbot-button i {
        font-size: 18px;
    }
    
    .chatbot-header {
        padding: 12px;
    }
    
    .chatbot-header h3 {
        font-size: 14px;
    }
    
    .chatbot-messages {
        padding: 10px;
    }
    
    .chatbot-message-content {
        max-width: 90%;
        padding: 8px 11px;
        font-size: 11px;
    }
    
    .chatbot-input {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .chatbot-send {
        width: 38px;
        height: 38px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .chatbot-window {
        height: calc(100vh - 60px);
        max-height: 500px;
        min-height: 350px;
        bottom: 60px;
    }
    
    .chatbot-messages {
        padding: 10px;
    }
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6B35 0%, #32CD32 100%);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #E55A2B 0%, #28B828 100%);
}

