/* TeklifAI full-page Gemini-style chat */
* { box-sizing: border-box; }
body.ai-shell {
    margin: 0;
    font-family: 'Hind', system-ui, sans-serif;
    background: #0b0b12;
    color: #f5f5f7;
    height: 100vh;
    overflow: hidden;
}
.ai-app { display: flex; height: 100vh; }
.ai-sidebar {
    width: 280px;
    background: #12121c;
    border-right: 1px solid rgba(255,255,255,.08);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-sidebar__brand img { height: 96px; width: auto; display: block; }
.ai-sidebar__label { font-size: 12px; opacity: .6; margin-top: 8px; text-transform: uppercase; letter-spacing: .04em; }
.ai-sidebar__list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.ai-history-item {
    text-align: left;
    border: 0;
    background: transparent;
    color: #ddd;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
}
.ai-history-item:hover, .ai-history-item.is-active { background: rgba(236,0,140,.15); color: #fff; }
.ai-btn {
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 600;
    cursor: pointer;
}
.ai-btn--primary { background: linear-gradient(135deg, #2E3192, #EC008C); color: #fff; }
.ai-link { color: #00F2FF; text-decoration: none; font-size: 14px; }
.ai-link--muted { color: rgba(255,255,255,.55); margin-top: auto; }
.ai-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: radial-gradient(ellipse at top, #1a1430 0%, #0b0b12 55%); }
.ai-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.ai-topbar__title { display: flex; align-items: center; gap: 12px; }
.ai-topbar__title span { display: block; font-size: 12px; opacity: .7; }
.ai-topbar__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #fff; }
.ai-icon-btn { display: none; border: 0; background: rgba(255,255,255,.08); color: #fff; width: 40px; height: 40px; border-radius: 10px; }
.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}
.ai-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.55;
    font-size: 15px;
    white-space: pre-wrap;
    word-break: break-word;
}
.ai-msg--bot {
    align-self: flex-start;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(0,242,255,.25);
    border-bottom-left-radius: 4px;
}
.ai-msg--user {
    align-self: flex-end;
    background: linear-gradient(135deg, #2E3192, #EC008C);
    border-bottom-right-radius: 4px;
}
.ai-msg a { color: #00F2FF; }
.ai-typing {
    display: none;
    gap: 6px;
    padding: 0 20px 8px;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}
.ai-typing.is-visible { display: inline-flex; }
.ai-typing span {
    width: 8px; height: 8px; border-radius: 50%; background: #00F2FF;
    animation: ai-bounce 1.2s infinite ease-in-out;
}
.ai-typing span:nth-child(2) { animation-delay: .15s; }
.ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: .4; }
    40% { transform: translateY(-5px); opacity: 1; }
}
.ai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 12px;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}
.ai-chip {
    border: 1px solid rgba(236,0,140,.45);
    background: rgba(255,255,255,.06);
    color: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.ai-chip:hover { background: rgba(236,0,140,.2); transform: translateY(-1px); }
.ai-chip--full { flex: 1 1 100%; text-align: center; }
.ai-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #00F2FF;
    color: #0b0b12 !important;
    font-weight: 700;
    text-decoration: none;
    font-size: 13px;
}
.ai-composer {
    display: flex;
    gap: 10px;
    padding: 16px 20px 24px;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}
.ai-composer textarea {
    flex: 1;
    resize: none;
    min-height: 48px;
    max-height: 140px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.06);
    color: #fff;
    padding: 12px 16px;
    font: inherit;
}
.ai-composer textarea:focus { outline: 2px solid #00F2FF; }
.ai-composer button {
    border: 0;
    border-radius: 16px;
    padding: 0 22px;
    background: linear-gradient(135deg, #2E3192, #EC008C);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.ai-composer button:disabled { opacity: .5; cursor: not-allowed; }

/* Themed scrollbars */
.ai-messages,
.ai-sidebar__list {
    scrollbar-width: thin;
    scrollbar-color: #EC008C #1a1430;
}
.ai-messages::-webkit-scrollbar,
.ai-sidebar__list::-webkit-scrollbar {
    width: 8px;
}
.ai-messages::-webkit-scrollbar-track,
.ai-sidebar__list::-webkit-scrollbar-track {
    background: #1a1430;
    border-radius: 8px;
}
.ai-messages::-webkit-scrollbar-thumb,
.ai-sidebar__list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2E3192, #EC008C);
    border-radius: 8px;
}
.ai-messages::-webkit-scrollbar-thumb:hover,
.ai-sidebar__list::-webkit-scrollbar-thumb:hover {
    background: #00F2FF;
}

@media (max-width: 800px) {
    .ai-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 20;
        transform: translateX(-105%);
        transition: transform .2s;
    }
    .ai-app.sidebar-open .ai-sidebar { transform: none; }
    .ai-icon-btn { display: inline-flex; align-items: center; justify-content: center; }
}
