/* FINO.TR - Landing self-playing chat demo
 * 2026-06-24 - Tamamen gorsel; mock data. Marka paleti index.php :root ile uyumlu.
 */
#fino-chat-demo {
    --fcd-primary: #1e3a8a;
    --fcd-primary-light: #3b82f6;
    --fcd-accent: #f59e0b;
    --fcd-success: #10b981;
    --fcd-danger: #ef4444;
    --fcd-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---- Balon ---- */
#fino-chat-demo .fcd-bubble {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: var(--fcd-gradient);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(30, 58, 138, .35);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease;
}
#fino-chat-demo .fcd-bubble:hover { transform: scale(1.06); }
#fino-chat-demo .fcd-bubble.fcd-pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, .55);
    animation: fcd-pulse 2.2s infinite;
}
@keyframes fcd-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(59,130,246,.55); }
    70%  { box-shadow: 0 0 0 16px rgba(59,130,246,0); }
    100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

/* Teaser baloncuk */
#fino-chat-demo .fcd-teaser {
    position: fixed;
    right: 92px;
    bottom: 32px;
    max-width: 220px;
    background: #fff;
    color: #1e293b;
    padding: 10px 14px;
    border-radius: 14px 14px 2px 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
    font-size: 14px;
    line-height: 1.35;
    z-index: 99997;
    animation: fcd-teaser-in .4s ease;
}
#fino-chat-demo .fcd-teaser .fcd-teaser-close {
    position: absolute; top: -8px; right: -8px;
    width: 22px; height: 22px; border-radius: 50%;
    border: none; background: #1e293b; color: #fff; font-size: 12px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
@keyframes fcd-teaser-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Panel ---- */
#fino-chat-demo .fcd-panel {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 44px);
    background: #f8fafc;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    z-index: 99999;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
#fino-chat-demo .fcd-panel.fcd-open {
    display: flex;
    animation: fcd-slide-up .32s cubic-bezier(.2,.8,.2,1);
}
@keyframes fcd-slide-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Header */
#fino-chat-demo .fcd-header {
    background: var(--fcd-gradient);
    color: #fff;
    padding: 14px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
#fino-chat-demo .fcd-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.16);
    display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
#fino-chat-demo .fcd-hinfo { flex: 1 1 auto; min-width: 0; }
#fino-chat-demo .fcd-title { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; }
#fino-chat-demo .fcd-badge {
    background: var(--fcd-accent); color: #1e293b; font-size: 10px; font-weight: 800;
    padding: 2px 6px; border-radius: 6px; letter-spacing: .5px;
}
#fino-chat-demo .fcd-subtitle { font-size: 12px; opacity: .85; }
#fino-chat-demo .fcd-status-dot { color: #4ade80; font-size: 9px; vertical-align: middle; }
#fino-chat-demo .fcd-close {
    border: none; background: rgba(255,255,255,.15); color: #fff;
    width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 16px;
    display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
#fino-chat-demo .fcd-close:hover { background: rgba(255,255,255,.28); }

/* Chips */
#fino-chat-demo .fcd-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 10px 12px; background: #fff; border-bottom: 1px solid #eef2f7;
}
#fino-chat-demo .fcd-chip {
    font-size: 11.5px; color: #475569; background: #f1f5f9;
    border: 1px solid #e2e8f0; border-radius: 999px; padding: 4px 10px;
    transition: all .2s ease; white-space: nowrap;
}
#fino-chat-demo .fcd-chip.fcd-chip-active {
    background: #eff6ff; color: var(--fcd-primary); border-color: var(--fcd-primary-light); font-weight: 600;
}

/* Body */
#fino-chat-demo .fcd-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 12px;
    display: flex; flex-direction: column; gap: 10px;
    background: #f8fafc;
}
/* flex cocuklari KUCULMESIN: aksi halde mesajlar uzayinca hucreler buzulup
   icerik gorunmez oluyordu; flex-shrink:0 -> body kayar (dogru chat davranisi). */
#fino-chat-demo .fcd-msg { flex: 0 0 auto; max-width: 86%; font-size: 13.5px; line-height: 1.5; }
#fino-chat-demo .fcd-msg.fcd-user {
    align-self: flex-end; background: var(--fcd-primary); color: #fff;
    padding: 9px 13px; border-radius: 14px 14px 3px 14px;
}
#fino-chat-demo .fcd-msg.fcd-bot {
    align-self: flex-start; background: #fff; color: #1e293b;
    padding: 9px 13px; border-radius: 14px 14px 14px 3px;
    box-shadow: 0 1px 3px rgba(15,23,42,.06);
}

/* Typing */
#fino-chat-demo .fcd-typing { flex: 0 0 auto; align-self: flex-start; background: #fff; padding: 11px 14px; border-radius: 14px; box-shadow: 0 1px 3px rgba(15,23,42,.06); }
#fino-chat-demo .fcd-typing span {
    display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%;
    background: #cbd5e1; animation: fcd-blink 1.2s infinite both;
}
#fino-chat-demo .fcd-typing span:nth-child(2) { animation-delay: .2s; }
#fino-chat-demo .fcd-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes fcd-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* Sonuc karti */
#fino-chat-demo .fcd-card {
    flex: 0 0 auto; align-self: flex-start; max-width: 92%; background: #fff; border: 1px solid #eef2f7;
    border-radius: 14px; box-shadow: 0 2px 8px rgba(15,23,42,.07); overflow: hidden;
    animation: fcd-card-in .3s ease;
}
@keyframes fcd-card-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#fino-chat-demo .fcd-card-head {
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    color: var(--fcd-primary); font-weight: 700; font-size: 12.5px; padding: 8px 12px;
    display: flex; align-items: center; gap: 6px;
}
#fino-chat-demo .fcd-card-rows { padding: 6px 12px; }
#fino-chat-demo .fcd-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed #f1f5f9; }
#fino-chat-demo .fcd-row:last-child { border-bottom: none; }
#fino-chat-demo .fcd-row .fcd-label { color: #64748b; }
#fino-chat-demo .fcd-row .fcd-val { font-weight: 700; color: #1e293b; }
#fino-chat-demo .fcd-val.fcd-up { color: var(--fcd-success); }
#fino-chat-demo .fcd-val.fcd-down { color: var(--fcd-danger); }
#fino-chat-demo .fcd-val.fcd-warn { color: var(--fcd-accent); }
#fino-chat-demo .fcd-card-foot {
    background: #f8fafc; border-top: 1px solid #eef2f7; padding: 8px 12px;
    font-size: 12.5px; color: #334155; display: flex; gap: 6px; align-items: flex-start;
}
#fino-chat-demo .fcd-card-foot i { color: var(--fcd-accent); margin-top: 1px; }

/* Dekoratif input */
#fino-chat-demo .fcd-input {
    border-top: 1px solid #eef2f7; background: #fff; padding: 10px 12px;
    display: flex; align-items: center; gap: 8px;
}
#fino-chat-demo .fcd-input .fcd-fake {
    flex: 1 1 auto; background: #f1f5f9; border-radius: 999px; padding: 9px 14px;
    color: #94a3b8; font-size: 13px;
}
#fino-chat-demo .fcd-input .fcd-send {
    width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--fcd-gradient);
    color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; opacity: .6;
}
#fino-chat-demo .fcd-caret {
    display: inline-block; width: 2px; height: 1em; background: #1e293b; margin-left: 1px;
    vertical-align: text-bottom; animation: fcd-caret 1s step-end infinite;
}
@keyframes fcd-caret { 50% { opacity: 0; } }

/* Mobil */
@media (max-width: 480px) {
    #fino-chat-demo .fcd-panel {
        right: 0; bottom: 0; width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0;
    }
    #fino-chat-demo .fcd-teaser { right: 86px; max-width: 60vw; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    #fino-chat-demo .fcd-bubble.fcd-pulse::after,
    #fino-chat-demo .fcd-panel.fcd-open,
    #fino-chat-demo .fcd-card,
    #fino-chat-demo .fcd-caret,
    #fino-chat-demo .fcd-typing span { animation: none !important; }
}
