/* ASPGulf Smart Advisor - Chatbot */
:root { --wln-primary: #0066CC; --wln-primary-dark: #004C99; --wln-border: #e0e0e0; --wln-text: #333; --wln-text-light: #666; --wln-bg: #fff; --wln-bot-bg: #f5f5f5; }

.wln-chat-button { position: fixed; bottom: 105px; right: 30px; width: 60px; height: 60px; border-radius: 50%; background: var(--wln-primary); border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2); z-index: 99998; display: flex; align-items: center; justify-content: center; transition: transform 0.3s, box-shadow 0.3s; }
.wln-chat-button:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.wln-chat-button svg { width: 28px; height: 28px; fill: #fff; }

.wln-chat-window { position: fixed; bottom: 100px; right: 25px; width: 400px; max-height: 600px; background: var(--wln-bg); border-radius: 16px; box-shadow: 0 5px 40px rgba(0,0,0,0.15); z-index: 99999; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--wln-border); opacity: 0; visibility: hidden; transform: translateY(20px); transition: opacity 0.3s, transform 0.3s, visibility 0.3s; }
.wln-chat-window.wln-open { opacity: 1; visibility: visible; transform: translateY(0); }

.wln-chat-header { padding: 18px 20px; background: var(--wln-primary); border-bottom: 1px solid var(--wln-border); display: flex; align-items: center; justify-content: space-between; }
.wln-chat-title { font-size: 16px; font-weight: 600; color: #fff; margin: 0; display: flex; align-items: center; gap: 10px; }
.wln-chat-title-icon { width: 32px; height: 32px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.wln-chat-title-icon svg { width: 18px; height: 18px; fill: #fff; }
.wln-chat-close { background: none; border: none; color: rgba(255,255,255,0.8); cursor: pointer; padding: 5px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.wln-chat-close:hover { color: #fff; }
.wln-chat-close svg { fill: currentColor; }

.wln-chat-messages { flex: 1; overflow-y: auto; padding: 20px; background: var(--wln-bg); min-height: 300px; scroll-behavior: smooth; }

.wln-message { margin-bottom: 16px; animation: wlnFadeIn 0.3s ease; }
@keyframes wlnFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.wln-message-bot { max-width: 90%; }
.wln-message-user { max-width: 85%; margin-left: auto; }

.wln-bubble { padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.wln-message-bot .wln-bubble { background: var(--wln-bot-bg); color: var(--wln-text); border-bottom-left-radius: 4px; }
.wln-message-user .wln-bubble { background: var(--wln-primary); color: #fff; border-bottom-right-radius: 4px; }

.wln-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wln-option-btn { padding: 10px 16px; background: var(--wln-bg); border: 1.5px solid var(--wln-primary); border-radius: 20px; color: var(--wln-primary); font-size: 13px; cursor: pointer; transition: all 0.2s; text-align: left; }
.wln-option-btn:hover { background: var(--wln-primary); color: #fff; }
.wln-option-btn.wln-selected { background: var(--wln-primary); color: #fff; }

.wln-multiselect-confirm { margin-top: 10px; padding: 10px 20px; background: var(--wln-primary); border: none; border-radius: 20px; color: #fff; font-size: 13px; cursor: pointer; transition: background 0.2s; }
.wln-multiselect-confirm:hover { background: var(--wln-primary-dark); }

.wln-input-area { padding: 15px 20px; background: var(--wln-bg); border-top: 1px solid var(--wln-border); display: none; }
.wln-input-area.wln-active { display: flex; gap: 10px; align-items: flex-end; }
.wln-input-wrapper { flex: 1; }
.wln-input { width: 100%; padding: 12px 16px; border: 1.5px solid var(--wln-border); border-radius: 24px; font-size: 14px; outline: none; transition: border-color 0.2s; background: var(--wln-bg); box-sizing: border-box; }
.wln-input:focus { border-color: var(--wln-primary); }
.wln-textarea { border-radius: 16px; resize: none; min-height: 60px; }
.wln-send-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--wln-primary); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; flex-shrink: 0; }
.wln-send-btn:hover { background: var(--wln-primary-dark); }
.wln-send-btn svg { width: 20px; height: 20px; fill: #fff; }

.wln-quiz { margin-top: 12px; padding: 15px; background: #fffde7; border-radius: 12px; border: 1px solid #fff59d; }
.wln-quiz-label { font-size: 13px; color: var(--wln-text); margin-bottom: 8px; display: block; }
.wln-quiz-input { width: 100%; padding: 10px 14px; border: 1.5px solid #fff59d; border-radius: 8px; font-size: 14px; outline: none; box-sizing: border-box; }
.wln-quiz-input:focus { border-color: #ffd54f; }

.wln-hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.wln-submit-section { margin-top: 15px; }
.wln-submit-btn { width: 100%; padding: 14px; background: var(--wln-primary); border: none; border-radius: 24px; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.wln-submit-btn:hover { background: var(--wln-primary-dark); }
.wln-submit-btn:disabled { background: #ccc; cursor: not-allowed; }

.wln-thank-you { text-align: center; padding: 30px 20px; }
.wln-thank-you-icon { width: 60px; height: 60px; background: #e8f5e9; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; }
.wln-thank-you-icon svg { width: 30px; height: 30px; fill: #4caf50; }
.wln-thank-you h3 { color: var(--wln-text); margin: 0 0 10px; font-size: 20px; }
.wln-thank-you p { color: var(--wln-text-light); margin: 0 0 20px; font-size: 14px; line-height: 1.6; }

.wln-whatsapp-btn { display: inline-block; padding: 14px 30px; background: #25D366; color: #fff; text-decoration: none; border-radius: 30px; font-size: 15px; font-weight: 600; transition: background 0.2s; }
.wln-whatsapp-btn:hover { background: #128C7E; color: #fff; }

.wln-typing { display: flex; gap: 4px; padding: 15px; }
.wln-typing span { width: 8px; height: 8px; background: #bbb; border-radius: 50%; animation: wlnTyping 1.4s infinite; }
.wln-typing span:nth-child(2) { animation-delay: 0.2s; }
.wln-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes wlnTyping { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }

.wln-error { background: #ffebee; color: #c62828; padding: 10px 15px; border-radius: 8px; font-size: 13px; margin-top: 10px; }

@media screen and (max-width: 480px) {
    .wln-chat-window { width: calc(100% - 20px); right: 10px; bottom: 80px; max-height: 70vh; border-radius: 12px; }
    .wln-chat-button { right: 15px; bottom: 105px; width: 60px; height: 60px; }
}

.wln-chat-messages::-webkit-scrollbar { width: 6px; }
.wln-chat-messages::-webkit-scrollbar-track { background: transparent; }
.wln-chat-messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
