/* HH Live Chat Public Styles 
 * 
 * IMPORTANT: After making changes to this file, you MUST regenerate public.min.css
 * Command: npx clean-css-cli -o public.min.css public.css
 * The site uses public.min.css in production, not this file!
 */

/* Reset and Box Sizing */
.hhlivechat-widget * {
    box-sizing: border-box;
}

/* CSS Variables - Dark theme only */
:root {
    --hhlivechat-primary: #007cba;
    --hhlivechat-primary-dark: #005a8b;
    --hhlivechat-header: #007cba;
    --hhlivechat-bubble: #007cba;
    --hhlivechat-bubble-dark: #005a8b;
    --hhlivechat-text: #e8e8e8;
    --hhlivechat-bg: #1a1a1a;
    --hhlivechat-bg-secondary: #2a2a2a;
    --hhlivechat-border: #3a3a3a;
    --hhlivechat-ai-bubble-bg: #2d3748;
    --hhlivechat-ai-bubble-border: #4a5568;
    --hhlivechat-typing-dots: #666;
}

/* Base Widget Styles - Mobile First */
.hhlivechat-widget {
    position: fixed;
    z-index: 2147483647 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    display: block !important;
}

/* Widget Button - Mobile First */
.hhlivechat-widget-button {
    background: var(--hhlivechat-bubble, var(--hhlivechat-primary, #007cba));
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    position: relative;
    pointer-events: auto !important;
    user-select: none;
    z-index: 2147483647 !important;
}

.hhlivechat-widget-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.hhlivechat-widget-button:active {
    transform: scale(0.98);
}

.hhlivechat-widget-button svg,
.hhlivechat-widget-button * {
    pointer-events: none;
}

/* Widget Positioning - Mobile First */
.hhlivechat-widget.hhlivechat-bottom-right {
    bottom: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0));
    right: 15px;
    right: calc(15px + env(safe-area-inset-right, 0));
}

.hhlivechat-widget.hhlivechat-bottom-left {
    bottom: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0));
    left: 15px;
    left: calc(15px + env(safe-area-inset-left, 0));
}

/* Widget Container - Mobile First (Full Screen) */
.hhlivechat-widget-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    max-height: 100vh;
    max-height: 100dvh;
    background: var(--hhlivechat-bg, #fff);
    border-radius: 0;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Keep hidden to prevent container scrolling, child elements will scroll */
    transition: all 0.3s ease;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    z-index: 2147483646 !important;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0.8;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Widget Header - Mobile First */
.hhlivechat-widget-header {
    background: var(--hhlivechat-header, var(--hhlivechat-primary, #007cba));
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 56px;
    flex-shrink: 0;
}

/* Logo and Agent Info - Mobile First */
.hhlivechat-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.hhlivechat-agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.hhlivechat-agent-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.hhlivechat-agent-details {
    display: flex;
    flex-direction: column;
}

.hhlivechat-agent-name {
    font-weight: 600;
    font-size: 14px;
}

.hhlivechat-agent-status {
    font-size: 11px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hhlivechat-online-indicator {
    width: 8px;
    height: 8px;
    background-color: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

/* Header Controls - Mobile First */
.hhlivechat-default-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.hhlivechat-title {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.hhlivechat-minimize,
.hhlivechat-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 10px;
    margin: -6px -8px -6px 0;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hhlivechat-minimize:active,
.hhlivechat-close:active {
    transform: scale(0.95);
}

/* Messages Area - Mobile First */
.hhlivechat-widget-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
    background: var(--hhlivechat-bg-secondary, #f5f5f5);
    scroll-behavior: smooth;
    display: none;
    flex-direction: column !important;
}

.hhlivechat-widget-messages[style*="block"] {
    display: block !important;
}

/* Custom scrollbar for desktop */
.hhlivechat-widget-messages::-webkit-scrollbar {
    width: 6px;
}

.hhlivechat-widget-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.hhlivechat-widget-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.hhlivechat-widget-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Messages - Mobile First */
.hhlivechat-message {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.hhlivechat-message-user {
    justify-content: flex-end;
}

.hhlivechat-message-system {
    justify-content: center;
    text-align: center;
    margin: 8px 0;
}

.hhlivechat-message-avatar {
    flex-shrink: 0;
}

.hhlivechat-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--hhlivechat-border, #e0e0e0);
}

/* Message Content - Mobile First */
.hhlivechat-message-content {
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    animation: messageSlideIn 0.3s ease-out;
    max-width: 85%;
    min-width: fit-content;
    display: inline-block;
    font-size: 13px;
    line-height: 1.4;
}

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

.hhlivechat-message-wrapper {
    max-width: 95%;
}

.hhlivechat-message-ai .hhlivechat-message-content {
    background: var(--hhlivechat-ai-bubble-bg);
    color: var(--hhlivechat-text);
    border: 1px solid var(--hhlivechat-ai-bubble-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.hhlivechat-message-user .hhlivechat-message-content {
    background: var(--hhlivechat-bubble, var(--hhlivechat-primary, #007cba));
    color: #fff;
    display: inline-block;
}

.hhlivechat-message-system .hhlivechat-message-content {
    background: transparent;
    color: #888;
    font-size: 13px;
    font-style: italic;
    max-width: none;
    padding: 8px;
}

/* Message Text Formatting */
.hhlivechat-message-content strong {
    font-weight: 600;
}

.hhlivechat-message-content em {
    font-style: italic;
}

.hhlivechat-message-content a {
    color: var(--hhlivechat-primary, #007cba);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.hhlivechat-message-content a:hover {
    color: var(--hhlivechat-primary-dark, #005a8b);
}

.hhlivechat-message-user .hhlivechat-message-content a {
    color: #fff;
    text-decoration: underline;
}

.hhlivechat-message-user .hhlivechat-message-content a:hover {
    color: #e6f3ff;
}

/* Lists in Messages */
.hhlivechat-message-content ul,
.hhlivechat-message-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.hhlivechat-message-content li {
    margin: 4px 0;
}

/* Enhanced Markdown Formatting */
.hhlivechat-message-content p {
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.hhlivechat-message-content p:last-child {
    margin-bottom: 0;
}

/* Better spacing for inline elements */
.hhlivechat-message-content br {
    display: block;
    margin: 8px 0;
    content: '';
}

/* Links in messages */
.hhlivechat-message-content a {
    color: var(--hhlivechat-primary, #007cba);
    text-decoration: underline;
    font-weight: 500;
}

.hhlivechat-message-content a:hover {
    text-decoration: none;
}

/* Headers in messages */
.hhlivechat-message-content h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 8px 0;
}

.hhlivechat-message-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 14px 0 6px 0;
}

.hhlivechat-message-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 12px 0 4px 0;
}

/* Code blocks */
.hhlivechat-message-content pre {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.hhlivechat-message-content pre {
    background: rgba(255, 255, 255, 0.05);
}

.hhlivechat-message-content code {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.hhlivechat-message-content code {
    background: rgba(255, 255, 255, 0.1);
}

/* Enhanced list styling - Modern Design */
.hhlivechat-list {
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.hhlivechat-list li {
    margin: 12px 0;
    padding-left: 32px;
    position: relative;
    line-height: 1.6;
    color: var(--hhlivechat-text, #333);
}

/* Modern bullet points */
.hhlivechat-unordered-item:before {
    content: '';
    position: absolute;
    left: 12px;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: var(--hhlivechat-primary, #007cba);
    border-radius: 50%;
    opacity: 0.8;
}

.hhlivechat-ordered-item {
    counter-increment: list-item;
}

.hhlivechat-list-number {
    position: absolute;
    left: 8px;
    top: 0;
    font-weight: 600;
    font-size: 14px;
    color: var(--hhlivechat-primary, #007cba);
    background: var(--hhlivechat-bg, #ffffff);
    width: 20px;
    text-align: center;
}

/* Nested lists */
.hhlivechat-list .hhlivechat-list {
    margin: 8px 0;
}

.hhlivechat-list .hhlivechat-list .hhlivechat-unordered-item:before {
    width: 4px;
    height: 4px;
    opacity: 0.6;
}

/* AI Disclaimer - Mobile First */
.hhlivechat-ai-disclaimer {
    font-size: 9px;
    color: #999;
    margin-top: 2px;
    margin-left: 12px;
    margin-right: 12px;
    font-style: normal;
    opacity: 0.6;
    line-height: 1.2;
}

/* Typing Indicator */
.hhlivechat-typing-indicator {
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    background: var(--hhlivechat-bg-secondary);
}

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

.hhlivechat-typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--hhlivechat-typing-dots);
    border-radius: 50%;
    animation: hhlivechat-typing 1.4s infinite;
}

.hhlivechat-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.hhlivechat-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes hhlivechat-typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* Input Area - Mobile First */
.hhlivechat-widget-input {
    background: var(--hhlivechat-bg, #fff);
    border-top: 1px solid var(--hhlivechat-border, #e0e0e0);
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    position: sticky;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.hhlivechat-input-group {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.hhlivechat-input {
    flex: 1;
    border: 1px solid var(--hhlivechat-border, #e0e0e0);
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 16px !important; /* Prevent iOS zoom */
    resize: none;
    outline: none;
    max-height: 120px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.hhlivechat-input:focus {
    border-color: var(--hhlivechat-primary, #007cba);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.hhlivechat-input::placeholder {
    color: #999;
    opacity: 1;
}

.hhlivechat-send {
    background: var(--hhlivechat-bubble, var(--hhlivechat-primary, #007cba));
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.hhlivechat-send:hover {
    background: var(--hhlivechat-bubble-dark, var(--hhlivechat-primary-dark, #005a8b));
    transform: scale(1.1);
}

.hhlivechat-send:active {
    transform: scale(0.95);
}

.hhlivechat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Powered By Section - Mobile First */
.hhlivechat-powered-by {
    text-align: center;
    padding: 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0));
    font-size: 11px;
    color: #999;
    background: var(--hhlivechat-bg-secondary, #f5f5f5);
    position: relative;
    z-index: 15;
    flex-shrink: 0;
}


/* Pre-chat Form - Mobile First */
.hhlivechat-prechat-form {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--hhlivechat-bg, #fff);
    z-index: 10;
}

.hhlivechat-prechat-form[style*="flex"] {
    display: flex !important;
}

/* Form scrollable container */
.hhlivechat-form-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 16px;
    padding-top: calc(16px + env(safe-area-inset-top, 0));
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
    margin: 0 auto;
    width: 100%;
    min-height: 0;
}

.hhlivechat-form-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--hhlivechat-text, #333);
}

.hhlivechat-form-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0 0 24px 0;
}

.hhlivechat-form-group {
    margin-bottom: 16px;
}

.hhlivechat-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--hhlivechat-text, #333);
}

.hhlivechat-form-group input,
.hhlivechat-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--hhlivechat-border, #e0e0e0);
    border-radius: 6px;
    font-size: 16px !important; /* Prevent iOS zoom */
    font-family: inherit;
    transition: border-color 0.2s ease;
    height: 48px;
}

.hhlivechat-form-group input:focus,
.hhlivechat-select:focus {
    outline: none;
    border-color: var(--hhlivechat-primary, #007cba);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.hhlivechat-start-button,
.hhlivechat-form-submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--hhlivechat-primary, #007cba);
    color: #333333; /* Dark gray text color */
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 8px;
    margin-bottom: 20px; /* Ensure space at bottom */
    font-family: inherit;
    height: 48px;
    flex-shrink: 0; /* Don't let button shrink */
}

.hhlivechat-start-button:hover,
.hhlivechat-form-submit:hover {
    background: var(--hhlivechat-primary-dark, #005a8b);
}

.hhlivechat-start-button:disabled,
.hhlivechat-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Select Dropdown Styling */
.hhlivechat-select {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"%3E%3Cpath fill="%23e8e8e8" d="M10.293 0.293a1 1 0 0 1 1.414 1.414l-5 5a1 1 0 0 1-1.414 0l-5-5A1 1 0 0 1 1.707.293L6 4.586 10.293.293z"/%3E%3C/svg%3E');
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px 8px !important;
    padding-right: 36px;
    background-color: var(--hhlivechat-bg-secondary, #2a2a2a);
    color: var(--hhlivechat-text, #e8e8e8);
    cursor: pointer;
}

.hhlivechat-select:disabled {
    background-color: var(--hhlivechat-bg-secondary, #f5f5f5);
    cursor: not-allowed;
    opacity: 0.7;
}

.hhlivechat-select optgroup {
    font-weight: 600;
    font-style: normal;
    background-color: var(--hhlivechat-bg-secondary, #f5f5f5);
    color: var(--hhlivechat-text, #e8e8e8);
}

.hhlivechat-select option {
    font-weight: normal;
    padding-left: 8px;
    background-color: var(--hhlivechat-bg, #1a1a1a);
    color: var(--hhlivechat-text, #e8e8e8);
}

/* Override Divi theme form element colors */
.hhlivechat-widget select:focus,
.hhlivechat-select:focus,
.hhlivechat-widget input[type="text"]:focus,
.hhlivechat-widget input[type="email"]:focus,
.hhlivechat-widget input[type="tel"]:focus,
.hhlivechat-widget textarea:focus {
    color: var(--hhlivechat-text, #e8e8e8) !important;
}

/* Radio Buttons */
.hhlivechat-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hhlivechat-radio-group input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--hhlivechat-border, #e0e0e0);
    border-radius: 50%;
    background-color: var(--hhlivechat-bg, #fff);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0 8px 0 0;
    transition: all 0.2s ease;
}

.hhlivechat-radio-group input[type="radio"]:checked {
    border-color: var(--hhlivechat-primary, #007cba);
    background-color: var(--hhlivechat-primary, #007cba);
}

.hhlivechat-radio-group input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #fff;
}

.hhlivechat-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 12px;
    border: 1px solid var(--hhlivechat-border, #e0e0e0);
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.hhlivechat-radio-label:hover {
    border-color: var(--hhlivechat-primary, #007cba);
    background: rgba(0, 124, 186, 0.05);
}

.hhlivechat-radio-label span {
    display: inline-block;
    line-height: 1.2;
    vertical-align: middle;
}

.hhlivechat-radio-label input[type="radio"]:checked + span {
    font-weight: 500;
    color: var(--hhlivechat-primary, #007cba);
}

.hhlivechat-radio-label:has(input[type="radio"]:checked) {
    border-color: var(--hhlivechat-primary, #007cba);
    background: rgba(0, 124, 186, 0.05);
}

/* Vehicle Selection */
#hhlivechat-vehicle-selection {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--hhlivechat-border, #e0e0e0);
    animation: slideDown 0.3s ease-out;
}

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

/* Product Cards */
.hhlivechat-product-card {
    border: 1px solid var(--hhlivechat-border, #e0e0e0);
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    background: rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.hhlivechat-product-card:hover {
    border-color: var(--hhlivechat-primary, #007cba);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hhlivechat-product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.hhlivechat-product-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--hhlivechat-text, #333);
    flex: 1;
    margin-right: 8px;
}

.hhlivechat-product-price {
    font-weight: 700;
    font-size: 16px;
    color: var(--hhlivechat-primary, #007cba);
}

.hhlivechat-product-details {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.hhlivechat-product-part {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.hhlivechat-product-availability {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
}

.hhlivechat-availability-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.hhlivechat-availability-indicator.in-stock {
    background: #46b450;
}

.hhlivechat-availability-indicator.out-of-stock {
    background: #d63638;
}

.hhlivechat-product-locations {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

.hhlivechat-product-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.hhlivechat-product-button {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--hhlivechat-primary, #007cba);
    background: var(--hhlivechat-bg, #fff);
    color: var(--hhlivechat-primary, #007cba);
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.hhlivechat-product-button:hover {
    background: var(--hhlivechat-primary, #007cba);
    color: #fff;
}

.hhlivechat-product-button.primary {
    background: var(--hhlivechat-primary, #007cba);
    color: #fff;
}

.hhlivechat-product-button.primary:hover {
    background: var(--hhlivechat-primary-dark, #005a87);
    border-color: var(--hhlivechat-primary-dark, #005a87);
}

/* Product Search */
.hhlivechat-product-search {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--hhlivechat-border, #e0e0e0);
}

.hhlivechat-product-search input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--hhlivechat-border, #e0e0e0);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.hhlivechat-product-search button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: var(--hhlivechat-primary, #007cba);
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hhlivechat-product-search button:hover {
    background: var(--hhlivechat-primary-dark, #005a87);
}

/* Product Grid */
.hhlivechat-product-grid {
    display: grid;
    gap: 12px;
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}

/* Loading Spinner */
.hhlivechat-product-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.hhlivechat-product-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--hhlivechat-primary, #007cba);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Unread Count Badge */
.hhlivechat-unread-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b30;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* Actions */
.hhlivechat-actions {
    margin-top: 8px;
}

.hhlivechat-action-button {
    background: transparent;
    color: var(--hhlivechat-primary, #007cba);
    border: 1px solid var(--hhlivechat-primary, #007cba);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.hhlivechat-action-button:hover {
    background: var(--hhlivechat-primary, #007cba);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.2);
}

/* Minimized State */
.hhlivechat-widget.hhlivechat-minimized .hhlivechat-widget-container {
    height: auto !important;
    min-height: 0;
}

.hhlivechat-widget.hhlivechat-minimized .hhlivechat-widget-messages,
.hhlivechat-widget.hhlivechat-minimized .hhlivechat-widget-input,
.hhlivechat-widget.hhlivechat-minimized .hhlivechat-powered-by,
.hhlivechat-widget.hhlivechat-minimized .hhlivechat-prechat-form,
.hhlivechat-widget.hhlivechat-minimized .hhlivechat-modal-overlay {
    display: none !important;
}

.hhlivechat-widget.hhlivechat-minimized .hhlivechat-widget-header {
    border-radius: 12px;
}

/* Rotate minimize arrow when minimized */
.hhlivechat-widget.hhlivechat-minimized .hhlivechat-minimize svg {
    transform: rotate(180deg);
}

/* Connection Status */
.hhlivechat-connection-status {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
}

.hhlivechat-connection-status.offline {
    background: #f44336;
}

.hhlivechat-connection-status.connecting {
    background: #ff9800;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

/* Message Time */
.hhlivechat-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hhlivechat-message:hover .hhlivechat-message-time {
    opacity: 1;
}

/* Loading Skeleton */
.hhlivechat-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Keyboard Open States */
.hhlivechat-keyboard-open .hhlivechat-widget-messages {
    max-height: 40vh;
}

.hhlivechat-keyboard-open .hhlivechat-widget-header {
    padding: 8px 16px;
    min-height: 48px;
}

.hhlivechat-keyboard-open .hhlivechat-powered-by {
    display: none;
}

/* Dark Theme Support */
.hhlivechat-widget-container {
    background: var(--hhlivechat-bg);
    color: var(--hhlivechat-text);
}

.hhlivechat-widget-messages {
    background: var(--hhlivechat-bg-secondary);
}

.hhlivechat-message-ai .hhlivechat-message-content {
    background: var(--hhlivechat-ai-bubble-bg, #2d3748);
    border-color: var(--hhlivechat-ai-bubble-border, #4a5568);
    color: var(--hhlivechat-text, #e8e8e8);
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.05);
}

.hhlivechat-widget-input {
    background: var(--hhlivechat-bg);
    border-top-color: var(--hhlivechat-border);
}

.hhlivechat-input {
    background: var(--hhlivechat-bg-secondary);
    border-color: var(--hhlivechat-border);
    color: var(--hhlivechat-text);
}

.hhlivechat-powered-by {
    background: var(--hhlivechat-bg-secondary);
    color: #666;
}

.hhlivechat-ai-disclaimer {
    color: #666;
}


.hhlivechat-prechat-form {
    background: var(--hhlivechat-bg-secondary);
}

.hhlivechat-form-title {
    color: var(--hhlivechat-text);
}

.hhlivechat-form-subtitle {
    color: #aaa;
}

.hhlivechat-form-group label {
    color: var(--hhlivechat-text);
}

.hhlivechat-form-group input,
.hhlivechat-select {
    background: var(--hhlivechat-border);
    border-color: #555;
    color: var(--hhlivechat-text);
}

.hhlivechat-radio-label {
    border-color: #555;
    color: var(--hhlivechat-text);
}

.hhlivechat-radio-group input[type="radio"] {
    background-color: var(--hhlivechat-border);
    border-color: #555;
}

.hhlivechat-select {
    background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"%3E%3Cpath fill="%23aaa" d="M10.293 0.293a1 1 0 0 1 1.414 1.414l-5 5a1 1 0 0 1-1.414 0l-5-5A1 1 0 0 1 1.707.293L6 4.586 10.293.293z"/%3E%3C/svg%3E');
}

#hhlivechat-vehicle-selection {
    border-top-color: #555;
}

.hhlivechat-product-card {
    border-color: #555;
    background: rgba(255, 255, 255, 0.05);
}

.hhlivechat-product-title {
    color: var(--hhlivechat-text);
}

.hhlivechat-product-details,
.hhlivechat-product-locations {
    color: #aaa;
}

.hhlivechat-product-part {
    background: rgba(255, 255, 255, 0.1);
    color: var(--hhlivechat-text);
}

.hhlivechat-product-button {
    background: var(--hhlivechat-border);
    border-color: #555;
}

.hhlivechat-product-search {
    border-bottom-color: #555;
}

.hhlivechat-product-search input {
    background: var(--hhlivechat-border);
    border-color: #555;
    color: var(--hhlivechat-text);
}

.hhlivechat-product-loading {
    color: #aaa;
}

/* Auto Theme Support */

/* Mobile-specific positioning fixes */
@media (max-width: 480px) {
    /* Ensure widget button is visible and not cut off */
    .hhlivechat-widget.hhlivechat-bottom-right {
        position: fixed !important;
        bottom: 20px !important;
        right: 12px !important;
        left: auto !important;
        top: auto !important;
    }
    
    .hhlivechat-widget.hhlivechat-bottom-left {
        position: fixed !important;
        bottom: 20px !important;
        left: 12px !important;
        right: auto !important;
        top: auto !important;
    }
    
    /* Ensure button stays in viewport */
    .hhlivechat-widget-button {
        position: relative !important;
        margin: 0 !important;
    }
    
    /* Force widget container to be full width on mobile */
    .hhlivechat-widget-container {
        position: fixed !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        border-radius: 0 !important;
        transform: none !important;
    }
}

/* Tablet and Desktop Styles */
@media (min-width: 481px) {
    /* Widget button on larger screens */
    .hhlivechat-widget-button {
        width: 60px;
        height: 60px;
    }
    
    /* Reset positioning for desktop */
    .hhlivechat-widget.hhlivechat-bottom-right {
        bottom: 20px;
        right: 20px;
    }
    
    .hhlivechat-widget.hhlivechat-bottom-left {
        bottom: 20px;
        left: 20px;
    }
    
    /* Widget container on larger screens */
    .hhlivechat-widget-container {
        width: 380px !important;
        height: 600px !important;
        max-height: calc(100vh - 100px);
        border-radius: 12px !important;
        position: absolute !important;
        bottom: 80px !important;
        right: 0 !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        animation: none;
    }
    
    .hhlivechat-widget.hhlivechat-bottom-left .hhlivechat-widget-container {
        right: auto !important;
        left: 0 !important;
    }
    
    /* Header adjustments for desktop */
    .hhlivechat-widget-header {
        padding: 16px;
        position: relative;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    .hhlivechat-logo {
        width: 48px;
        height: 48px;
    }
    
    .hhlivechat-agent-avatar {
        width: 40px;
        height: 40px;
    }
    
    .hhlivechat-agent-status {
        font-size: 12px;
    }
    
    /* Messages area for desktop */
    .hhlivechat-widget-messages {
        padding: 12px;
        padding-bottom: 12px;
    }
    
    /* Message content for desktop */
    .hhlivechat-message-content {
        max-width: 90%;
        font-size: 13px;
    }
    
    .hhlivechat-message-wrapper {
        max-width: 95%;
    }
    
    /* Input area for desktop */
    .hhlivechat-widget-input {
        padding: 16px;
        padding-bottom: 16px;
        position: relative;
        box-shadow: none;
    }
    
    .hhlivechat-input {
        font-size: 14px !important;
        padding: 10px 16px;
        border-radius: 20px;
        max-height: 100px;
    }
    
    .hhlivechat-send {
        width: 40px;
        height: 40px;
    }
    
    /* Minimize/close buttons for desktop */
    .hhlivechat-minimize,
    .hhlivechat-close {
        width: auto;
        height: auto;
        padding: 8px;
        margin: 0;
    }
    
    .hhlivechat-minimize:hover,
    .hhlivechat-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    /* Powered by for desktop */
    .hhlivechat-powered-by {
        padding: 8px;
        padding-bottom: 8px;
        font-size: 12px;
    }
    
    /* Pre-chat form for desktop */
    .hhlivechat-prechat-form {
        position: absolute;
        top: 0;
        bottom: 0;
        height: 100%;
        overflow-y: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .hhlivechat-form-content {
        padding: 16px;
        padding-top: 16px;
        padding-bottom: 20px;
        overflow-y: auto;
        flex: 1;
    }
    
    /* Hide scrollbar on desktop */
    .hhlivechat-form-content::-webkit-scrollbar {
        display: none;
    }
    
    .hhlivechat-form-content {
        -ms-overflow-style: none; /* IE 11 */
        scrollbar-width: none; /* Firefox */
    }
    
    .hhlivechat-form-title {
        font-size: 20px;
    }
    
    .hhlivechat-form-subtitle {
        font-size: 14px;
    }
    
    .hhlivechat-form-group input,
    .hhlivechat-select {
        font-size: 14px !important;
        padding: 10px 12px;
        height: auto;
    }
    
    .hhlivechat-start-button,
    .hhlivechat-form-submit {
        padding: 12px 20px;
        border-radius: 6px;
        height: auto;
    }
    
    
    /* AI disclaimer for desktop */
    .hhlivechat-ai-disclaimer {
        font-size: 10px;
        margin-left: 16px;
        margin-right: 16px;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .hhlivechat-widget-container {
        max-height: 90vh !important;
    }
    
    .hhlivechat-widget-messages {
        max-height: calc(90vh - 120px);
    }
}

/* Touch-friendly targets */
@media (pointer: coarse) {
    .hhlivechat-widget button,
    .hhlivechat-action-button,
    .hhlivechat-send-button {
        min-width: 44px;
        min-height: 44px;
    }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    .hhlivechat-widget-container {
        height: -webkit-fill-available;
    }
    
    .hhlivechat-widget-button,
    .hhlivechat-send,
    .hhlivechat-minimize,
    .hhlivechat-close {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
    }
    
    .hhlivechat-input:focus {
        -webkit-appearance: none;
    }
}

/* Keyboard-open state adjustments for small viewports */
@media (max-width: 480px) and (max-height: 500px) {
    .hhlivechat-widget-messages {
        min-height: 100px;
    }
    
    .hhlivechat-prechat-form {
        padding-top: 10px;
    }
    
    .hhlivechat-form-title {
        display: none;
    }
    
    .hhlivechat-form-subtitle {
        display: none;
    }
}

/* Touch device specific optimizations */
@media (max-width: 480px) and (hover: none) and (pointer: coarse) {
    .hhlivechat-widget-button:active {
        transform: scale(0.95);
    }
    
    .hhlivechat-send:active,
    .hhlivechat-start-button:active {
        transform: scale(0.98);
    }
    
    .hhlivechat-minimize:hover,
    .hhlivechat-close:hover {
        background: transparent;
    }
}

/* Smooth transitions for mobile */
@media (max-width: 480px) {
    .hhlivechat-widget-container {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    }
    
    .hhlivechat-widget-messages {
        transition: max-height 0.3s ease;
    }
    
    .hhlivechat-keyboard-open * {
        transition: all 0.2s ease;
    }
    
    /* Prevent text selection on drag */
    .hhlivechat-widget * {
        user-select: none;
    }
    
    /* Allow text selection in messages, input, and form elements */
    .hhlivechat-message-content,
    .hhlivechat-input,
    .hhlivechat-form-content input,
    .hhlivechat-form-content select,
    .hhlivechat-form-content label {
        user-select: text;
    }
}

/* Accessibility improvements */
.hhlivechat-widget button:focus-visible,
.hhlivechat-widget input:focus-visible,
.hhlivechat-widget textarea:focus-visible {
    outline: 2px solid var(--hhlivechat-primary, #007cba);
    outline-offset: 2px;
}

.hhlivechat-widget button:focus:not(:focus-visible),
.hhlivechat-widget input:focus:not(:focus-visible),
.hhlivechat-widget textarea:focus:not(:focus-visible) {
    outline: none;
}


/* Skip to content link for screen readers */
.hhlivechat-skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: #000;
    color: #fff;
    text-decoration: none;
}

.hhlivechat-skip-link:focus {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

/* Keyboard navigation */
.hhlivechat-widget [tabindex] {
    position: relative;
}

.hhlivechat-widget [tabindex]:focus {
    z-index: 1;
}

/* Screen reader only text */
.hhlivechat-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ARIA live region styling */
.hhlivechat-aria-live {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hhlivechat-widget {
        border: 2px solid currentColor;
    }
    
    .hhlivechat-widget-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hhlivechat-widget *,
    .hhlivechat-widget *::before,
    .hhlivechat-widget *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
}

/* Print styles */
@media print {
    .hhlivechat-widget {
        display: none !important;
    }
}

/* Pulse animation for attention */
.hhlivechat-widget-button.hhlivechat-pulse {
    animation: pulse-button 2s infinite;
}

@keyframes pulse-button {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 124, 186, 0.4);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Container inner positioning context */
.hhlivechat-widget-container > * {
    position: relative;
}

/* ========================================
   NEW MODERN STYLES
   ======================================== */

/* Modal Overlay and Confirmation Dialog */
.hhlivechat-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hhlivechat-modal {
    background: var(--hhlivechat-bg, #fff);
    border-radius: 16px;
    padding: 0;
    margin: 20px;
    max-width: 400px;
    width: 100%;
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.hhlivechat-modal-content {
    padding: 32px 28px 24px;
    text-align: center;
    overflow-y: auto;
    max-height: calc(90vh - 60px);
    -webkit-overflow-scrolling: touch;
}

.hhlivechat-modal-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--hhlivechat-text, #333);
}

.hhlivechat-modal-text {
    font-size: 15px;
    line-height: 1.5;
    color: #666;
    margin: 0 0 28px 0;
}

.hhlivechat-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hhlivechat-modal-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.hhlivechat-modal-leave {
    background: #ff3b30;
    color: #fff;
}

.hhlivechat-modal-leave:hover {
    background: #d70015;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.hhlivechat-modal-minimize {
    background: var(--hhlivechat-primary, #007cba);
    color: #fff;
}

.hhlivechat-modal-minimize:hover {
    background: var(--hhlivechat-primary-dark, #005a8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.hhlivechat-modal-cancel {
    background: transparent;
    color: #666;
    border: 2px solid #e0e0e0;
}

.hhlivechat-modal-cancel:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* Lead Generation Modal Styles */
.hhlivechat-lead-modal {
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.hhlivechat-modal-header {
    padding: 28px 28px 0;
    text-align: center;
}

.hhlivechat-modal-header .hhlivechat-modal-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.hhlivechat-modal-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

.hhlivechat-lead-modal .hhlivechat-modal-content {
    overflow-y: auto;
    flex: 1;
    max-height: calc(50vh - 120px);
    padding: 24px 28px 28px;
    -webkit-overflow-scrolling: touch;
    /* Ensure submit button is visible */
    padding-bottom: 40px;
}

/* Close button for lead modal */
.hhlivechat-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.hhlivechat-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.hhlivechat-modal-close svg {
    width: 20px;
    height: 20px;
}

.hhlivechat-modal-close svg path {
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 2;
    fill: none;
}

.hhlivechat-lead-form {
    margin: 0;
    text-align: left;
}

.hhlivechat-lead-form .hhlivechat-form-group {
    margin-bottom: 24px;
}

.hhlivechat-lead-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.hhlivechat-label-text {
    font-weight: 500;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
}

.hhlivechat-required {
    color: #ff6b6b;
    font-size: 16px;
    font-weight: 400;
}

.hhlivechat-optional {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 400;
}

.hhlivechat-input-wrapper,
.hhlivechat-select-wrapper,
.hhlivechat-textarea-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.hhlivechat-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.hhlivechat-input-icon path {
    stroke: rgba(255, 255, 255, 0.7);
    stroke-width: 2;
    fill: none;
}

.hhlivechat-textarea-icon {
    top: 16px;
    transform: none;
}

.hhlivechat-lead-form input,
.hhlivechat-lead-form select,
.hhlivechat-lead-form textarea {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.hhlivechat-lead-form input::placeholder,
.hhlivechat-lead-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.hhlivechat-lead-form input:-webkit-autofill,
.hhlivechat-lead-form input:-webkit-autofill:hover,
.hhlivechat-lead-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.05) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.hhlivechat-lead-form select {
    cursor: pointer;
    appearance: none;
    padding-right: 48px;
}

.hhlivechat-lead-form select option {
    background: #2a2a2a;
    color: #ffffff;
    padding: 8px;
}

.hhlivechat-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.hhlivechat-select-arrow path {
    stroke: rgba(255, 255, 255, 0.7);
    stroke-width: 2;
    fill: none;
}

.hhlivechat-lead-form input:focus,
.hhlivechat-lead-form select:focus,
.hhlivechat-lead-form textarea:focus {
    outline: none;
    border-color: #ffc107;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.15);
}

.hhlivechat-form-group:focus-within .hhlivechat-input-icon path,
.hhlivechat-form-group:focus-within .hhlivechat-select-arrow path {
    stroke: #ffc107;
    transition: stroke 0.3s ease;
}

.hhlivechat-lead-form textarea {
    resize: vertical;
    min-height: 100px;
    padding-top: 14px;
    line-height: 1.5;
}

.hhlivechat-lead-submit {
    background: #ffc107;
    color: #000;
    border: none;
    width: 100%;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
}

.hhlivechat-lead-submit:hover:not(:disabled) {
    background: #ffcd38;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

.hhlivechat-lead-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.hhlivechat-lead-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.hhlivechat-btn-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hhlivechat-btn-spinner svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Contact Store Button Styles */
.hhlivechat-contact-action {
    margin: 12px 0 8px 0;
}

.hhlivechat-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--hhlivechat-primary, #007cba);
    color: #000;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.hhlivechat-contact-btn:hover {
    background: var(--hhlivechat-primary-dark, #005a8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
}

.hhlivechat-contact-btn:active {
    transform: translateY(0);
}

.hhlivechat-contact-icon {
    flex-shrink: 0;
}

/* Form Error Styles */
.hhlivechat-form-error {
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid #ff3b30;
    color: #ff3b30;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    animation: slideInError 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hhlivechat-form-error::before {
    content: "⚠️";
    font-size: 16px;
}

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

/* Modern Step-by-Step Form */
.hhlivechat-form-header {
    position: sticky;
    top: 0;
    background: var(--hhlivechat-bg, #fff);
    padding: 20px 24px;
    border-bottom: 1px solid var(--hhlivechat-border, #e0e0e0);
    z-index: 10;
}

.hhlivechat-progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.hhlivechat-progress-fill {
    height: 100%;
    background: var(--hhlivechat-primary, #007cba);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.hhlivechat-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hhlivechat-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hhlivechat-step.active {
    background: var(--hhlivechat-primary, #007cba);
    color: #333;
    transform: scale(1.1);
}

.hhlivechat-step-line {
    width: 60px;
    height: 2px;
    background: #e0e0e0;
    transition: background 0.3s ease;
}

.hhlivechat-step-line.active {
    background: var(--hhlivechat-primary, #007cba);
}

/* Form Step Animations */
.hhlivechat-form-step {
    animation: stepFadeIn 0.3s ease-out;
}

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

/* Modern Form Inputs */
.hhlivechat-modern-input {
    border: 2px solid #e0e0e0 !important;
    transition: all 0.2s ease !important;
    font-size: 16px !important;
}

.hhlivechat-modern-input:focus {
    border-color: var(--hhlivechat-primary, #007cba) !important;
    box-shadow: 0 0 0 4px rgba(0, 124, 186, 0.1) !important;
}

.hhlivechat-modern-select {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.hhlivechat-modern-select:hover:not(:disabled) {
    border-color: var(--hhlivechat-primary, #007cba) !important;
    background-color: var(--hhlivechat-bg-secondary, #2a2a2a) !important;
    color: var(--hhlivechat-text, #e8e8e8) !important;
}

/* Product Type Cards */
.hhlivechat-product-cards {
    display: grid;
    gap: 16px;
    margin-top: 8px;
}

.hhlivechat-product-card-option {
    position: relative;
    cursor: pointer;
}

.hhlivechat-product-card-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hhlivechat-product-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.hhlivechat-product-card-option input[type="radio"]:checked + .hhlivechat-product-card-content {
    border-color: var(--hhlivechat-primary, #007cba);
    background: rgba(0, 124, 186, 0.05);
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 124, 186, 0.15);
}

.hhlivechat-product-card-content:hover {
    border-color: var(--hhlivechat-primary, #007cba);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hhlivechat-product-card-content .hhlivechat-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.hhlivechat-product-card-content .hhlivechat-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--hhlivechat-text, #333);
    margin-bottom: 4px;
}

.hhlivechat-product-card-content .hhlivechat-description {
    font-size: 13px;
    color: #666;
}

/* Vehicle Selection Styling */
.hhlivechat-vehicle-header {
    margin: 24px 0 16px;
    padding: 16px;
    background: rgba(0, 124, 186, 0.05);
    border-radius: 8px;
}

.hhlivechat-vehicle-header h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--hhlivechat-text, #333);
}

.hhlivechat-vehicle-header p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.hhlivechat-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Form Actions with Modern Buttons */
.hhlivechat-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.hhlivechat-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hhlivechat-btn-primary {
    background: var(--hhlivechat-primary, #007cba);
    color: #333;
    flex: 1;
}

.hhlivechat-btn-primary:hover {
    background: var(--hhlivechat-primary-dark, #005a8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.3);
}

.hhlivechat-btn-secondary {
    background: transparent;
    color: #666;
    border: 2px solid #e0e0e0;
}

.hhlivechat-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.hhlivechat-arrow {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.hhlivechat-btn:hover .hhlivechat-arrow {
    transform: translateX(2px);
}

.hhlivechat-btn-secondary:hover .hhlivechat-arrow {
    transform: translateX(-2px);
}

/* Summary Section */
.hhlivechat-form-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.hhlivechat-form-summary h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--hhlivechat-text, #333);
}

.hhlivechat-summary-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hhlivechat-summary-item {
    font-size: 14px;
    color: #666;
}

.hhlivechat-summary-item strong {
    color: var(--hhlivechat-text, #333);
}

/* Form Error Messages */
.hhlivechat-form-error {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Spinner for Loading States */
.hhlivechat-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Message Status Indicators */
.hhlivechat-message-status {
    margin-top: 4px;
    text-align: right;
}

.hhlivechat-status-indicator {
    display: inline-flex;
    align-items: center;
    color: #999;
    transition: color 0.2s ease;
}

.hhlivechat-status-indicator svg {
    width: 16px;
    height: 16px;
}

.hhlivechat-status-sent {
    color: #999;
}

.hhlivechat-status-delivered {
    color: #666;
}

.hhlivechat-status-read {
    color: var(--hhlivechat-primary, #007cba);
}

/* Enhanced Message Animations */
.hhlivechat-message {
    animation: messageSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hhlivechat-message-user {
    animation-name: messageSlideInRight;
}

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

/* Modern Message Bubbles with Company Colors */
.hhlivechat-message-content {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.hhlivechat-message-user .hhlivechat-message-content {
    background: #FEDD00; /* Yellow company color */
    color: #232323; /* Black company color */
    box-shadow: 0 2px 12px rgba(254, 221, 0, 0.3);
}

.hhlivechat-message-user .hhlivechat-message-content a {
    color: #232323;
    text-decoration: underline;
}

.hhlivechat-message-ai .hhlivechat-message-content {
    background: var(--hhlivechat-ai-bubble-bg, #f8f9fa);
    border: 1px solid var(--hhlivechat-ai-bubble-border, #e9ecef);
    color: var(--hhlivechat-text, #333);
}

/* Button Color Contrast Helper */
.hhlivechat-start-button,
.hhlivechat-form-submit {
    /* Color will be set dynamically based on background */
}

/* Dark Theme Adjustments for New Elements */
.hhlivechat-modal {
    background: var(--hhlivechat-bg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hhlivechat-form-header {
    background: var(--hhlivechat-bg);
    border-bottom-color: var(--hhlivechat-border);
}

.hhlivechat-product-card-content {
    border-color: var(--hhlivechat-border);
}

.hhlivechat-product-card-option input[type="radio"]:checked + .hhlivechat-product-card-content {
    background: rgba(254, 221, 0, 0.1);
}

.hhlivechat-form-summary {
    background: var(--hhlivechat-bg-secondary);
}

.hhlivechat-form-error {
    background: rgba(255, 59, 48, 0.1);
}

/* Responsive Adjustments for New Elements */
@media (max-width: 480px) {
    /* Minimized state on mobile */
    .hhlivechat-widget.hhlivechat-minimized .hhlivechat-widget-container {
        height: 56px !important;
        position: fixed !important;
        top: auto !important;
        bottom: 80px !important;
        width: auto !important;
        left: 20px !important;
        right: 20px !important;
        border-radius: 28px !important;
    }
    
    .hhlivechat-modal {
        margin: 0;
        border-radius: 0;
        height: 100vh;
        max-width: 100vw;
        display: flex;
        flex-direction: column;
    }
    
    .hhlivechat-modal-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 60px;
    }
    
    .hhlivechat-lead-modal {
        max-height: 100vh;
        height: 100vh;
        width: 100vw;
        margin: 0;
        border-radius: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .hhlivechat-lead-modal .hhlivechat-modal-content {
        max-height: calc(50vh - 120px);
        padding: 20px;
        padding-bottom: 30px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .hhlivechat-modal-header {
        padding: 20px 20px 0;
    }
    
    .hhlivechat-modal-header .hhlivechat-modal-title {
        font-size: 22px;
    }
    
    .hhlivechat-modal-subtitle {
        font-size: 14px;
    }
    
    .hhlivechat-lead-form .hhlivechat-form-group {
        margin-bottom: 20px;
    }
    
    .hhlivechat-lead-form input,
    .hhlivechat-lead-form select,
    .hhlivechat-lead-form textarea {
        font-size: 16px !important; /* Prevent iOS zoom */
        padding: 12px 12px 12px 44px;
    }
    
    .hhlivechat-lead-submit {
        padding: 14px 20px;
        font-size: 14px;
        margin-top: 20px;
    }
    
    .hhlivechat-modal-close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
    }
    
    .hhlivechat-input-icon {
        width: 18px;
        height: 18px;
        left: 14px;
    }
    
    .hhlivechat-select-arrow {
        width: 18px;
        height: 18px;
        right: 14px;
    }
    
    .hhlivechat-form-row {
        grid-template-columns: 1fr;
    }
    
    .hhlivechat-product-card-content {
        padding: 20px;
    }
    
    .hhlivechat-product-card-content .hhlivechat-icon {
        font-size: 36px;
    }
}

/* Desktop minimized state */
@media (min-width: 481px) {
    .hhlivechat-widget.hhlivechat-minimized .hhlivechat-widget-container {
        height: 60px !important;
        width: 380px !important;
    }
}

/* Waving Hand Attention Grabber */
.hhlivechat-attention-wrapper {
    position: absolute;
    bottom: 65px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    z-index: 2147483646;
}

.hhlivechat-attention-wrapper.hhlivechat-active {
    opacity: 1;
    visibility: visible;
}

/* Waving hand GIF - bigger and outside */
.hhlivechat-wave-hand {
    width: 48px;
    height: 48px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Text bubble */
.hhlivechat-attention-grabber {
    background: var(--hhlivechat-bubble, var(--hhlivechat-primary, #007cba));
    color: #fff;
    padding: 12px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    font-weight: 500;
    font-size: 14px;
    position: relative;
}

/* Speech bubble arrow pointing to waving hand */
.hhlivechat-attention-grabber::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--hhlivechat-bubble, var(--hhlivechat-primary, #007cba));
}

/* Adjust position for right-aligned widget */
.hhlivechat-widget.hhlivechat-bottom-right .hhlivechat-attention-wrapper {
    right: 0;
    left: auto;
    flex-direction: row-reverse;
}

.hhlivechat-widget.hhlivechat-bottom-right .hhlivechat-attention-grabber::before {
    left: auto;
    right: -8px;
    border-left: 8px solid var(--hhlivechat-bubble, var(--hhlivechat-primary, #007cba));
    border-right: none;
}

/* Adjust position for left-aligned widget */
.hhlivechat-widget.hhlivechat-bottom-left .hhlivechat-attention-wrapper {
    left: 0;
    right: auto;
    flex-direction: row;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .hhlivechat-attention-wrapper {
        bottom: 60px;
        gap: 10px;
    }
    
    .hhlivechat-wave-hand {
        width: 36px;
        height: 36px;
    }
    
    .hhlivechat-attention-grabber {
        font-size: 13px;
        padding: 10px 16px;
    }
}