/* Emma Chat Widget styles — dark theme, cyan accent */
#emma-chat-btn {
 position: fixed;
 bottom: 24px;
 right: 24px;
 z-index: 9998;
 width: 64px;
 height: 64px;
 border-radius: 50%;
 background: linear-gradient(135deg, #0066FF 0%, #00E5FF 100%);
 color: #fff;
 border: none;
 cursor: pointer;
 box-shadow: 0 8px 24px rgba(0, 102, 255, 0.4);
 display: flex;
 align-items: center;
 justify-content: center;
 transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
#emma-chat-btn:hover { transform: scale(1.05); box-shadow: 0 12px 32px rgba(0, 229, 255, 0.5); }
#emma-chat-btn:focus-visible { outline: 3px solid #00E5FF; outline-offset: 3px; }
#emma-chat-btn.hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }
#emma-chat-btn::after {
 content: '';
 position: absolute;
 top: 4px;
 right: 4px;
 width: 12px;
 height: 12px;
 background: #00ff88;
 border-radius: 50%;
 border: 2px solid #fff;
}

#emma-chat-panel {
 position: fixed;
 bottom: 24px;
 right: 24px;
 width: 380px;
 max-width: calc(100vw - 32px);
 max-height: calc(100vh - 48px);
 background: #0A0A0A;
 border: 1px solid rgba(0, 229, 255, 0.2);
 border-radius: 16px;
 box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
 z-index: 9999;
 display: flex;
 flex-direction: column;
 color: #fff;
 font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
 opacity: 0;
 transform: translateY(16px) scale(0.96);
 pointer-events: none;
 transition: opacity 0.25s ease, transform 0.25s ease;
}
#emma-chat-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.emma-header {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 16px 20px;
 border-bottom: 1px solid rgba(255, 255, 255, 0.08);
 background: linear-gradient(135deg, rgba(0, 102, 255, 0.15) 0%, rgba(0, 229, 255, 0.08) 100%);
 border-radius: 16px 16px 0 0;
}
.emma-avatar {
 width: 40px; height: 40px;
 border-radius: 50%;
 background: linear-gradient(135deg, #0066FF, #00E5FF);
 color: #fff;
 font-weight: 700;
 font-size: 18px;
 display: flex;
 align-items: center;
 justify-content: center;
 flex-shrink: 0;
}
.emma-title { font-size: 14px; font-weight: 600; color: #fff; }
.emma-sub { font-size: 11px; color: rgba(255, 255, 255, 0.6); margin-top: 2px; }
.emma-close {
 margin-left: auto;
 background: transparent;
 border: none;
 color: rgba(255, 255, 255, 0.6);
 font-size: 24px;
 cursor: pointer;
 width: 32px;
 height: 32px;
 border-radius: 8px;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: background 0.15s;
}
.emma-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.emma-messages {
 padding: 16px 20px;
 overflow-y: auto;
 max-height: 180px;
}
.emma-msg {
 padding: 10px 14px;
 border-radius: 12px;
 font-size: 14px;
 line-height: 1.5;
 margin-bottom: 8px;
 color: rgba(255, 255, 255, 0.92);
}
.emma-msg-bot {
 background: rgba(255, 255, 255, 0.06);
 border-top-left-radius: 4px;
}

.emma-form {
 padding: 0 20px 16px;
 display: flex;
 flex-direction: column;
 gap: 8px;
}
.emma-form input, .emma-form textarea {
 width: 100%;
 padding: 10px 12px;
 background: rgba(255, 255, 255, 0.05);
 border: 1px solid rgba(255, 255, 255, 0.1);
 border-radius: 8px;
 color: #fff;
 font-size: 14px;
 font-family: inherit;
 transition: border-color 0.15s, background 0.15s;
 min-height: 44px;
}
.emma-form textarea { resize: vertical; min-height: 64px; }
.emma-form input:focus, .emma-form textarea:focus {
 outline: none;
 border-color: #00E5FF;
 background: rgba(0, 229, 255, 0.06);
}
.emma-form input::placeholder, .emma-form textarea::placeholder {
 color: rgba(255, 255, 255, 0.4);
}
.emma-send {
 background: linear-gradient(135deg, #0066FF, #00E5FF);
 color: #fff;
 border: none;
 padding: 12px 20px;
 border-radius: 8px;
 font-weight: 600;
 font-size: 14px;
 cursor: pointer;
 min-height: 44px;
 transition: transform 0.15s, opacity 0.15s;
}
.emma-send:hover:not(:disabled) { transform: translateY(-1px); }
.emma-send:disabled { opacity: 0.6; cursor: wait; }
.emma-consent {
 font-size: 11px;
 color: rgba(255, 255, 255, 0.5);
 text-align: center;
 line-height: 1.4;
}

.emma-result {
 padding: 20px;
 border-top: 1px solid rgba(255, 255, 255, 0.08);
 font-size: 14px;
 line-height: 1.5;
}
.emma-success { color: #00ff88; background: rgba(0, 255, 136, 0.04); border-radius: 0 0 16px 16px; }
.emma-error { color: #ff6b6b; background: rgba(255, 107, 107, 0.04); border-radius: 0 0 16px 16px; }

@media (max-width: 600px) {
 #emma-chat-panel {
 bottom: 0;
 right: 0;
 left: 0;
 width: 100%;
 max-width: 100vw;
 max-height: 75vh;
 border-radius: 16px 16px 0 0;
 }
 #emma-chat-btn { width: 52px; height: 52px; bottom: 14px; right: 14px; }
 #emma-chat-btn svg { width: 22px; height: 22px; }
 #emma-chat-btn::after { width: 10px; height: 10px; top: 3px; right: 3px; }
}
