/* Country dropdown styling - Default closed state */
#aiginno-chatbot-container .iti__country-list {
    z-index: 999999999999999 !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    margin-top: 2px !important;
    background: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1) !important;
    width: 300px !important;
    min-width: 280px !important;
    max-width: 350px !important;
    display: none !important; /* Default closed state */
    visibility: hidden !important; /* Default closed state */
}

/* Hidden state for dropdown - Default state */
#aiginno-chatbot-container .iti__country-list.iti__hide {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: all 0.2s ease !important;
}

/* Visible state for dropdown - When opened */
#aiginno-chatbot-container .iti__country-list:not(.iti__hide) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: all 0.2s ease !important;
}

/* Force hidden state by default - Override library */
#aiginno-chatbot-container .iti__country-list {
    display: none !important;
    visibility: hidden !important;
}

/* Country list items */
#aiginno-chatbot-container .iti__country {
    padding: 12px 16px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    min-height: 48px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    border-bottom: 1px solid #f3f4f6 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
}

#aiginno-chatbot-container .iti__country:hover,
#aiginno-chatbot-container .iti__country.iti__highlight {
    background-color: #f8fafc !important;
}

#aiginno-chatbot-container .iti__country:active {
    background-color: #e2e8f0 !important;
}

#aiginno-chatbot-container .iti__country.iti__active {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 500 !important;
}

#aiginno-chatbot-container .iti__flag-box {
    margin-right: 12px !important;
    width: 20px !important;
    height: 15px !important;
    flex-shrink: 0 !important;
}

#aiginno-chatbot-container .iti__country-name {
    flex: 1 !important;
    margin-right: 8px !important;
}

#aiginno-chatbot-container .iti__dial-code {
    font-weight: 500 !important;
    color: #6b7280 !important;
    font-size: 12px !important;
} */
*, *::before, *::after {
    box-sizing: border-box;
}

/* CSS Version Check - Remove this after testing */
.aiginno-chatbot-form::before {
    content: "CSS-V6-MOBILE-RESPONSIVE-FIX" !important;
    display: none !important;
}

/* International Phone Input Integration - MOBILE RESPONSIVE FIX */
#aiginno-chatbot-container .iti {
    width: 100% !important;
    display: flex !important;
    position: relative !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem !important;
    overflow: visible !important; /* Changed to visible for dropdown */
    background: white !important;
    min-height: 2.5rem !important;
}

#aiginno-chatbot-container .iti:focus-within {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px #3b82f6 !important;
}

/* FIXED: Country dropdown positioning - CRITICAL FIX */
#aiginno-chatbot-container .iti__country-list {
    z-index: 999999999999999 !important; /* Maximum z-index */
    max-height: 80px !important;
    overflow-y: auto !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    margin-top: 2px !important;
    background: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1) !important;
    width: 300% !important;
    display: block !important;
}

/* FIXED: Country selector - better mobile interaction */
#aiginno-chatbot-container .iti__selected-flag {
    background-color: #f8fafc !important;
    border: none !important;
    border-right: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    padding: 0.625rem 0.5rem !important;
    height: auto !important;
    width: auto !important;
    min-width: 65px !important; /* Increased for better touch target */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    flex-shrink: 0 !important;
    user-select: none !important; /* Prevent text selection on mobile */
    -webkit-tap-highlight-color: transparent !important; /* Remove tap highlight on iOS */
}

#aiginno-chatbot-container .iti__selected-flag:hover {
    background-color: #f1f5f9 !important;
}

#aiginno-chatbot-container .iti__selected-flag:active {
    background-color: #e2e8f0 !important;
    transform: scale(0.98) !important;
}

/* Enhanced click feedback */
#aiginno-chatbot-container .iti__selected-flag:focus {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px !important;
}

/* Arrow indicator - Default closed state */
#aiginno-chatbot-container .iti__arrow {
    width: 0 !important;
    height: 0 !important;
    border-left: 4px solid transparent !important;
    border-right: 4px solid transparent !important;
    border-top: 4px solid #6b7280 !important;
    margin-left: 4px !important;
    transition: transform 0.2s ease !important;
    transform: rotate(0deg) !important; /* Default closed state */
}

/* Rotate arrow when dropdown is open */
#aiginno-chatbot-container .iti__selected-flag[aria-expanded="true"] .iti__arrow {
    transform: rotate(180deg) !important;
}

/* Ensure arrow resets when closed */
#aiginno-chatbot-container .iti__selected-flag[aria-expanded="false"] .iti__arrow {
    transform: rotate(0deg) !important;
}

/* FIXED: Input field - better mobile behavior */
#aiginno-chatbot-container .iti input[type="tel"] {
    border: none !important;
    border-radius: 0 !important;
    padding: 0.625rem 0.75rem !important;
    height: auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
    background: white !important;
    flex: 1 !important;
    outline: none !important;
    color: #374151 !important;
    min-height: 2.5rem !important;
}

#aiginno-chatbot-container .iti input[type="tel"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

#aiginno-chatbot-container .iti input[type="tel"]::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

/* Flag and dial code styling - Enhanced for mobile */
#aiginno-chatbot-container .iti__flag {
    margin-right: 0.375rem !important;
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 15px !important;
}

#aiginno-chatbot-container .iti__selected-dial-code {
    font-size: 0.875rem !important;
    color: #6b7280 !important;
    margin-right: 0.25rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

#aiginno-chatbot-container .iti__arrow {
    margin-left: 0.25rem !important;
    border-left: 3px solid transparent !important;
    border-right: 3px solid transparent !important;
    border-top: 3px solid #9ca3af !important;
    width: 0 !important;
    height: 0 !important;
    transition: transform 0.2s ease !important;
}

#aiginno-chatbot-container .iti__arrow--up {
    transform: rotate(180deg) !important;
}

/* Enhanced dropdown styling */
#aiginno-chatbot-container .iti__country {
    padding: 0.75rem 0.75rem !important;
    border-bottom: 1px solid #f3f4f6 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    transition: background-color 0.15s ease !important;
    min-height: 48px !important; /* Better touch target for mobile */
    user-select: none !important;
}

#aiginno-chatbot-container .iti__country:last-child {
    border-bottom: none !important;
}

#aiginno-chatbot-container .iti__country.iti__highlight {
    background-color: #eff6ff !important;
}

#aiginno-chatbot-container .iti__country:hover {
    background-color: #f9fafb !important;
}

#aiginno-chatbot-container .iti__country:active {
    background-color: #e5e7eb !important;
}

#aiginno-chatbot-container .iti__country-name {
    color: #374151 !important;
    font-size: 0.875rem !important;
    margin-left: 0.5rem !important;
    flex: 1 !important;
}

#aiginno-chatbot-container .iti__dial-code {
    color: #6b7280 !important;
    font-size: 0.875rem !important;
    margin-left: auto !important;
    font-weight: 500 !important;
}

/* Mobile specific optimizations */
@media (max-width: 480px) {
    /* Ensure chatbot container can contain dropdown */
    #aiginno-chatbot-container {
        overflow: visible !important; /* Allow dropdown to show */
        position: fixed !important;
        bottom: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
        z-index: 999999999 !important;
    }
    
    /* Ensure chatbot window is properly sized on mobile */
    .aiginno-chatbot-window {
        width: calc(100vw - 2rem) !important;
        max-width: none !important;
        right: 0 !important;
        left: 0 !important;
        height: calc(100vh - 8rem) !important;
        max-height: calc(100vh - 8rem) !important;
        position: relative !important;
        overflow: visible !important; /* Allow dropdown to overflow */
    }
    
    #aiginno-chatbot-container .iti__selected-flag {
        min-width: 60px !important;
        padding: 0.5rem 0.375rem !important;
    }
    
    #aiginno-chatbot-container .iti__selected-dial-code {
        font-size: 0.8125rem !important;
    }
    
    #aiginno-chatbot-container .iti input[type="tel"] {
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 0.5rem 0.625rem !important;
    }
    
    #aiginno-chatbot-container .iti__country-list {
        max-height: 180px !important; /* Reduced height for mobile */
        width: calc(100% - 20px) !important; /* Responsive width */
        min-width: auto !important;
        max-width: none !important;
        left: 10px !important; /* Small offset from container edge */
        right: 10px !important;
        z-index: 999999999999999 !important; /* Ensure it's above chatbot UI */
        position: fixed !important; /* Use fixed positioning on mobile */
        top: auto !important;
        transform: translateY(0) !important;
        margin-top: 5px !important;
        border-radius: 0.5rem !important;
        box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.3), 0 5px 15px -5px rgba(0, 0, 0, 0.2) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important; /* Smooth scrolling on iOS */
    }
    
    #aiginno-chatbot-container .iti__country {
        padding: 1rem 0.75rem !important; /* Better touch targets */
        min-height: 52px !important; /* Larger touch target */
        border-bottom: 1px solid #f1f5f9 !important;
        font-size: 15px !important; /* Slightly larger for mobile */
        display: flex !important;
        align-items: center !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    #aiginno-chatbot-container .iti__country:hover,
    #aiginno-chatbot-container .iti__country.iti__highlight {
        background-color: #f8fafc !important;
    }
    
    #aiginno-chatbot-container .iti__country:active {
        background-color: #e2e8f0 !important;
        transform: scale(0.98) !important;
    }
    
    #aiginno-chatbot-container .iti__flag {
        width: 18px !important;
        height: 13px !important;
    }
}

/* Tablet optimizations */
@media (max-width: 768px) and (min-width: 481px) {
    .aiginno-chatbot-window {
        width: calc(100vw - 4rem) !important;
        max-width: 400px !important;
    }
    
    #aiginno-chatbot-container .iti__country-list {
        max-height: 220px !important;
    }
}

/* Ensure proper z-index stacking */
#aiginno-chatbot-container .iti__flag-container {
    position: relative !important;
}

#aiginno-chatbot-container .iti__country-container {
    position: relative !important;
}

/* Smooth transitions */
#aiginno-chatbot-container .iti__selected-flag,
#aiginno-chatbot-container .iti input[type="tel"] {
    transition: all 0.2s ease !important;
}

/* Fix for touch devices */
@media (hover: none) and (pointer: coarse) {
    #aiginno-chatbot-container .iti__selected-flag:hover {
        background-color: #f8fafc !important;
    }
    
    #aiginno-chatbot-container .iti__country:hover {
        background-color: transparent !important;
    }
}

/* Core Chatbot Container */
#aiginno-chatbot-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    position: fixed !important;
    bottom: 1rem !important;
    right: 1rem !important;
    z-index: 999999999 !important;
}

/* Reset only problematic Bootstrap/WordPress properties */
#aiginno-chatbot-container h1,
#aiginno-chatbot-container h2,
#aiginno-chatbot-container h3,
#aiginno-chatbot-container h4,
#aiginno-chatbot-container h5,
#aiginno-chatbot-container h6 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

#aiginno-chatbot-container p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

#aiginno-chatbot-container ul,
#aiginno-chatbot-container ol {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-left: 0 !important;
}

#aiginno-chatbot-container li {
    margin-bottom: 0 !important;
}

/* Override Bootstrap form default styles */
#aiginno-chatbot-container form {
    margin: 0 !important;
    padding: 0;
}

/* Specific override for chatbot form to prevent Bootstrap interference */
#aiginno-chatbot-container .aiginno-chatbot-form {
    padding: 0; /* This will override Bootstrap without conflict */
}

.aiginno-chatbot-send-button:focus {
    outline: none !important;
}

/* Footer */
.aiginno-chatbot-footer a {
    color: inherit; /* Inherits the text color from the footer element */
    text-decoration: none; /* Removes the default underline from the link */
}

/* Adds an underline when the user hovers over the link */
.aiginno-chatbot-footer a:hover {
    text-decoration: underline;
}

/* Chatbot Icon */
.aiginno-chatbot-icon {
    position: fixed !important;
    bottom: 1rem !important; /* bottom-4 */
    right: 1rem !important; /* right-4 */
    background-color: #2563eb !important; /* bg-blue-600 */
    color: white !important; /* text-white - this color will be inherited by SVG's stroke="currentColor" */
    padding: 1rem !important; /* p-4 */
    border-radius: 9999px !important; /* rounded-full */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important; /* shadow-lg */
    cursor: pointer !important;
    transition: all 0.3s ease-in-out !important; /* transition-all duration-300 ease-in-out */
    border: 4px solid white !important; /* border-4 border-white */
    z-index: 100000 !important; /* z-index: 100 */
    outline: none !important; /* focus:outline-none */
}

.aiginno-chatbot-icon:hover {
    background-color: #1d4ed8 !important; /* hover:bg-blue-700 */
}

/* Added focus state for the ring effect */
.aiginno-chatbot-icon:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.75), 0 0 0 4px #3b82f6; /* Simulates focus:ring-2 focus:ring-blue-500 focus:ring-opacity-75 */
}

/* SVG icon sizing within the toggle button - NEW */
.aiginno-chatbot-icon svg {
    height: 1.5rem; /* h-6 (24px) */
    width: 1.5rem;  /* w-6 (24px) */
}

.aiginno-chatbot-input-field:focus,
.aiginno-chatbot-send-button:focus {
    outline: none !important;
    box-shadow: none !important;
    /* border-color: inherit !important; */
    text-decoration: none !important;
}

/* Chatbot Footer */
.aiginno-chatbot-footer {
    text-align: center !important;
    font-size: 0.75rem !important;
    color: #9ca3af !important;
    padding: 0.5rem !important;
}


/* Chatbot Window */
.aiginno-chatbot-window {
    position: fixed !important;
    bottom: 6rem !important; /* bottom-24 */
    right: 1rem !important; /* right-4 */
    width: 20rem ; /* w-80 */
    max-width: 24rem !important; /* md:w-96 */
    background-color: white !important;
    border-radius: 0.5rem !important; /* rounded-lg */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important; /* shadow-xl */
    display: flex !important;
    flex-direction: column !important;
    /* max-height: calc(90vh - 140px); */
    height: 32rem !important;
    overflow: hidden !important;
    z-index: 9999999999999999999999999999999999999 !important; /* Ensures the chatbot is on top of other elements */
}

@media (min-width: 768px) {
    .aiginno-chatbot-window {
        width: 24rem; /* md:w-96 */
    }
}

/* Header */
.aiginno-chatbot-header {
    padding: 1rem !important;
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
    background-color: #2563eb !important; /* bg-blue-600 */
    color: white !important;
    font-size: 1.125rem !important; /* text-lg */
    font-weight: 600 !important; /* font-semibold */
}

/* Override Bootstrap/WordPress theme styles for h3 tag */
.aiginno-chatbot-header h3 {
    color: white !important;
    font-size: 1.125rem !important; /* Override Bootstrap's 1.75rem */
    font-weight: 600 !important; /* Override Bootstrap's 500 */
    line-height: 1.5 !important; /* Override Bootstrap's 1.2 */
    margin: 0 !important; /* Override Bootstrap's margin-bottom: 0.5rem and margin-top: 0 */
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
    font-family: inherit !important;
    display: block !important;
    background: none !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Content area - Match HTML version exactly */
.aiginno-chatbot-content {
    display: flex !important;
    flex-grow: 1 !important;
    flex-direction: column !important;
    padding: 1rem !important;
    overflow-y: auto !important;
    gap: 1rem !important; /* space-y-4 */
}

/* Form Styling - Match HTML version exactly */
.aiginno-chatbot-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0;
    width: 100% !important;
}
.aiginno-chatbot-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important; /* space-y-3 */
    padding: 0; /* Override Bootstrap form padding */
    margin: 0 !important; /* Override Bootstrap form margin */
}

.aiginno-chatbot-form label {
    font-size: 0.875rem !important; /* text-sm */
    font-weight: 500 !important; /* font-medium */
    color: #4b5563 !important; /* text-gray-700 */
    margin-bottom: 0.25rem !important;
}

.aiginno-chatbot-form input {
    width: 100% !important;
    padding: 0.5rem !important;
    border-radius: 0.375rem !important; /* rounded-md */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; /* shadow-sm */
    border: 1px solid #d1d5db !important; /* border-gray-300 */
    background-color: white !important;
    color: #000 !important;
}

.aiginno-chatbot-form input:focus {
    outline: 2px solid transparent !important;
    outline-offset: 2px !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px #3b82f6 !important; /* focus:ring-blue-500 focus:border-blue-500 */
}

/* Form Buttons - Match HTML version exactly */
.aiginno-chatbot-form-button {
    width: 100% !important;
    padding: 0.5rem 1rem !important;
    background-color: #2563eb !important; /* bg-blue-600 */
    color: white !important;
    border-radius: 0.375rem !important; /* rounded-md */
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    border: none !important;
    font-weight: 500 !important;
}

.aiginno-chatbot-form-button:hover {
    background-color: #1d4ed8 !important; /* hover:bg-blue-700 */
}

.aiginno-chatbot-form-button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.aiginno-chatbot-form-error {
    color: #ef4444 !important; /* text-red-500 */
    font-size: 0.875rem !important; /* text-sm */
}

/* Chat Messages Area */
.aiginno-chatbot-messages {
    flex-grow: 1 !important;
    padding: 1rem !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important; /* space-y-4 */
    background-color: #f3f4f6 !important; /* A light background for the chat area */
}

/* Individual message styling */
.aiginno-chat-message-user {
    display: flex !important;
    justify-content: flex-end !important;
}

.aiginno-chat-message-bot {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-end !important;
}

.aiginno-chat-bubble {
    padding: 0.75rem !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    max-width: 75% !important;
    word-wrap: break-word !important;
}

.aiginno-chat-bubble-user {
    background-color: #3b82f6 !important; /* bg-blue-500 */
    color: white !important;
    border-bottom-right-radius: 0 !important;
}

.aiginno-chat-bubble-bot {
    background-color: #e5e7eb !important; /* bg-gray-200 */
    color: black !important;
    border-bottom-left-radius: 0 !important;
    margin-left: 0.5rem !important; /* ml-2 */
}

/* Bot avatar */
.aiginno-bot-avatar {
    width: 1.5rem; /* w-6 */
    height: 1.5rem; /* h-6 */
    min-width: 1.5rem; /* For flex-shrink-0 */
    border-radius: 9999px;
    background-color: #3b82f6; /* bg-blue-500 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #60a5fa;
}

.aiginno-bot-avatar svg {
    width: 1rem;
    height: 1rem;
    color: white;
}

/* Bot avatar */
.aiginno-bot-avatar {
    width: 1.5rem !important; /* w-6 */
    height: 1.5rem !important; /* h-6 */
    min-width: 1.5rem !important; /* For flex-shrink-0 */
    border-radius: 9999px !important;
    background-color: #3b82f6 !important; /* bg-blue-500 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #60a5fa !important;
}

.aiginno-bot-avatar svg {
    width: 1rem !important;
    height: 1rem !important;
    color: white !important;
}

/* Restore specific styles for bot message content where needed */
.aiginno-chat-bubble-bot a {
    color: #2563eb !important;
    text-decoration: underline !important;
}

.aiginno-chat-bubble-bot p { 
    margin: 0 !important; 
}

.aiginno-chat-bubble-bot ul, .aiginno-chat-bubble-bot ol { 
    margin: 0 !important; 
    padding-left: 1.5rem !important;
    list-style: disc !important;
}

.aiginno-chat-bubble-bot ol {
    list-style: decimal !important;
}

.aiginno-chat-bubble-bot li { 
    margin-bottom: 0.25rem !important;
}

.aiginno-chat-bubble-bot h1, .aiginno-chat-bubble-bot h2, .aiginno-chat-bubble-bot h3 { 
    margin-top: 0 !important; 
    margin-bottom: 0.5rem !important;
    font-weight: bold !important;
}

.aiginno-chat-bubble-bot h1 { font-size: 1.5rem !important; }
.aiginno-chat-bubble-bot h2 { font-size: 1.25rem !important; }
.aiginno-chat-bubble-bot h3 { font-size: 1.125rem !important; }







.aiginno-chatbot-send-button {
    height: 2.5rem !important; /* Explicitly set height to match input */
    width: 3rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0.375rem !important;
    background-color: #2563eb !important;
    color: white !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    border: none !important;
    flex-shrink: 0 !important; /* Prevents button from shrinking */
}

.aiginno-chatbot-send-button:hover {
    background-color: #1d4ed8 !important;
}

.aiginno-chatbot-send-button:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    background-color: #6b7280 !important; /* Gray color when disabled */
}

.aiginno-chatbot-send-button:disabled:hover {
    background-color: #6b7280 !important; /* Prevent hover effect when disabled */
}

/* Loading/typing indicator */
.aiginno-chatbot-loading {
    display: flex !important;
    justify-content: flex-start !important;
}

.aiginno-chatbot-loading-bubble {
    background-color: #e5e7eb !important;
    color: #4b5563 !important;
    padding: 0.75rem !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    border-bottom-left-radius: 0 !important;
    margin-left: 0.5rem !important;
}

.aiginno-chatbot-loading-bubble span {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Enhanced typing dots animation */
.aiginno-typing-dots {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
}

.aiginno-typing-dots span {
    display: inline-block !important;
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background-color: #6b7280 !important;
    animation: typingDots 1.4s infinite ease-in-out;
}

.aiginno-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.aiginno-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.aiginno-typing-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading spinner for buttons */
.aiginno-spinner, .aiginno-spinner-small {
    display: inline-block;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.aiginno-spinner {
    width: 16px;
    height: 16px;
}

.aiginno-spinner-small {
    width: 14px;
    height: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fix: Ensure form inputs do not touch container edges and have proper internal padding */
#aiginno-chatbot-container .aiginno-chatbot-form {
    padding: 0.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#aiginno-chatbot-container .aiginno-chatbot-form .aiginno-form-group {
    width: 100% !important;
}

#aiginno-chatbot-container .aiginno-chatbot-form input[type="text"],
#aiginno-chatbot-container .aiginno-chatbot-form input[type="tel"],
#aiginno-chatbot-container .aiginno-chatbot-form input[type="email"],
#aiginno-chatbot-container .aiginno-chatbot-form textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.5rem 0.75rem !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.375rem !important;
    background: #fff !important;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

/* Ensure the form content area provides internal spacing from the widget borders */
#aiginno-chatbot-container .aiginno-chatbot-content {
    padding: 0.75rem !important;
}

/* Small tweak for submit/start button to not overflow */
#aiginno-chatbot-container .aiginno-chatbot-form-button {
    padding: 0.5rem 0.75rem !important;
    align-self: flex-start !important;
    min-width: 120px !important;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Error message styling */
.aiginno-chat-error-message {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background-color: #FEE2E2 !important;
    border: 1px solid #F87171 !important;
    color: #DC2626 !important;
    padding: 12px !important;
    margin: 8px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
}

.aiginno-chat-error-message svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
}

/* Input area - Match HTML version exactly */
.aiginno-chatbot-input-area {
    padding: 1rem !important;
    border-top: 1px solid #e5e7eb !important;
    display: flex !important;
    align-items: flex-start !important;
    background-color: white !important;
    gap: 0.5rem !important; /* Provides space between the input and the button */
    padding-bottom: 0rem !important; /* Ensures padding at the bottom */
}

.aiginno-chatbot-input-field {
    flex-grow: 1 !important; /* Allows the input to take up available space */
    height: 2.5rem !important;
    border-radius: 0.375rem !important;
    border: 1px solid #d1d5db !important;
    padding: 0 0.75rem !important;
    color: black !important;
    background-color: white !important;
}

.aiginno-chatbot-input-field:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px #3b82f6 !important;
    background-color: white !important;
    color: black !important;
}

.aiginno-chatbot-send-button {
    height: 2.5rem !important; /* Explicitly set height to match input */
    width: 3rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0.375rem !important;
    background-color: #2563eb !important;
    color: white !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    border: none !important;
    flex-shrink: 0 !important; /* Prevents button from shrinking */
}

.aiginno-chatbot-send-button:hover {
    background-color: #1d4ed8 !important;
    color: white !important;
    text-decoration: none !important;
}

.aiginno-chatbot-send-button:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    background-color: #6b7280 !important;
    color: white !important;
}

.aiginno-chatbot-send-button:disabled:hover {
    background-color: #6b7280 !important;
    color: white !important;
}

/* Loading/typing indicator */
.aiginno-chatbot-loading {
    display: flex;
    justify-content: flex-start;
}

.aiginno-chatbot-loading-bubble {
    background-color: #e5e7eb;
    color: #4b5563;
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border-bottom-left-radius: 0;
    margin-left: 0.5rem;
}

.aiginno-chatbot-loading-bubble span {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Enhanced typing dots animation */
.aiginno-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.aiginno-typing-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #6b7280;
    animation: typingDots 1.4s infinite ease-in-out;
}

.aiginno-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.aiginno-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.aiginno-typing-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typingDots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading spinner for buttons */
.aiginno-spinner, .aiginno-spinner-small {
    display: inline-block;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.aiginno-spinner {
    width: 16px;
    height: 16px;
}

.aiginno-spinner-small {
    width: 14px;
    height: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

