/* ============================================================
   Atmos AI — sohbet ekranı (.aic-*)
   ============================================================ */
.aic-page { display: flex; flex-direction: column; height: calc(100vh - 136px); min-height: 440px; }
.aic-logo { display: inline-flex; }
.aic-logo img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 16px var(--logo-glow); }

.aic-chat { flex: 1; overflow-y: auto; padding: 10px 2px 18px; display: flex; flex-direction: column; gap: 16px; }
.aic-msg { display: flex; gap: 10px; max-width: 840px; width: fit-content; }
.aic-msg.me { flex-direction: row-reverse; margin-left: auto; }
.aic-av { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; }
.aic-av.ai { background: var(--bg-elevated); }
.aic-av.ai img { width: 100%; height: 100%; object-fit: cover; }
.aic-av.me { background: var(--accent2-soft); color: var(--accent2); }
.aic-av.me svg { width: 17px; height: 17px; }
.aic-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; align-items: flex-start; }
.aic-msg.me .aic-body { align-items: flex-end; }

.aic-text { display: inline-block; max-width: 100%; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; word-break: break-word; }
.aic-msg.ai .aic-text { background: var(--bg-surface); border: 1px solid var(--border); border-top-left-radius: 4px; color: var(--text-primary); }
.aic-msg.me .aic-text { background: var(--accent2); color: #fff; border-top-right-radius: 4px; }
.aic-tbl { overflow-x: auto; margin: 8px 0; max-width: 100%; }
.aic-tbl table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.aic-tbl th, .aic-tbl td { border: 1px solid var(--border); padding: 6px 9px; text-align: left; white-space: nowrap; }
.aic-tbl th { background: var(--bg-elevated, rgba(127,127,127,.08)); font-weight: 600; }
.aic-tbl tbody tr:nth-child(even) td { background: rgba(127,127,127,.05); }
.aic-msg.ai .aic-text:has(.aic-tbl) { display: block; }
.aic-text.aic-err { display: flex; align-items: center; gap: 8px; background: rgba(240,85,109,.10); border: 1px solid rgba(240,85,109,.32); color: var(--danger); }
.aic-text.aic-err svg { width: 17px; height: 17px; flex-shrink: 0; }

.aic-tool { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); }
.aic-tool svg { width: 13px; height: 13px; }
.aic-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.aic-chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: .12s; }
.aic-chip:hover { border-color: var(--accent); color: var(--accent); }

.aic-actions { display: flex; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.aic-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 11px; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid transparent; transition: .12s; }
.aic-btn svg { width: 15px; height: 15px; }
.aic-btn.primary { background: var(--accent2); color: #fff; }
.aic-btn.primary:hover { filter: brightness(1.08); }
.aic-btn.ghost { background: var(--bg-elevated); border: 1px solid var(--border-strong); color: var(--text-secondary); }
.aic-btn.ghost:hover { color: var(--text-primary); border-color: var(--accent); }
.aic-cancelled { font-size: 13px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; }
.aic-cancelled svg { width: 15px; height: 15px; }

.aic-dots { display: inline-flex; gap: 5px; padding: 10px 6px; }
.aic-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); animation: aicdot 1.2s infinite ease-in-out; }
.aic-dots span:nth-child(2) { animation-delay: .18s; }
.aic-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes aicdot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.aic-inputbar { display: flex; align-items: flex-end; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--bg-surface); border: 1px solid var(--border); }
.aic-inputbar textarea { flex: 1; resize: none; border: none; background: transparent; color: var(--text-primary); font-size: 15px; line-height: 1.5; font-family: inherit; max-height: 160px; outline: none; padding: 6px 4px; }
.aic-inputbar textarea::placeholder { color: var(--text-muted); }
.aic-send { width: 40px; height: 40px; border-radius: 11px; background: var(--accent2); color: #fff; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; border: none; transition: .12s; }
.aic-send:hover { filter: brightness(1.08); }
.aic-send:disabled { opacity: .5; cursor: default; }
.aic-send svg { width: 19px; height: 19px; }
.aic-hint { text-align: center; font-size: 11.5px; color: var(--text-muted); margin-top: 8px; }

@media (max-width: 640px) {
    .aic-page { height: calc(100dvh - 200px); min-height: 380px; }
    .aic-msg { max-width: 100%; }
}

