/* Pera sohbet balonu — style.css'teki --bg/--text/--grad/--pink değişkenlerini kullanır */
.pera { position: fixed; right: 20px; bottom: 20px; z-index: 90; font-family: var(--f); }
.pera-dugme {
  display: flex; align-items: center; gap: .55rem; margin-left: auto;
  padding: .75rem 1.15rem .75rem .9rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--grad); color: #fff; font: 700 .9rem var(--f);
  box-shadow: 0 10px 34px rgba(255, 45, 138, .38); transition: transform .2s, box-shadow .2s;
}
.pera-dugme:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(255, 45, 138, .5); }
.pera-nokta { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: pera-nabiz 2.2s infinite; }
@keyframes pera-nabiz { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 70% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.pera.acik .pera-dugme { display: none; }

.pera-panel {
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100svh - 110px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg2, var(--bg)); color: var(--text);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 45, 138, .12);
}
.pera-panel[hidden] { display: none; }
.pera-bas { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; background: var(--grad); color: #fff; }
.pera-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); font-weight: 800; }
.pera-baslik { flex: 1; line-height: 1.2; }
.pera-baslik strong { display: block; font-size: 1rem; }
.pera-baslik small { opacity: .85; font-size: .74rem; }
.pera-kapat { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: .9rem; }
.pera-kapat:hover { background: rgba(255,255,255,.3); }

.pera-akis { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; overscroll-behavior: contain; }
.pera-msj { max-width: 86%; padding: .62rem .85rem; border-radius: 16px; font-size: .9rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.pera-msj.bot { align-self: flex-start; background: rgba(155, 79, 217, .12); border-bottom-left-radius: 5px; }
.pera-msj.kul { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.pera-msj a { color: var(--pink); text-decoration: underline; text-underline-offset: 2px; }
.pera-yaziyor { display: flex; gap: 4px; padding: .8rem .9rem; }
.pera-yaziyor i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: pera-zipla 1.2s infinite; }
.pera-yaziyor i:nth-child(2) { animation-delay: .15s; }
.pera-yaziyor i:nth-child(3) { animation-delay: .3s; }
@keyframes pera-zipla { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.pera-oneriler { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .2rem; }
.pera-oneriler button { font: 600 .8rem var(--f); padding: .45rem .8rem; border-radius: 999px; cursor: pointer; background: transparent; color: var(--text); border: 1px solid var(--line-2, var(--line)); }
.pera-oneriler button:hover { border-color: var(--pink); color: var(--pink); }
.pera-tamam { align-self: center; font-size: .8rem; font-weight: 700; color: #1fb36b; padding: .3rem .8rem; border-radius: 999px; background: rgba(31, 179, 107, .12); }

.pera-form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line); }
.pera-form input { flex: 1; min-width: 0; font: .92rem var(--f); padding: .65rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); outline: none; }
.pera-form input:focus { border-color: var(--pink); }
.pera-gonder { width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; background: var(--grad); color: #fff; cursor: pointer; font-size: 1rem; }
.pera-gonder:disabled { opacity: .5; cursor: default; }
.pera-not { font-size: .68rem; color: var(--muted); padding: 0 .9rem .7rem; line-height: 1.4; }

@media (max-width: 720px) {
  .pera { right: 12px; bottom: 12px; }
  .pera-dugme { padding: .65rem 1rem .65rem .8rem; font-size: .82rem; }
  .pera.acik { left: 8px; right: 8px; bottom: 8px; }
  .pera-panel { width: 100%; height: calc(100svh - 16px); border-radius: 18px; }
  .pera-form input { font-size: 16px; } /* iOS yakınlaştırmasın */
}
@media (prefers-reduced-motion: reduce) {
  .pera-nokta, .pera-yaziyor i { animation: none; }
}
