/* Kitahero AI Assistant — uses MyListing's native fs-tabs unverändert */
.kai-tab-li .lt-icon {
    font-size: 22px;
    line-height: 1;
}

/* ─── Sidebar-Layout: Verlauf links + Hauptbereich rechts ─── */
.kai-ai {
    display: flex;
    align-items: stretch;
    min-height: 0;
    position: relative;
}
.kai-ai-main {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

@media (max-width: 700px) {
    .kai-ai-main { width: 100%; }
    /* Input bleibt voll-breit. Send-Button etwas kleiner. */
    .kai-send-btn { width: 38px; height: 38px; }
    .kai-input { font-size: 15.5px; padding: 14px 6px 14px 16px; }
}

/* Bug-Report Käfer-Button (sticky oben rechts im KI-Pane, erscheint erst nach Chat-Start) */
.kai-ai { position: relative; }
.kai-bug-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    color: #008a20;        /* grüner Käfer */
    border: none;
    padding: 4px;
    cursor: pointer;
    line-height: 0;
    z-index: 10;
    transition: transform 0.18s, opacity 0.3s;
    opacity: 0;             /* Default versteckt — JS aktiviert via .kai-bug-btn-visible */
    pointer-events: none;
    display: inline-flex; align-items: center; justify-content: center;
}
.kai-bug-btn svg { display: block; }
.kai-bug-btn-visible {
    opacity: 0.7;
    pointer-events: auto;
    animation: kai-bug-fade-in 0.5s ease-out;
}
.kai-bug-btn:hover { transform: scale(1.25); opacity: 1 !important; }
@keyframes kai-bug-fade-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 0.7; transform: translateY(0); }
}

.kai-bug-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 100002;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.kai-bug-modal-inner {
    background: #fff;
    border-radius: 10px;
    width: min(520px, 100%);
    padding: 24px 26px;
    position: relative;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
}
.kai-bug-modal-inner h3 { margin: 0 0 6px; font-size: 18px; }
.kai-bug-intro { margin: 0 0 12px; color: #50575e; font-size: 13px; }
.kai-bug-close {
    position: absolute; top: 6px; right: 12px;
    background: none; border: none; font-size: 26px; cursor: pointer; color: #888;
    line-height: 1;
}
.kai-bug-context {
    width: 100%; box-sizing: border-box;
    border: 1px solid #ccd0d4; border-radius: 6px;
    padding: 10px 12px; font-size: 14px; font-family: inherit;
    resize: vertical;
}
.kai-bug-actions {
    display: flex; gap: 8px; justify-content: flex-end;
    margin-top: 14px;
}
.kai-bug-cancel, .kai-bug-submit {
    border: none; padding: 8px 16px; border-radius: 5px; cursor: pointer; font-size: 14px;
}
.kai-bug-cancel { background: #f0f0f1; color: #1d2327; }
.kai-bug-cancel:hover { background: #ddd; }
.kai-bug-submit { background: #2271b1; color: #fff; }
.kai-bug-submit:hover:not(:disabled) { background: #135e96; }
.kai-bug-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.kai-bug-status {
    margin-top: 12px; padding: 8px 12px;
    background: #f0f6fc; border-left: 3px solid #2271b1;
    border-radius: 3px; font-size: 13px;
}

/* Follow-up bubble: erscheint UNTER den Result-Cards, dezent + italic */
.kai-bubble.kai-followup .kai-bubble-content {
    background: transparent !important;
    color: #666 !important;
    font-style: italic;
    font-size: 13px;
    padding: 6px 10px !important;
    border-left: 2px solid #ddd;
    margin-top: 6px;
    box-shadow: none !important;
}
/* Hide MyListing carousel arrows ("prev next" text) when only 2 tabs */
.featured-search ul.nav-tabs .cts-prev,
.featured-search ul.nav-tabs .cts-next {
    display: none !important;
}

/* AI tab-pane: full-width content inside the native tab-content container */
.kai-ai-pane .kai-ai {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Input über volle Breite + Send-Pfeil rechts */
.kai-input-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}
.kai-send-btn {
    width: 44px; height: 44px;
    flex-shrink: 0;
    margin-right: 8px;
    background: #008a20;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
}
.kai-send-btn:hover { background: #006a18; }
.kai-send-btn:active { transform: scale(0.94); }
.kai-send-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.kai-examples {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.kai-example {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.kai-example:hover { background: #4caf50; color: white; border-color: #4caf50; }

.kai-messages {
    overflow-y: auto;
    padding: 0 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 480px;
}
.kai-messages:not(:empty) { padding: 18px; }
.kai-messages::-webkit-scrollbar { width: 6px; }
.kai-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

.kai-bubble {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14.5px;
    line-height: 1.55;
    color: #1f2937;
    word-wrap: break-word;
}
.kai-bubble-user {
    align-self: flex-end;
    background: #4caf50;
    color: white;
    border-bottom-right-radius: 6px;
}
.kai-bubble-assistant {
    align-self: flex-start;
    background: #f3f4f6;
    border-bottom-left-radius: 6px;
}
.kai-bubble-content p { margin: 0 0 8px; }
.kai-bubble-content p:last-child { margin-bottom: 0; }
.kai-bubble-content strong { font-weight: 700; color: #166534; }
.kai-bubble-user .kai-bubble-content strong { color: white; }

.kai-typing {
    display: inline-block;
    font-size: 22px;
    letter-spacing: 3px;
    animation: kai-pulse 1.3s infinite;
    color: #9ca3af;
}
@keyframes kai-pulse {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* Cards — full width, grid */
.kai-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    align-self: stretch;
}
.kai-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    text-decoration: none;
    color: #1f2937;
    transition: all 0.18s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.kai-card:hover {
    border-color: #4caf50;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(76, 175, 80, 0.15);
    text-decoration: none;
}
.kai-card-title { font-weight: 700; font-size: 14px; color: #166534; line-height: 1.3; }
.kai-card-typ   { font-size: 12px; color: #6b7280; font-weight: 500; }
.kai-card-addr  { font-size: 12.5px; color: #4b5563; line-height: 1.4; }
.kai-card-phone { font-size: 12px; color: #166534; font-weight: 500; margin-top: 4px; }

/* Form-Wrapper — kein Border, kein Padding (input-wrap hat alles) */
.kai-form {
    display: block;
    margin: 0;
    padding: 0;
    background: white;
}
.kai-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 18px 8px 18px 20px;
    font-size: 16px;
    outline: none;
    color: #1f2937;
    font-family: inherit;
}
.kai-input::placeholder { color: #9ca3af; }
.kai-input:disabled { opacity: 0.6; }

@media (max-width: 600px) {
    .kai-cards { grid-template-columns: 1fr; }
}
