/* WhatsMood Asistan: ChatGPT tarzı sohbet penceresi + tam ekran sesli mod */

/* ---------- Sohbet penceresi ---------- */
#whatsmoodChatPopup {
    width: 420px !important; height: 640px !important; max-height: calc(100vh - 110px) !important; max-width: calc(100vw - 24px) !important;
    border-radius: 22px !important; overflow: hidden; background: #fff !important;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .28), 0 2px 8px rgba(15, 23, 42, .08) !important;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}
#whatsmoodChatPopup > div:first-child {
    background: #0f172a !important; padding: 14px 16px !important; border-radius: 0 !important; gap: 12px;
}
#WhatsMoodAsistan { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
#WhatsMoodAsistan::before {
    content: ""; width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: radial-gradient(circle at 30% 30%, #ffd2a8, #ff7a45 45%, #c026d3 100%);
    box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}
#closeWhatsmoodChat { width: 34px; height: 34px; border-radius: 50% !important; font-size: 22px !important; line-height: 1; }
#closeWhatsmoodChat:hover { background: rgba(255,255,255,.12) !important; }
#whatsmoodMessages { padding: 18px 16px !important; background: #fff; display: flex; flex-direction: column; gap: 10px; font-size: 15px !important; line-height: 1.55; color: #0f172a; }
#whatsmoodMessages > div:not([class]) { max-width: 100%; }

.wm-b { max-width: 86%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; animation: wm-b-gir .25s ease; }
.wm-b-sen { align-self: flex-end; background: #f1f5f9; color: #0f172a; border-bottom-right-radius: 6px; }
.wm-b-asistan { align-self: flex-start; background: transparent; padding-left: 40px; position: relative; max-width: 100%; }
.wm-b-asistan::before {
    content: ""; position: absolute; left: 0; top: 6px; width: 28px; height: 28px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffd2a8, #ff7a45 45%, #c026d3 100%);
}
.wm-b-yaziyor::after { content: "▍"; animation: wm-imlec 1s steps(2) infinite; color: #ff5722; margin-left: 1px; }
.wm-noktalar { display: inline-flex; gap: 4px; padding: 6px 0; }
.wm-noktalar i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: wm-nokta 1.2s infinite ease-in-out; }
.wm-noktalar i:nth-child(2) { animation-delay: .15s; } .wm-noktalar i:nth-child(3) { animation-delay: .3s; }
@keyframes wm-nokta { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
@keyframes wm-imlec { 50% { opacity: 0; } }
@keyframes wm-b-gir { from { opacity: 0; transform: translateY(6px); } }

#whatsmoodChatPopup > div:last-child {
    margin: 0 12px 12px; padding: 6px 6px 6px 14px !important; border: 1px solid #e2e8f0 !important; border-radius: 28px;
    background: #fff; box-shadow: 0 2px 12px rgba(15,23,42,.06); gap: 6px !important;
}
#whatsmoodInput { border: 0 !important; outline: 0; padding: 8px 4px !important; font-size: 15px !important; background: transparent; }
#micBtn, #whatsmoodSend, #wmSesModuBtn {
    width: 40px !important; height: 40px !important; border-radius: 50% !important; flex-shrink: 0; cursor: pointer;
    display: inline-flex !important; align-items: center; justify-content: center; transition: transform .15s, background .15s;
}
#micBtn { background: #f1f5f9 !important; }
#whatsmoodSend { background: #0f172a !important; }
#wmSesModuBtn { border: 0; background: linear-gradient(135deg, #ff7a45, #c026d3); color: #fff; }
#micBtn:hover, #whatsmoodSend:hover, #wmSesModuBtn:hover { transform: scale(1.06); }
#wmSesModuBtn svg { width: 20px; height: 20px; }
#whatsmoodChatBtn {
    background: radial-gradient(circle at 30% 30%, #ffb38a, #ff5722 50%, #c026d3 100%) !important;
    box-shadow: 0 10px 30px rgba(255, 87, 34, .45) !important;
}

/* ---------- Tam ekran sesli mod ---------- */
.wm-ses {
    position: fixed; inset: 0; z-index: 100050; display: none; flex-direction: column; align-items: center; justify-content: space-between;
    background: radial-gradient(1200px 800px at 50% 35%, #1e1b4b 0%, #0b1020 55%, #05070f 100%); color: #fff;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif; padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
.wm-ses.acik { display: flex; animation: wm-ses-gir .35s ease; }
@keyframes wm-ses-gir { from { opacity: 0; transform: scale(1.02); } }
.wm-ses-ust { width: 100%; max-width: 720px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wm-ses-ust .baslik { font-weight: 600; font-size: 15px; opacity: .9; display: flex; align-items: center; gap: 8px; }
.wm-ses-ust .rozet { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: rgba(255,255,255,.1); }
.wm-ses-ust .sure { font-size: 13px; opacity: .6; font-variant-numeric: tabular-nums; }

.wm-ses-orta { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; width: 100%; max-width: 720px; min-height: 0; }
.wm-kure {
    --s: 1; width: min(46vw, 260px); height: min(46vw, 260px); border-radius: 50%; position: relative;
    transform: scale(var(--s)); transition: transform .08s linear;
    background: radial-gradient(circle at 32% 28%, #fff4e6 0%, #ffb38a 18%, #ff5722 42%, #c026d3 72%, #4c1d95 100%);
    box-shadow: 0 0 80px rgba(255, 87, 34, .35), 0 0 160px rgba(192, 38, 211, .25), inset -20px -30px 60px rgba(76, 29, 149, .5);
}
.wm-kure::before, .wm-kure::after {
    content: ""; position: absolute; inset: -6%; border-radius: 50%; filter: blur(18px); opacity: .55;
    background: conic-gradient(from 0deg, #ff7a45, #c026d3, #6366f1, #ff7a45); animation: wm-don 8s linear infinite; z-index: -1;
}
.wm-kure::after { inset: 8%; filter: blur(30px); opacity: .5; animation-duration: 5s; animation-direction: reverse; mix-blend-mode: screen; z-index: 1; }
@keyframes wm-don { to { transform: rotate(360deg); } }
.wm-ses[data-durum="dinliyor"] .wm-kure { animation: wm-nefes 3.2s ease-in-out infinite; }
.wm-ses[data-durum="dusunuyor"] .wm-kure { animation: wm-dusun 1.1s ease-in-out infinite; }
.wm-ses[data-durum="baglaniyor"] .wm-kure { filter: grayscale(.4) brightness(.8); animation: wm-nefes 1.4s ease-in-out infinite; }
@keyframes wm-nefes { 50% { transform: scale(calc(var(--s) * 1.04)); } }
@keyframes wm-dusun { 50% { transform: scale(calc(var(--s) * .94)); filter: brightness(1.15); } }

.wm-ses-durum { font-size: 15px; opacity: .75; min-height: 22px; letter-spacing: .2px; }
.wm-altyazi { width: 100%; text-align: center; min-height: 72px; max-height: 26vh; overflow-y: auto; padding: 0 8px; scrollbar-width: none; }
.wm-altyazi .kullanici { font-size: 15px; opacity: .55; margin-bottom: 8px; }
.wm-altyazi .asistan { font-size: clamp(18px, 2.6vw, 22px); line-height: 1.45; font-weight: 500; }

.wm-ses-kartlar { width: 100%; max-width: 720px; display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.wm-ses-kartlar:empty { display: none; }
.wm-ses-kart {
    flex: 0 0 220px; display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; color: #fff !important;
    text-decoration: none !important; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(8px);
    animation: wm-b-gir .3s ease;
}
.wm-ses-kart:hover { background: rgba(255,255,255,.14); }
.wm-ses-kart img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: rgba(255,255,255,.1); }
.wm-ses-kart b { display: block; font-size: 13px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wm-ses-kart small { display: block; font-size: 11.5px; opacity: .65; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 12.11.2026: liste / kampanya / kupon / misafir listesi kartları */
.wm-ses-kart-liste, .wm-ses-kart-kampanya, .wm-ses-kart-misafir, .wm-ses-kart-kupon { flex-basis: 250px; align-items: flex-start; }
.wm-ses-kart-misafir[data-tur="onay"] { border-color: rgba(255,61,110,.7); background: rgba(255,61,110,.14); }
.wm-ses-kart-kupon img { width: 72px; height: 72px; background: #fff; object-fit: contain; }
.wm-ses-dugmeler { display: flex; gap: 6px; margin-top: 6px; }
.wm-ses-dugme { display: inline-block; margin-top: 6px; padding: 5px 12px; border: 0; border-radius: 999px; font-size: 12px; font-weight: 600;
    background: #ff3d6e; color: #fff !important; text-decoration: none !important; cursor: pointer; }
.wm-ses-dugmeler .wm-ses-dugme { margin-top: 0; }
.wm-ses-dugme.ikincil { background: rgba(255,255,255,.18); }
.wm-ses-dugme:disabled { opacity: .6; cursor: default; }

.wm-ses-alt { display: flex; align-items: center; justify-content: center; gap: 22px; }
.wm-ses-alt button {
    width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; background: rgba(255,255,255,.12);
    display: flex; align-items: center; justify-content: center; transition: transform .15s, background .15s;
}
.wm-ses-alt button:hover { transform: scale(1.06); background: rgba(255,255,255,.2); }
.wm-ses-alt button svg { width: 26px; height: 26px; }
.wm-ses-alt .kapat { background: #ef4444; }
.wm-ses-alt .kapat:hover { background: #dc2626; }
.wm-ses-alt .kapali { background: #fff; color: #0f172a; }
.wm-ses-ipucu { font-size: 12.5px; opacity: .45; text-align: center; margin-top: 10px; }

/* Küçük çubuk: sayfada gezerken sesli sohbet sürer (sayfa değişince de bu hâlde açılır) */
.wm-ses.mini {
    inset: auto 96px 20px 16px; margin: 0 auto; max-width: 560px; flex-direction: row; justify-content: flex-start; gap: 10px;
    padding: 8px 10px 8px 12px; border-radius: 40px; animation: none; box-shadow: 0 12px 34px rgba(5, 7, 15, .45);
    background: linear-gradient(135deg, #1e1b4b 0%, #0b1020 100%);
}
.wm-ses.mini .wm-ses-ust, .wm-ses.mini .wm-ses-kartlar, .wm-ses.mini .wm-ses-ipucu, .wm-ses.mini #wmSesYazi { display: none; }
.wm-ses.mini .wm-ses-orta { flex-direction: row; gap: 10px; min-width: 0; justify-content: flex-start; }
.wm-ses.mini .wm-kure { width: 42px; height: 42px; flex-shrink: 0; box-shadow: 0 0 18px rgba(255, 87, 34, .4); }
.wm-ses.mini .wm-kure::after { filter: blur(8px); }
.wm-ses.mini .wm-ses-durum { font-size: 12.5px; min-height: 0; white-space: nowrap; }
.wm-ses.mini .wm-ses-durum:empty { display: none; }
.wm-ses.mini .wm-altyazi { flex: 1; min-width: 0; min-height: 0; max-height: 40px; overflow: hidden; font-size: 13px; text-align: left; margin: 0; padding: 0; }
.wm-ses.mini .wm-altyazi .kullanici { display: none; }
.wm-ses.mini .wm-altyazi .asistan { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wm-ses.mini .wm-ses-alt { gap: 8px; }
.wm-ses.mini .wm-ses-alt button { width: 40px; height: 40px; }
.wm-ses.mini .wm-ses-alt button svg { width: 18px; height: 18px; }

@media (max-width: 575.98px) {
    #whatsmoodChatPopup { right: 8px !important; left: 8px !important; width: auto !important; bottom: 84px !important; }
    .wm-ses-alt { gap: 16px; }
}

/* ---------- Her sayfadaki asistan (asistan-widget.js) ---------- */
#whatsmoodChatBtn.wm-asistan-simge {
    width: 62px !important; height: 62px !important; border: 0 !important; cursor: pointer;
    display: flex !important; align-items: center; justify-content: center; padding: 0;
    background: linear-gradient(135deg, #ff7a45 0%, #ff5722 40%, #c026d3 100%) !important;
    box-shadow: 0 10px 28px rgba(255, 87, 34, .38), 0 0 0 0 rgba(255, 122, 69, .45) !important;
    transition: transform .2s ease, box-shadow .2s ease; animation: wm-simge-nabiz 3.2s ease-out infinite;
}
#whatsmoodChatBtn.wm-asistan-simge:hover { transform: translateY(-2px) scale(1.05); }
@keyframes wm-simge-nabiz {
    0% { box-shadow: 0 10px 28px rgba(255, 87, 34, .38), 0 0 0 0 rgba(255, 122, 69, .45); }
    70%, 100% { box-shadow: 0 10px 28px rgba(255, 87, 34, .38), 0 0 0 16px rgba(255, 122, 69, 0); }
}
#micBtn.dinliyor { background: #fee2e2 !important; color: #dc2626 !important; animation: wm-nokta 1s infinite; }
.wm-secenekler { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 40px; }
.wm-secenekler button {
    border: 1px solid #e2e8f0; background: #fff; color: #0f172a; border-radius: 18px; padding: 6px 12px; font-size: 13px; cursor: pointer;
    transition: background .15s, border-color .15s;
}
.wm-secenekler button:hover { background: #fff7ed; border-color: #fdba74; }
.wm-kartlar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px 40px; scrollbar-width: thin; }
.wm-kart {
    flex: 0 0 180px; display: flex; flex-direction: column; gap: 4px; border: 1px solid #e2e8f0; border-radius: 14px; padding: 8px;
    text-decoration: none !important; color: #0f172a !important; background: #fff; transition: box-shadow .15s;
}
.wm-kart:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .1); }
.wm-kart img { width: 100%; height: 96px; object-fit: cover; border-radius: 10px; }
.wm-kart b { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wm-kart small { font-size: 11.5px; color: #64748b; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
[data-bs-theme="dark"] #whatsmoodChatPopup, [data-bs-theme="dark"] #whatsmoodMessages { background: #0f172a !important; color: #e2e8f0; }
[data-bs-theme="dark"] .wm-b-sen { background: #1e293b; color: #e2e8f0; }
[data-bs-theme="dark"] #whatsmoodChatPopup > div:last-child { background: #1e293b; border-color: #334155 !important; }
[data-bs-theme="dark"] #whatsmoodInput { color: #e2e8f0; }
[data-bs-theme="dark"] .wm-kart, [data-bs-theme="dark"] .wm-secenekler button { background: #1e293b; color: #e2e8f0 !important; border-color: #334155; }

/* Mod rozetinde karakter (mod-karakter.js) */
#wmSesMod.karakterli { display: inline-flex; align-items: center; gap: 4px; }
#wmSesMod.karakterli svg { flex-shrink: 0; }
