/* TNR Business Solutions Chatbot Styles - Professional Design */
/* Based on Demonte Contracting chatbot design */

.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chatbot-button {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4AF37 0%, #F4D03F 100%);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(212, 175, 55, 0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(212, 175, 55, 0.7);
    }
}

.chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 550px;
    max-height: calc(100vh - 150px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #D4AF37;
}

.chatbot-window.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

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

.chatbot-header {
    background: linear-gradient(135deg, #1a365d 0%, #2d4a6b 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #D4AF37;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.chatbot-close:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    animation: messageSlide 0.3s ease;
}

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

.bot-message {
    background: linear-gradient(135deg, #D4AF37 0%, #F4D03F 100%);
    color: #1a365d;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    font-weight: 500;
}

.user-message {
    background: linear-gradient(135deg, #1a365d 0%, #2d4a6b 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.chatbot-message p {
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

.chatbot-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.chatbot-option-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4D03F 100%);
    color: #1a365d;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    text-align: left;
}

.chatbot-option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.chatbot-input-container {
    margin: 10px 0;
}

.chatbot-user-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #D4AF37;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s;
}

.chatbot-user-input:focus {
    border-color: #1a365d;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.chatbot-submit-btn {
    margin-top: 10px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #1a365d 0%, #2d4a6b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.3);
    transition: all 0.3s;
}

.chatbot-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.4);
}

.chatbot-input-area {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 2px solid #e0e0e0;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.chatbot-input:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.chatbot-send {
    padding: 12px 24px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4D03F 100%);
    color: #1a365d;
    border: none;
    border-radius: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.chatbot-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

.chatbot-send:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 20px;
        right: 20px;
    }
    
    .chatbot-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .chatbot-window {
        bottom: 95px;
        right: 20px;
        width: calc(100vw - 40px);
        height: calc(100vh - 130px);
    }
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 8px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f0f2f5;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #F4D03F;
}

