/* Enhanced Ask ACT Chatbot Styles with 50% Increased Height and New Features */
.ask-3173-chatbot {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chatbot-toggle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c0c0c0, #708090);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(220, 20, 60, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 10000;
    pointer-events: auto;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(220, 20, 60, 0.6);
}

.chatbot-toggle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #dc143c, #ff6b6b, #dc143c);
    border-radius: 50%;
    z-index: -1;
    animation: redGlow 2s ease-in-out infinite alternate;
}

@keyframes redGlow {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.chatbot-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin: 10px;
}

/* Enhanced chatbot window with 10% further increased height */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 400px;
    height: 693px; /* Increased from 630px by 10% (630 * 1.1 = 693px) */
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid #708090;
    display: none !important;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
}

.chatbot-window.enhanced-height {
    height: 693px; /* Updated explicit class for further increased height */
}

.chatbot-window.open {
    display: flex !important;
    animation: slideUp 0.3s ease-out;
}

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

.chatbot-header {
    background: linear-gradient(135deg, #708090, #2f4f4f);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move;
}

.chatbot-title {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.chatbot-close:hover {
    background-color: rgba(220, 20, 60, 0.3);
}

/* NEW: Suggested Questions Section - Expanded with extra 10% height */
.suggested-questions {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 15px;
    max-height: 183px; /* Increased from 120px by adding extra 63px from 10% window height increase */
    overflow-y: auto;
}

.suggested-questions-title {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.suggested-questions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suggested-question-btn {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    line-height: 1.3;
}

.suggested-question-btn:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: #708090;
    color: #2f4f4f;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.suggested-question-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c0c0c0, #708090);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 10px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #dc143c, #b91c3c);
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 70%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    font-size: 12px;
    position: relative;
}

.message.user .message-content {
    background: linear-gradient(135deg, #708090, #2f4f4f);
    color: white;
}

/* NEW: Rating Buttons */
.rating-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.rating-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.rating-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    border-color: #708090;
}

.rating-btn.thumbs-up:hover {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
}

.rating-btn.thumbs-down:hover {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
}

.rating-btn.selected.thumbs-up {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
    opacity: 1;
}

.rating-btn.selected.thumbs-down {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
    opacity: 1;
}

.rating-btn:active {
    transform: scale(0.95);
}

.chatbot-input-area {
    padding: 20px 15px; /* Increased padding from 15px to 20px (33% increase) */
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 65px; /* Added minimum height for 30% increase */
}

.chatbot-input {
    flex: 1;
    border: 2px solid #708090;
    border-radius: 25px;
    padding: 16px 20px; /* Increased padding from 12px 16px to 16px 20px (33% increase) */
    font-size: 10px;
    outline: none;
    transition: border-color 0.2s;
    min-height: 20px; /* Added minimum height for input field */
}

.chatbot-input:focus {
    border-color: #dc143c;
}

.voice-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c0c0c0, #708090);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}

.voice-button:hover {
    background: linear-gradient(135deg, #708090, #2f4f4f);
}

.voice-button.recording {
    background: linear-gradient(135deg, #dc143c, #b91c3c);
    animation: pulse 1s infinite;
}

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

.send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc143c, #b91c3c);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}

.send-button:hover {
    background: linear-gradient(135deg, #b91c3c, #991b1b);
}

.typing-indicator {
    display: none;
    padding: 10px 16px;
    background: white;
    border-radius: 18px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #708090;
    animation: typingDot 1.4s infinite ease-in-out;
}

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

@keyframes typingDot {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Draggable functionality */
.chatbot-window.dragging {
    user-select: none;
    transition: none;
}

/* Enhanced Mobile responsiveness */
@media (max-width: 768px) {
    .chatbot-window {
        width: 90vw;
        height: 80vh; /* Increased from 70vh to 80vh for mobile */
        left: 5vw;
        bottom: 90px;
    }
    
    .chatbot-window.enhanced-height {
        height: 98vh; /* Increased mobile height but capped at 98vh to avoid overflow */
    }
    
    .ask-3173-chatbot {
        bottom: 15px;
        left: 15px;
    }
    
    .chatbot-toggle {
        width: 60px;
        height: 60px;
    }
    
    .chatbot-avatar {
        width: 40px;
        height: 40px;
        margin: 10px;
    }
    
    .suggested-questions {
        max-height: 152px; /* Proportionally increased from 100px to match desktop expansion */
    }
    
    .suggested-question-btn {
        font-size: 10px;
        padding: 6px 10px;
    }
}

/* Speaker Button Styles */
.speak-button {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #6c757d;
}

.speak-button:hover {
    background-color: rgba(108, 117, 125, 0.1);
    color: #495057;
    transform: scale(1.1);
}

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

.speak-button[title*="Listen"] {
    opacity: 0.8;
}

.speak-button[title*="Listen"]:hover {
    opacity: 1;
}

/* Scrollbar styling for better appearance */
.chatbot-messages::-webkit-scrollbar,
.suggested-questions::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track,
.suggested-questions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb,
.suggested-questions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover,
.suggested-questions::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


/* Inline speak button styling */
.inline-speak {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    margin-left: 5px;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.inline-speak:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.inline-speak:active {
    background-color: rgba(0, 123, 255, 0.2);
}

