/* AI Asystent — floating widget styles */
#ai-chat-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #A3D044;
    color: #09090b;
    border: none;
    padding: 12px 18px 12px 14px;
    border-radius: 40px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 3px rgba(163,208,68,0.2);
    z-index: 9999;
    transition: transform 0.2s, background 0.2s;
}
#ai-chat-fab:hover { background: #8bed4f; transform: translateY(-2px); }
#ai-chat-fab.open { transform: rotate(5deg); }
#ai-chat-fab .ai-chat-label { font-size: 13px; }

#ai-chat-panel {
    position: fixed;
    bottom: 88px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 640px;
    max-height: calc(100vh - 120px);
    background: #18181b;
    border: 1px solid #333;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    color: #e4e4e7;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
#ai-chat-panel.open { display: flex; }
@media (max-width: 520px) {
    #ai-chat-panel { right: 10px; left: 10px; width: auto; bottom: 80px; height: calc(100vh - 100px); }
}

.ai-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #333;
    background: rgba(163,208,68,0.05);
}
.ai-chat-header h3 { margin: 0; font-size: 15px; color: #A3D044; font-weight: 700; }
.ai-chat-close {
    background: none; border: none; color: #888; font-size: 24px; cursor: pointer; line-height: 1; padding: 0 4px;
}
.ai-chat-close:hover { color: #fff; }

.ai-chat-body { flex: 1; overflow-y: auto; padding: 16px; }
.ai-chat-body h4 { font-size: 15px; margin: 0 0 12px 0; color: #fff; }
.ai-chat-hint { font-size: 12px; color: #888; margin: 0 0 14px 0; }

.ai-chat-steps { display: flex; align-items: center; gap: 4px; margin-bottom: 20px; }
.ai-chat-step {
    width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: bold; background: #2a2a2e; color: #888; border: 1px solid #444;
}
.ai-chat-step.active { background: #A3D044; color: #09090b; border-color: #A3D044; }
.ai-chat-step.done { background: #333; color: #A3D044; border-color: #A3D044; }
.ai-chat-step-line { flex: 1; height: 2px; background: #333; }

.ai-chat-grid-1 { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 14px; }
.ai-chat-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }

.ai-chat-chip {
    background: rgba(255,255,255,0.03); color: #e4e4e7; border: 1px solid #333;
    padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
    transition: all 0.2s; text-align: left;
}
.ai-chat-chip:hover { border-color: #A3D044; background: rgba(163,208,68,0.05); }
.ai-chat-chip.selected { background: rgba(163,208,68,0.15); border-color: #A3D044; color: #A3D044; font-weight: 600; }

.ai-chat-input, .ai-chat-textarea {
    width: 100%; box-sizing: border-box; background: rgba(0,0,0,0.3); border: 1px solid #333;
    border-radius: 8px; padding: 10px 12px; color: #fff; font-size: 13px; font-family: inherit;
    margin-bottom: 10px; resize: vertical;
}
.ai-chat-input:focus, .ai-chat-textarea:focus { border-color: #A3D044; outline: none; }

.ai-chat-summary {
    background: rgba(0,0,0,0.2); padding: 10px 12px; border-radius: 8px; border-left: 3px solid #A3D044;
    margin-bottom: 14px; font-size: 12px;
}
.ai-chat-summary p { margin: 3px 0; color: #aaa; }

.ai-chat-actions { display: flex; gap: 8px; margin-top: 12px; }
.ai-chat-back {
    background: none; color: #888; border: 1px solid #444; padding: 10px 16px; border-radius: 8px;
    cursor: pointer; font-size: 13px; transition: color 0.2s;
}
.ai-chat-back:hover { color: #fff; border-color: #666; }
.ai-chat-primary {
    flex: 1; background: #A3D044; color: #09090b; border: none; padding: 11px 16px; border-radius: 8px;
    cursor: pointer; font-size: 13px; font-weight: 700; transition: background 0.2s;
}
.ai-chat-primary:hover { background: #8bed4f; }

.ai-chat-loading { text-align: center; padding: 40px 20px; }
.ai-chat-spinner {
    width: 40px; height: 40px; border: 3px solid #333; border-top-color: #A3D044; border-radius: 50%;
    animation: ai-chat-spin 1s linear infinite; margin: 0 auto 16px;
}
@keyframes ai-chat-spin { to { transform: rotate(360deg); } }

.ai-chat-summary-text { font-size: 13px; color: #d4d4d8; line-height: 1.6; margin-bottom: 16px; padding: 10px 12px; background: rgba(163,208,68,0.05); border-radius: 8px; }

.ai-chat-rec {
    background: rgba(255,255,255,0.03); border: 1px solid #333; border-radius: 10px;
    padding: 12px; margin-bottom: 10px;
}
.ai-chat-rec h5 { margin: 0 0 6px 0; color: #A3D044; font-size: 14px; }
.ai-chat-why { font-size: 12px; color: #d4d4d8; line-height: 1.5; margin: 0 0 8px 0; }
.ai-chat-price { font-size: 12px; color: #A3D044; margin: 4px 0 8px 0; font-weight: 600; }
.ai-chat-dealers { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #333; }
.ai-chat-dealer-link {
    font-size: 12px; color: #8bed4f; text-decoration: none; padding: 4px 0;
}
.ai-chat-dealer-link:hover { color: #A3D044; text-decoration: underline; }

.ai-chat-error { text-align: center; padding: 20px; color: #f88; }
.ai-chat-error p { margin-bottom: 14px; }
