/* projesunum360 WhatsApp asistanı
   Puke Medya teklif asistanının (pukemedya.com) uyarlaması: konu → proje aşaması → ad → firma → WhatsApp.
   Tema: koyu petrol zemin, altın vurgu, DM Sans (site.css değişkenleri). Yalnız panelde WhatsApp numarası doluysa yüklenir. */
.ps-chat {
  --pc-vurgu: var(--altin, #d2ad62); --pc-vurgu-a: var(--altin-a, #f1d998); --pc-koyu: var(--zemin, #0b1517);
  --pc-yuzey: var(--yuzey, #142327); --pc-yuzey-2: var(--yuzey-2, #1a2c31); --pc-metin: var(--metin, #eef1f3); --pc-metin-2: var(--metin-2, #a3b3b5);
  --pc-cizgi: var(--cizgi-2, rgba(200, 224, 226, .2)); --pc-wa: #25d366; --pc-alt: 24px;
  position: fixed; right: 24px; bottom: var(--pc-alt); z-index: 70; font-family: var(--sans, 'DM Sans', sans-serif);
  transition: bottom .3s var(--egri, ease);
}
.ps-chat * { box-sizing: border-box; }
.ps-chat-ac {
  display: flex; align-items: center; gap: 12px; padding: 8px 20px 8px 8px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(20, 35, 39, .92); color: var(--pc-metin); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .7), 0 0 0 1px var(--pc-cizgi) inset;
  position: relative; transition: transform .25s ease, box-shadow .25s ease; animation: psDurt 7s ease-in-out 5s infinite;
}
.ps-chat-ac:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .8), 0 0 0 1px rgba(210, 173, 98, .55) inset; }
.ps-chat-ac-ikon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--pc-wa); color: #fff; flex: none; }
.ps-chat-ac-ikon svg { width: 25px; height: 25px; }
.ps-chat-ac-yazi { display: flex; flex-direction: column; text-align: left; line-height: 1.25; }
.ps-chat-ac-yazi strong { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ps-chat-ac-yazi small { font-size: 12.5px; color: var(--pc-metin-2); }
.ps-chat-nokta { position: absolute; top: 7px; left: 43px; width: 11px; height: 11px; border-radius: 50%; background: var(--pc-vurgu-a); box-shadow: 0 0 0 2px var(--pc-yuzey); }
.ps-chat.acik .ps-chat-ac { opacity: 0; pointer-events: none; transform: scale(.9); }
@keyframes psDurt { 0%, 92%, 100% { transform: none; } 94% { transform: rotate(-3deg); } 96% { transform: rotate(3deg); } 98% { transform: rotate(-2deg); } }

.ps-chat-ipucu {
  position: absolute; right: 0; bottom: 76px; width: 260px; padding: 14px 34px 14px 16px; border-radius: 16px 16px 4px 16px;
  background: var(--pc-metin); color: #142327; font-size: 14px; line-height: 1.45; cursor: pointer;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .6); animation: psBelir .35s cubic-bezier(.2, .8, .2, 1) both;
}
.ps-chat-ipucu b { color: var(--altin-k, #9c7433); }
.ps-chat-ipucu-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 18px; line-height: 1; color: #728486; cursor: pointer; }

.ps-chat-panel {
  position: absolute; right: 0; bottom: 0; width: 380px; height: 580px; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px);
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--pc-koyu);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .85), 0 0 0 1px var(--pc-cizgi); animation: psBelir .35s cubic-bezier(.2, .8, .2, 1) both; transform-origin: bottom right;
}
.ps-chat-panel[hidden], .ps-chat-ipucu[hidden] { display: none; }
@keyframes psBelir { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.ps-chat-bas { display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 16px; background: var(--pc-yuzey); position: relative; }
.ps-chat-bas::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--altin-g, var(--pc-vurgu)); }
.ps-chat-avatar { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--pc-koyu); box-shadow: 0 0 0 1px var(--pc-cizgi) inset; flex: none; }
.ps-chat-avatar img { width: 30px; height: 30px; }
.ps-chat-baslik { flex: 1; min-width: 0; line-height: 1.25; }
.ps-chat-baslik strong { display: block; font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-chat-baslik small { font-size: 12px; color: var(--pc-metin-2); }
.ps-chat-cevrimici { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--pc-wa); margin-right: 4px; vertical-align: middle; }
.ps-chat-bas button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .06); color: var(--pc-metin); display: grid; place-items: center; cursor: pointer; flex: none; transition: background-color .2s ease; }
.ps-chat-bas button:hover { background: rgba(255, 255, 255, .14); }
.ps-chat-bas svg { width: 17px; height: 17px; }

.ps-chat-govde { flex: 1; overflow-y: auto; padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; overscroll-behavior: contain; }
.pc-mesaj { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; animation: psBelir .3s ease both; overflow-wrap: anywhere; }
.pc-bot { align-self: flex-start; background: var(--pc-yuzey-2); color: var(--pc-metin); border-bottom-left-radius: 4px; }
.pc-kisi { align-self: flex-end; background: var(--pc-vurgu); color: var(--pc-koyu); font-weight: 500; border-bottom-right-radius: 4px; }
.pc-yaziyor { align-self: flex-start; display: flex; gap: 4px; padding: 14px 16px; background: var(--pc-yuzey-2); border-radius: 16px; border-bottom-left-radius: 4px; }
.pc-yaziyor i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc-metin-2); animation: psNokta 1s infinite; }
.pc-yaziyor i:nth-child(2) { animation-delay: .15s; } .pc-yaziyor i:nth-child(3) { animation-delay: .3s; }
@keyframes psNokta { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.pc-secenekler { display: flex; flex-wrap: wrap; gap: 7px; animation: psBelir .3s ease both; }
.pc-secenek {
  border: 1px solid var(--pc-cizgi); background: transparent; color: var(--pc-metin); border-radius: 999px; padding: 8px 14px;
  font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: all .2s ease; text-align: left;
}
.pc-secenek:hover { border-color: var(--pc-vurgu); color: var(--pc-vurgu-a); transform: translateY(-1px); }
.pc-secenek[disabled] { opacity: .4; pointer-events: none; }
.pc-secenek.secildi { background: var(--pc-vurgu); border-color: var(--pc-vurgu); color: var(--pc-koyu); opacity: 1; }
.pc-gec .pc-secenek { font-size: 12.5px; color: var(--pc-metin-2); }
.ps-chat a.pc-wa {
  display: flex; align-items: center; justify-content: center; gap: 8px; align-self: stretch; border-radius: 999px; padding: 13px 16px;
  background: var(--pc-wa); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .2s ease, filter .2s ease; animation: psBelir .3s ease both;
}
.ps-chat a.pc-wa:hover { transform: translateY(-1px); filter: brightness(1.06); }
.pc-wa svg { width: 20px; height: 20px; }
.pc-not { font-size: 11.5px; color: var(--metin-3, #728486); text-align: center; }

.ps-chat-giris { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--pc-yuzey); border-top: 1px solid var(--cizgi, rgba(200, 224, 226, .11)); }
.ps-chat-giris input {
  flex: 1; min-width: 0; height: 46px; border: 1px solid var(--pc-cizgi); border-radius: 999px; padding: 0 16px;
  font: inherit; font-size: 15px; background: var(--pc-koyu); color: var(--pc-metin); outline: 0;
}
.ps-chat-giris input::placeholder { color: var(--metin-3, #728486); }
.ps-chat-giris input:focus, .ps-chat-giris.soruyor input { border-color: var(--pc-vurgu); box-shadow: 0 0 0 3px rgba(210, 173, 98, .16); }
.ps-chat-giris button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--pc-vurgu); color: var(--pc-koyu); display: grid; place-items: center; cursor: pointer; flex: none; }
.ps-chat-giris svg { width: 18px; height: 18px; }

@media (max-width: 575px) {
  .ps-chat { right: 14px; --pc-alt: 16px; }
  .ps-chat-ac { padding: 7px; }
  .ps-chat-ac-yazi { display: none; }
  .ps-chat-nokta { left: 42px; }
  .ps-chat.acik { inset: 0; }
  .ps-chat-panel { position: fixed; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .ps-chat-ipucu { width: 230px; bottom: 68px; }
  .ps-chat-giris input { font-size: 16px; } /* iOS'ta odaklanınca yakınlaşmasın */
}
@media (prefers-reduced-motion: reduce) { .ps-chat *, .ps-chat-ac { animation: none !important; transition: none !important; } }
