KERBEN

Services

Cart

Account

PROFESSIONAL
HANDYMAN SERVICES

HOME REPAIRS & IMPROVEMENTS

Emergency Call!

Make an appointment

Get 10% off

Promocode : HANDY

Service You Can Trust!

month warranty

experienced

craftsman

best

quality

Electric

Plumbing

Minors repairs

Doors

Windows

Furniture

Kitchens

Moving

Floor

Outdoor maintenance

Screen installation or repair

Apliance instalation

Sealing & caulking

Air condicioner & ventilation

We provide fixed-price services

SEE the pictires

Ответим на любые вопросы о ремонте

Здравствуйте! Я ваш консультант KerbenPRO. Чем могу помочь с ремонтом или установкой?
📎
/* Основной контейнер с эффектом матового стекла (Glassmorphism) */ .kerben-ai-widget { background: rgba(10, 15, 45, 0.75); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-radius: 20px; padding: 40px; max-width: 900px; margin: 20px auto; color: #ffffff; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); } .ai-header-title { text-align: center; font-size: 26px; margin-bottom: 30px; font-weight: 500; letter-spacing: 0.5px; } .chat-display { height: 250px; overflow-y: auto; margin-bottom: 25px; padding-right: 10px; } /* Стилизация скроллбара */ .chat-display::-webkit-scrollbar { width: 4px; } .chat-display::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; } .message { margin-bottom: 15px; padding: 12px 18px; border-radius: 12px; max-width: 85%; font-size: 15px; line-height: 1.4; } .bot-msg { background: rgba(138, 43, 226, 0.15); border: 1px solid rgba(138, 43, 226, 0.3); align-self: flex-start; } .user-msg { background: rgba(255, 255, 255, 0.1); margin-left: auto; border: 1px solid rgba(255, 255, 255, 0.1); text-align: right; } /* Поле ввода как на скриншоте */ .input-wrapper { display: flex; align-items: center; background: rgba(0, 0, 0, 0.2); border: 2px solid #6e32f0; /* Яркая фиолетовая рамка */ border-radius: 12px; padding: 10px 20px; transition: all 0.3s ease; } .input-wrapper:focus-within { box-shadow: 0 0 15px rgba(110, 50, 240, 0.4); border-color: #8a2be2; } .attach-icon { font-size: 22px; color: #a0a0a0; margin-right: 15px; cursor: pointer; } #userRequestInput { flex: 1; background: transparent; border: none; color: #fff; font-size: 16px; outline: none; } #userRequestInput::placeholder { color: #707070; } .send-btn { background: transparent; border: none; color: #6e32f0; cursor: pointer; display: flex; align-items: center; transition: transform 0.2s ease; } .send-btn:hover { transform: scale(1.1); color: #8a2be2; } document.addEventListener('DOMContentLoaded', () => { const inputField = document.getElementById('userRequestInput'); const sendBtn = document.getElementById('submitRequestBtn'); const chatDisplay = document.getElementById('chatDisplay'); async function processUserMessage() { const text = inputField.value.trim(); if (!text) return; // 1. Добавляем вопрос пользователя в чат addMessageToUI(text, 'user-msg'); inputField.value = ''; // 2. Индикатор загрузки const tempBotMsgId = 'loading-' + Date.now(); addMessageToUI('Думаю...', 'bot-msg', tempBotMsgId); try { // 3. Запрос к вашему безопасному серверному эндпоинту const response = await fetch('/wp-json/ai-consultant/v1/ask', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ message: text }) }); const data = await response.json(); // Удаляем "Думаю..." и ставим реальный ответ document.getElementById(tempBotMsgId).remove(); addMessageToUI(data.reply || 'Извините, произошла ошибка.', 'bot-msg'); } catch (error) { document.getElementById(tempBotMsgId).remove(); addMessageToUI('Ошибка связи с сервером KerbenPRO.', 'bot-msg'); } } function addMessageToUI(text, className, id = '') { const msgDiv = document.createElement('div'); if (id) msgDiv.id = id; msgDiv.className = 'message ' + className; msgDiv.textContent = text; chatDisplay.appendChild(msgDiv); chatDisplay.scrollTop = chatDisplay.scrollHeight; } // Обработка нажатия кнопки sendBtn.addEventListener('click', processUserMessage); // Обработка нажатия Enter (как вы просили) inputField.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); processUserMessage(); } }); });
Воскресенье Закрыть
Суббота с 10:00 до 19:00
Понедельник с 10:00 до 19:00
Вторник с 10:00 до 19:00
Среда с 10:00 до 19:00
Четверг с 10:00 до 19:00
Пятница с 10:00 до 19:00