/* Atlantia AI sohbet dugmesi + penceresi (includes/layout/ai-chat-widget.php, assets/js/ai-chat.js) */
.aic-fab { position: fixed; z-index: 985; inset-inline-end: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 10px;
    min-height: 54px; padding: 0 20px 0 8px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 800; font-size: 15px;
    color: #fff; background: linear-gradient(135deg, #3b2bd1 0%, #1a73e8 55%, #12b5cb 100%);
    box-shadow: 0 14px 32px -12px rgba(26, 60, 160, .65), 0 2px 6px rgba(20, 33, 61, .18); transition: transform .15s ease, box-shadow .15s ease; }
.aic-fab-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .18); font-size: 17px; }
.aic-fab:focus-visible { outline: 3px solid #fbbc04; outline-offset: 3px; }
@media (hover: hover) { .aic-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(26, 60, 160, .75), 0 2px 6px rgba(20, 33, 61, .2); } }
body.aic-open .aic-fab { display: none; }

.aic-panel { position: fixed; z-index: 986; inset-inline-end: 20px; bottom: 20px; display: flex; flex-direction: column;
    width: min(400px, calc(100vw - 40px)); height: min(620px, calc(100vh - 40px)); height: min(620px, calc(100dvh - 40px));
    border-radius: 20px; overflow: hidden; background: #fff; color: #14213d;
    box-shadow: 0 30px 70px -20px rgba(12, 22, 44, .45), 0 0 0 1px rgba(20, 33, 61, .08); }
.aic-panel[hidden] { display: none; }
.aic-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; color: #fff;
    background: linear-gradient(135deg, #3b2bd1 0%, #1a73e8 60%, #12b5cb 100%); }
.aic-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 17px; }
.aic-head-text { flex: 1 1 auto; min-width: 0; }
.aic-head h2 { margin: 0; font-size: 16px; font-weight: 800; color: #fff; }
.aic-head p { margin: 2px 0 0; font-size: 12px; opacity: .9; line-height: 1.3; }
.aic-icon-btn { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .14); color: #fff; font-size: 16px; cursor: pointer; }
.aic-icon-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
@media (hover: hover) { .aic-icon-btn:hover { background: rgba(255, 255, 255, .26); } }

.aic-log { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px; background: #f5f7fb; display: flex; flex-direction: column; gap: 10px; }
.aic-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.aic-msg p { margin: 0 0 6px; }
.aic-msg p:last-child { margin-bottom: 0; }
.aic-msg ul { margin: 4px 0 6px; padding-inline-start: 18px; }
.aic-msg li { margin: 2px 0; }
.aic-msg a { color: #1a56c4; text-decoration: underline; font-weight: 600; }
.aic-msg.is-bot { align-self: flex-start; background: #fff; border: 1px solid rgba(20, 33, 61, .08); border-end-start-radius: 4px; }
.aic-msg.is-user { align-self: flex-end; background: #1a73e8; color: #fff; border-end-end-radius: 4px; }
.aic-msg.is-err { background: #fff4f4; border-color: #f3c6c6; color: #8a1c1c; }
.aic-msg.is-wait { color: #5f6b7a; font-style: italic; }
.aic-msg.is-wait p::after { content: ''; display: inline-block; width: 1.2em; text-align: start; animation: aicDots 1.2s steps(4) infinite; }
@keyframes aicDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

.aic-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(20, 33, 61, .08); background: #fff; }
.aic-form textarea { flex: 1 1 auto; min-height: 44px; max-height: 120px; padding: 11px 14px; border: 1px solid rgba(20, 33, 61, .16); border-radius: 14px;
    font: inherit; font-size: 15px; line-height: 1.4; resize: none; background: #fff; color: inherit; }
.aic-form textarea:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26, 115, 232, .15); }
.aic-send { flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #1a73e8; color: #fff; font-size: 16px; cursor: pointer; }
.aic-send:focus-visible { outline: 3px solid #fbbc04; outline-offset: 2px; }
.aic-note { margin: 0; padding: 0 14px 10px; font-size: 11px; color: #6b7685; line-height: 1.4; background: #fff; }

/* Tablet: pencere sagda sabit genislik */
@media (max-width: 1100px) {
    .aic-fab { bottom: 18px; inset-inline-end: 18px; }
}
/* Telefon: dugme sadece ikon, pencere alttan tam genislik */
@media (max-width: 640px) {
    .aic-fab { padding: 0; width: 56px; min-height: 56px; justify-content: center; bottom: 16px; inset-inline-end: 16px; }
    .aic-fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .aic-fab-ico { width: 56px; height: 56px; background: transparent; font-size: 20px; }
    .aic-panel { inset: auto 0 0 0; width: 100%; height: 88vh; height: 88dvh; border-radius: 20px 20px 0 0; }
    body.aic-open { overflow: hidden; }
}
@media print { .aic-fab, .aic-panel { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .aic-msg.is-wait p::after { animation: none; content: '...'; } }
