/* Drivebox ChatBot Widget - Cursor Style v33 - No Zoom Fix */

/* ПРОСТАЯ кнопка чата - ЧЕРНЫЙ КРУГ С БЕЛОЙ ИКОНКОЙ */
#simpleChatbotToggle,
.chatbot-toggle,
.chatbot-toggle-minimal,
button[id="simpleChatbotToggle"],
button.chatbot-toggle-minimal {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: #000000 !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    visibility: visible !important;
    opacity: 1 !important;
    outline: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Принудительная унификация для всех возможных селекторов */
*[id*="chatbot"],
*[class*="chatbot-toggle"] {
    font-size: 0 !important; /* Убираем возможный текст */
}

/* Белые SVG иконки внутри черного круга */
#simpleChatbotToggle svg,
.chatbot-toggle svg,
.chatbot-toggle-minimal svg {
    width: 22px !important;
    height: 22px !important;
    fill: none !important;
    stroke: #ffffff !important;
    pointer-events: none !important;
}

/* УДАЛЕНО - кнопка отправки теперь просто стрелка БЕЗ фона */
/* Стили перенесены в chat-button-final-fix.css */

/* Выравнивание input wrapper */
.chatbot-input-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
}

/* Простые hover эффекты для черного круга */
#simpleChatbotToggle:hover,
.chatbot-toggle:hover,
.chatbot-toggle-minimal:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
    background: #111111 !important;
}

/* Активное состояние */
#simpleChatbotToggle:active,
.chatbot-toggle:active,
.chatbot-toggle-minimal:active {
    transform: scale(0.95) !important;
}

/* ПРИНУДИТЕЛЬНОЕ СКРЫТИЕ КНОПКИ ЧАТА */
#simpleChatbotToggle.chat-hidden,
.chatbot-toggle.chat-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scale(0.8) !important;
}

/* МОБИЛЬНОЕ ПРИНУДИТЕЛЬНОЕ СКРЫТИЕ */
@media (max-width: 768px) {
    #simpleChatbotToggle.chat-hidden,
    .chatbot-toggle.chat-hidden {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: scale(0.5) !important;
        z-index: -1 !important;
        display: none !important;
    }
}

@media (max-width: 480px) {
    #simpleChatbotToggle.chat-hidden,
    .chatbot-toggle.chat-hidden {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: scale(0.3) !important;
        z-index: -999999 !important;
        display: none !important;
    }
}

/* МОБИЛЬНЫЕ СТИЛИ - ПРОСТОЙ ЧЕРНЫЙ КРУГ */
@media (max-width: 768px) {
    #simpleChatbotToggle,
    .chatbot-toggle,
    .chatbot-toggle-minimal,
    button[id="simpleChatbotToggle"],
    button.chatbot-toggle-minimal {
        bottom: 15px !important;
        right: 15px !important;
        width: 46px !important;
        height: 46px !important;
        border-radius: 50% !important;
        background: #000000 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Мобильные SVG */
    #simpleChatbotToggle svg,
    .chatbot-toggle svg,
    .chatbot-toggle-minimal svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    /* Мобильная кнопка отправки */
    #simpleChatbotSend,
    .chatbot-send {
        width: 20px !important;
        height: 20px !important;
    }
    
    #simpleChatbotSend svg,
    .chatbot-send svg {
        width: 8px !important;
        height: 8px !important;
    }
    
    /* Мобильное выравнивание */
    .chatbot-input-wrapper {
        padding: 6px 10px !important;
        gap: 6px !important;
    }
}
    
    /* Мобильные стили для кнопки закрытия */
    .chatbot-close,
    #simpleChatbotClose {
        width: 40px !important;
        height: 40px !important;
        padding: 10px !important;
    }
    
    .chatbot-close svg,
    #simpleChatbotClose svg {
        width: 18px !important;
        height: 18px !important;
    }
}

@media (max-width: 480px) {
    #simpleChatbotToggle,
    .chatbot-toggle {
        bottom: 10px !important;
        right: 10px !important;
        width: 50px !important;
        height: 50px !important;
        z-index: 999999 !important;
    }
    
    #simpleChatbotToggle svg,
    .chatbot-toggle svg {
        width: 20px !important;
        height: 20px !important;
    }
}

#simpleChatbotToggle:hover,
.chatbot-toggle:hover {
    background: #333333 !important;
    transform: scale(1.05) !important;
    border-color: #555555;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.chatbot-toggle:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.chatbot-toggle img,
.chatbot-toggle svg {
    width: 24px !important;
    height: 24px !important;
    border-radius: 0 !important;
    object-fit: contain !important;
    filter: brightness(0) invert(1) !important;
    pointer-events: none !important;
}

/* Мобильные размеры иконки */
@media (max-width: 768px) {
    .chatbot-toggle img,
    .chatbot-toggle svg,
    #simpleChatbotToggle img {
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 480px) {
    .chatbot-toggle img,
    .chatbot-toggle svg,
    #simpleChatbotToggle img {
        width: 18px !important;
        height: 18px !important;
    }
}

.chatbot-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    background: #333333;
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

.chatbot-toggle.active svg {
    transform: rotate(45deg);
}

/* Chat Widget Container */
.chatbot-widget,
#simpleChatbotWidget {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 360px;
    height: 560px;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    z-index: 99998 !important;
    display: none !important; /* По умолчанию скрыт */
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chatbot-widget.active,
#simpleChatbotWidget.active {
    display: flex !important; /* Показываем только когда активен */
}

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

/* Chat Header */
.chatbot-header {
    background: #2d2d30;
    border-bottom: 1px solid #333333;
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
    min-height: 60px;
    box-sizing: border-box;
    position: relative;
}

/* Кнопка закрытия чата - ПРИНУДИТЕЛЬНЫЕ СТИЛИ */
.chatbot-close,
#simpleChatbotClose {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    opacity: 0.9 !important;
    visibility: visible !important;
    width: 28px !important;
    height: 28px !important;
    z-index: 1 !important;
    position: relative !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    align-self: center !important;
    box-sizing: border-box !important;
    top: 0 !important;
    transform: translateY(0) !important;
}

.chatbot-close:hover,
#simpleChatbotClose:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

.chatbot-close svg,
#simpleChatbotClose svg {
    width: 16px !important;
    height: 16px !important;
    stroke: white !important;
    fill: none !important;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.chatbot-avatar {
    width: 32px;
    height: 32px;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chatbot-avatar img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}

.chatbot-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
}

.chatbot-subtitle {
    font-size: 12px;
    color: #cccccc;
    margin: 0;
}

.chatbot-close {
    background: transparent;
    border: 1px solid #333333;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #cccccc;
    transition: all 0.2s ease;
}

.chatbot-close:hover {
    background: #333333;
    border-color: #555555;
    color: #ffffff;
}

/* Chat Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
}

.chatbot-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    animation: messageSlide 0.3s ease-out;
}

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

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

.chatbot-message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.chatbot-message--bot .chatbot-message-avatar {
    background: #ffffff;
    border-color: #e5e5e5;
}

.chatbot-message--user .chatbot-message-avatar {
    background: #e8e8e8;
    border-color: #d1d1d1;
}

.chatbot-message-avatar img {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
}

.chatbot-message-content {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid;
}

.chatbot-message--bot .chatbot-message-content {
    background: #ffffff;
    color: #333333;
    border-color: #e5e5e5;
}

.chatbot-message--user .chatbot-message-content {
    background: #e8e8e8;
    color: #333333;
    border-color: #d1d1d1;
}

/* Welcome Message */
.chatbot-welcome {
    text-align: center;
    padding: 1.5rem;
    background: white;
    margin: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.chatbot-welcome-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
}

.chatbot-welcome-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: #333;
}

.chatbot-welcome-text {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Quick Actions */
.chatbot-quick-actions {
    padding: 0 1rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chatbot-quick-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #667eea;
    white-space: nowrap;
}

.chatbot-quick-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

/* Typing Indicator */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: #666;
    font-size: 0.85rem;
}

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

.chatbot-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #667eea;
    animation: typing 1.4s infinite ease-in-out;
}

.chatbot-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

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

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Input Area */
.chatbot-input-area {
    padding: 16px !important;
    border-top: 1px solid #e5e5e5 !important;
    background: #fafafa !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 60px !important;
    position: relative !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
}

.chatbot-input-wrapper {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    background: #ffffff !important;
    border-radius: 4px !important;
    padding: 10px 12px !important;
    border: 1px solid #e5e5e5 !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 44px !important;
}

.chatbot-input-wrapper:focus-within {
    border-color: #000000;
}

.chatbot-input {
    flex: 1 !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 16px !important; /* 16px чтобы iOS не зумил */
    line-height: 1.5 !important;
    resize: none !important;
    max-height: 100px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 300 !important;
}

.chatbot-input::placeholder {
    color: #999999;
    font-weight: 300;
}

.chatbot-send {
    width: 32px !important;
    height: 32px !important;
    border: 1px solid #000000 !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    color: #000000 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

.chatbot-send:hover {
    opacity: 1 !important;
    color: #ffffff !important;
    background: #000000 !important;
    border-color: #000000 !important;
    transform: none !important;
    box-shadow: none !important;
}

.chatbot-send:hover svg path {
    stroke: #ffffff !important;
}

.chatbot-send:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    background: #ffffff !important;
    border-color: #e5e5e5 !important;
}

.chatbot-send svg {
    width: 14px !important;
    height: 14px !important;
    pointer-events: none !important;
}

.chatbot-send svg path {
    stroke: #000000 !important;
    transition: stroke 0.2s ease !important;
}

/* МОБИЛЬНЫЕ СТИЛИ ДЛЯ КНОПКИ ОТПРАВКИ */
@media (max-width: 768px) {
    /* Input area на мобильных */
    .chatbot-input-area,
    #chatbotInputArea {
        padding: 14px !important;
        min-height: 70px !important;
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #ffffff !important;
        border-top: 2px solid #e5e5e5 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 999999 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .chatbot-send {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        align-self: center !important;
        background: #000000 !important;
        opacity: 1 !important;
    }
    
    .chatbot-send svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    .chatbot-input-wrapper {
        padding: 14px !important;
        gap: 10px !important;
        min-height: 44px !important;
        align-items: center !important;
    }
    
    .chatbot-input,
    #simpleChatbotInput {
        font-size: 16px !important; /* Чтобы iOS не зумил */
        min-height: 40px !important;
    }
    
    /* Мобильные стили для кнопки закрытия */
    .chatbot-close,
    #simpleChatbotClose {
        width: 36px !important;
        height: 36px !important;
        padding: 8px !important;
        align-self: center !important;
    }
    
    .chatbot-close svg,
    #simpleChatbotClose svg {
        width: 18px !important;
        height: 18px !important;
    }
}

@media (max-width: 480px) {
    /* Input area на очень маленьких экранах */
    .chatbot-input-area,
    #chatbotInputArea {
        padding: 16px !important;
        min-height: 80px !important;
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #ffffff !important;
        border-top: 2px solid #e5e5e5 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 999999 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .chatbot-send {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        align-self: center !important;
        background: #000000 !important;
        opacity: 1 !important;
    }
    
    .chatbot-send svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .chatbot-input-wrapper {
        padding: 16px !important;
        gap: 12px !important;
        min-height: 48px !important;
        align-items: center !important;
    }
    
    .chatbot-input,
    #simpleChatbotInput {
        font-size: 16px !important; /* Чтобы iOS не зумил */
        min-height: 44px !important;
    }
    
    /* Мобильные стили для очень маленьких экранов */
    .chatbot-close,
    #simpleChatbotClose {
        width: 40px !important;
        height: 40px !important;
        padding: 10px !important;
        align-self: center !important;
    }
    
    .chatbot-close svg,
    #simpleChatbotClose svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .chatbot-header {
        padding: 12px 16px !important;
        min-height: 50px !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .chatbot-widget,
    #simpleChatbotWidget,
    #chatbotWidget {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important; /* Dynamic viewport height для современных браузеров */
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        border-radius: 0 !important;
        max-width: 100vw !important;
        max-height: 100dvh !important;
        flex-direction: column !important;
        position: fixed !important;
        z-index: 999999 !important; /* Поверх всего контента */
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Виджет скрыт по умолчанию на мобилке тоже */
    .chatbot-widget:not(.active),
    #simpleChatbotWidget:not(.active) {
        display: none !important;
    }
    
    /* Виджет показывается только с классом active */
    .chatbot-widget.active,
    #simpleChatbotWidget.active {
        display: flex !important;
    }
    
    /* Хедер фиксированный */
    .chatbot-header {
        flex-shrink: 0 !important;
        position: relative !important;
    }
    
    /* Контейнер сообщений - занимает всё доступное пространство */
    .chatbot-messages,
    #simpleChatbotMessages {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 16px !important;
        padding-bottom: 20px !important;
        min-height: 0 !important; /* Важно для flex shrink */
    }
    
    /* Input area ПРИКРЕПЛЕН к низу, НЕ скроллится */
    .chatbot-input-area,
    #chatbotInputArea {
        flex-shrink: 0 !important;
        position: relative !important;
        bottom: 0 !important;
        width: 100% !important;
        background: #fff !important;
        border-top: 2px solid #e5e5e5 !important;
        padding: 12px 16px !important;
        padding-bottom: max(12px, env(safe-area-inset-bottom)) !important; /* Фикс для iOS notch */
        z-index: 10 !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
    }
    
    /* Input wrapper */
    .chatbot-input-wrapper {
        display: flex !important;
        align-items: flex-end !important;
        gap: 10px !important;
    }
    
    /* Textarea */
    .chatbot-input,
    #simpleChatbotInput {
        max-height: 80px !important; /* Ограничиваем высоту */
        font-size: 16px !important; /* Отключаем автозум iOS */
    }
    
    .chatbot-toggle,
    #simpleChatbotToggle,
    #chatbotToggle {
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
    }
    
    .chatbot-toggle svg {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .chatbot-widget {
        width: calc(100vw - 20px) !important;
        height: calc(100vh - 100px) !important;
        bottom: 70px !important;
        right: 10px !important;
        left: 10px !important;
        z-index: 999998 !important;
        max-height: 500px !important;
    }
    
    .chatbot-toggle,
    #simpleChatbotToggle {
        bottom: 15px !important;
        right: 15px !important;
        width: 52px !important;
        height: 52px !important;
        z-index: 999999 !important;
    }
    
    .chatbot-toggle svg {
        width: 24px;
        height: 24px;
    }
    
    .chatbot-message-content {
        max-width: 85%;
    }
}

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

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* Welcome Form Styles - БАННЕР СТИЛЬ */
.chatbot-welcome-form {
    padding: 0 !important;
    text-align: left !important;
    background: #f5f5f5 !important;
    margin: 0 !important;
    overflow: visible !important;
    position: relative !important;
    min-height: 400px !important;
    border-top: 1px solid #e0e0e0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.chatbot-welcome-form-content {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 40px 30px !important;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%) !important;
    border-top: 1px solid #d0d0d0 !important;
    border-bottom: 1px solid #d0d0d0 !important;
    position: relative !important;
}

.chatbot-welcome-form-content::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 20px !important;
    right: 20px !important;
    height: 1px !important;
    background: #000 !important;
    opacity: 0.15 !important;
}

.chatbot-welcome-form-content::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 20px !important;
    right: 20px !important;
    height: 1px !important;
    background: #000 !important;
    opacity: 0.15 !important;
}

@media (max-width: 768px) {
    .chatbot-welcome-form-content {
        padding: 30px 20px !important;
    }
}

.chatbot-welcome-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.3px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-align: center !important;
}

.chatbot-welcome-subtitle {
    font-size: 13px !important;
    color: #999999 !important;
    margin: 0 0 30px 0 !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-align: center !important;
}

.chatbot-client-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
    position: relative !important;
}

.chatbot-form-group {
    position: relative !important;
    overflow: visible !important;
    z-index: 1 !important;
}

.chatbot-client-form input {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #e5e5e5 !important;
    border-radius: 4px !important;
    background: #fafafa !important;
    color: #000000 !important;
    font-size: 16px !important; /* 16px чтобы iOS не зумил */
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    font-weight: 400 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.chatbot-client-form input:focus {
    outline: none !important;
    border-color: #000000 !important;
    background: #ffffff !important;
    box-shadow: 2px 2px 0 #000 !important;
    transform: translateX(2px) translateY(-2px) !important;
}

.chatbot-client-form input::placeholder {
    color: #999999 !important;
    font-weight: 300 !important;
}

.chatbot-form-submit {
    width: 100% !important;
    padding: 14px !important;
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #000000 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 24px 0 0 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 2 !important;
    box-shadow: 2px 2px 0 #000 !important;
    display: block !important;
}

.chatbot-form-submit:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    box-shadow: 3px 3px 0 #000 !important;
    transform: translateX(-1px) translateY(-1px) !important;
}

.chatbot-form-submit:active {
    transform: translateX(0) translateY(0) !important;
    box-shadow: 1px 1px 0 #000 !important;
}

.chatbot-privacy-text {
    font-size: 11px !important;
    color: #999999 !important;
    margin: 20px 0 0 0 !important;
    line-height: 1.6 !important;
    font-weight: 300 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-align: center !important;
}

/* Shake animation for form inputs */
@keyframes shakeInput {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Animation for widget appearance */
.chatbot-widget.show {
    animation: widgetSlideIn 0.3s ease-out;
}

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