/* ============================================================
   Muhabbetci — Uyarı ve Kamera Paneli stilleri (uyari.css)
   ============================================================ */

/* ============================================================
   ÖZEL MESAJ UYARISI — ekranın ortasında, her koşulda görünür
   ============================================================ */
.pmtoast-wrap {
  position: fixed !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  z-index: 9999 !important;
  pointer-events: none;
  width: max-content;
  max-width: 100vw;
}

.pmtoast-wrap:empty { display: none; }

.pmtoast {
  pointer-events: auto;
  position: relative;
  width: min(400px, calc(100vw - 32px));
  padding: 20px 20px 24px;
  border-radius: var(--r-xl, 18px);
  background: linear-gradient(160deg,
    rgba(79,140,255,.18), rgba(123,92,255,.12) 55%, #121721);
  border: 1px solid rgba(79,140,255,.55);
  box-shadow:
    0 26px 80px rgba(0,0,0,.65),
    0 0 40px rgba(79,140,255,.28) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  cursor: pointer;
  animation: uyariGir .38s cubic-bezier(.2,.9,.3,1);
}

@keyframes uyariGir {
  from { opacity: 0; transform: translateY(26px) scale(.94); }
  to   { opacity: 1; transform: none; }
}

.pmtoast.out {
  animation: uyariCik .3s ease forwards;
}
@keyframes uyariCik {
  to { opacity: 0; transform: translateY(-14px) scale(.96); }
}

.pmtoast-glow {
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 140%;
  background: radial-gradient(circle at 50% 0%, rgba(79,140,255,.34), transparent 68%);
  pointer-events: none;
  animation: uyariNefes 3.4s ease-in-out infinite;
}
@keyframes uyariNefes {
  0%, 100% { opacity: .5; }
  50%      { opacity: .95; }
}

.pmtoast-rings { position: absolute; inset: 0; pointer-events: none; }
.pmtoast-rings i {
  position: absolute;
  top: 26px; left: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(79,140,255,.5);
  animation: uyariHalka 2.4s ease-out infinite;
}
.pmtoast-rings i:nth-child(2) { animation-delay: .8s; }
.pmtoast-rings i:nth-child(3) { animation-delay: 1.6s; }

@keyframes uyariHalka {
  0%   { transform: scale(.6); opacity: .85; }
  100% { transform: scale(2.4); opacity: 0; }
}

.pmtoast-body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
}

.pmtoast-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 17px; font-weight: 800; color: #fff;
  flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,.24);
  box-shadow: 0 0 0 5px rgba(79,140,255,.14);
}

.pmtoast-text { min-width: 0; }

.pmtoast-title {
  font-size: 15.5px;
  font-weight: 800;
  margin-bottom: 4px;
  background: linear-gradient(90deg, #9dc0ff, #c9b6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pmtoast-name {
  font-size: 12.5px;
  color: var(--txt-dim, #a8b4c6);
  line-height: 1.4;
}

.pmtoast-actions {
  position: relative;
  display: flex;
  gap: 9px;
}

.pmtoast-btn {
  flex: 1 1 auto;
  padding: 10px 14px;
  border-radius: var(--r-sm, 10px);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s, background .15s;
}
.pmtoast-btn.go {
  background: linear-gradient(135deg, var(--accent, #4f8cff), var(--accent-2, #7b5cff));
  color: #fff;
  box-shadow: 0 6px 18px rgba(79,140,255,.35);
}
.pmtoast-btn.no {
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line, #263044);
  color: var(--txt-dim, #a8b4c6);
}
.pmtoast-btn:hover { filter: brightness(1.14); }

.pmtoast-bar {
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent, #4f8cff), var(--accent-2, #7b5cff));
  transform-origin: left;
  animation: uyariBar 7s linear forwards;
}
@keyframes uyariBar {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ============================================================
   KAMERASINI AÇANLAR — aşağı açılan panel
   ============================================================ */
.camDrop {
  position: relative;
  flex: 0 0 auto;
}

.camDropBtn {
  display: flex;
  align-items: center;
  gap: 8px;
}

.camDrop-count {
  font-size: 10.5px;
  font-weight: 800;
  min-width: 19px;
  padding: 2px 6px;
  border-radius: 12px;
  text-align: center;
  background: rgba(47,208,122,.18);
  border: 1px solid rgba(47,208,122,.45);
  color: #7ee5a8;
  flex: 0 0 auto;
}

.camDrop-arrow {
  font-size: 11px;
  opacity: .7;
  transition: transform .22s ease;
  flex: 0 0 auto;
}
.camDropBtn.open .camDrop-arrow { transform: rotate(180deg); }

/* ---- açılan gövde ---- */
.camDropBody {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  width: min(290px, calc(100vw - 24px));
  padding: 6px;
  border-radius: var(--r-md, 12px);
  background: #0d121c;
  border: 1px solid rgba(79,140,255,.42);
  box-shadow: 0 18px 48px rgba(0,0,0,.65);
  z-index: 400;
  animation: camDus .2s cubic-bezier(.2,.9,.3,1);
  transform-origin: top left;
}
.camDropBody.hidden { display: none; }

@keyframes camDus {
  from { opacity: 0; transform: translateY(-9px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.camDropList {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.camDropList::-webkit-scrollbar { width: 6px; }
.camDropList::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.14);
  border-radius: 3px;
}

.camDropItem {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .14s, border-color .14s;
  animation: camGir .18s ease;
}
.camDropItem:hover {
  background: rgba(79,140,255,.13);
  border-color: rgba(79,140,255,.36);
}
.camDropItem:active { background: rgba(79,140,255,.22); }

@keyframes camGir {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.camDropAv {
  width: 27px; height: 27px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  flex: 0 0 auto;
}

.camDropMeta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.camDropName {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.camDropName i {
  font-style: normal;
  color: var(--txt-mute, #8492a6);
  font-size: 10.5px;
}
.camDropSub {
  font-size: 10px;
  color: var(--txt-mute, #8492a6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.camDropLive {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2fd07a;
  box-shadow: 0 0 0 3px rgba(47,208,122,.2);
  flex: 0 0 auto;
  animation: camNabiz 1.5s ease-in-out infinite;
}
@keyframes camNabiz {
  0%, 100% { box-shadow: 0 0 0 3px rgba(47,208,122,.2); }
  50%      { box-shadow: 0 0 0 5px rgba(47,208,122,.05); }
}

.camDropGo {
  font-size: 12px;
  opacity: .45;
  flex: 0 0 auto;
}
.camDropItem:hover .camDropGo { opacity: 1; }

.camDropEmpty {
  padding: 14px 10px;
  font-size: 11.5px;
  color: var(--txt-mute, #8492a6);
  text-align: center;
  line-height: 1.5;
}

/* ============================================================
   HAREKET AZALTMA
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .pmtoast-glow,
  .pmtoast-rings i,
  .pmtoast-bar,
  .camDropLive { animation: none !important; }
}

/* ============================================================
   MOBİL
   ============================================================ */
@media (max-width: 760px) {
  .pmtoast-wrap {
    /* mobilde de ekranın ORTASINDA */
    top: 50%;
    bottom: auto;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .camDropBody {
    width: min(300px, calc(100vw - 20px));
    left: -6px;
  }
}

@media (max-width: 560px) {
  .pmtoast {
    padding: 16px 16px 20px;
  }
  .pmtoast-title { font-size: 15px; }
  .pmtoast-avatar { width: 42px; height: 42px; font-size: 16px; }
  .pmtoast-btn { padding: 11px 12px; font-size: 13.5px; }

  /* kamera düğmesi metni kısalsın */
  .camDropBtn .topCam-txt { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .camDropBody { width: calc(100vw - 20px); left: -50px; }
  .camDropItem { padding: 10px 9px; min-height: 48px; }
}

@media (max-width: 400px) {
  .camDrop-count { display: none; }
  .camDropBtn .topCam-txt { display: none; }
}


/* ============================================================
   KAMERASINI AÇANLAR — üst bar düğmesi ve açılan liste
   ============================================================ */
.camDrop {
  position: relative;
  flex: 0 0 auto;
}

.camDropBtn {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.camDropCount {
  font-size: 10.5px;
  font-weight: 800;
  min-width: 19px;
  padding: 2px 6px;
  border-radius: 12px;
  text-align: center;
  background: rgba(47,208,122,.18);
  border: 1px solid rgba(47,208,122,.45);
  color: #7ee5a8;
  flex: 0 0 auto;
}

.camDropArrow {
  font-size: 11px;
  opacity: .7;
  transition: transform .22s ease;
  flex: 0 0 auto;
}
.camDropBtn.open .camDropArrow { transform: rotate(180deg); }

.camDropBody {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(296px, calc(100vw - 24px));
  padding: 6px;
  border-radius: 12px;
  background: #0d121c;
  border: 1px solid rgba(79,140,255,.44);
  box-shadow: 0 18px 48px rgba(0,0,0,.7);
  z-index: 420;
  animation: camDus .2s cubic-bezier(.2,.9,.3,1);
  transform-origin: top left;
}
.camDropBody.hidden { display: none; }

@keyframes camDus {
  from { opacity: 0; transform: translateY(-9px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.camDropList {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.camDropList::-webkit-scrollbar { width: 6px; }
.camDropList::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.14);
  border-radius: 3px;
}

.camDropItem {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .14s, border-color .14s;
}
.camDropItem:hover {
  background: rgba(79,140,255,.13);
  border-color: rgba(79,140,255,.36);
}
.camDropItem:active { background: rgba(79,140,255,.22); }

.camDropAv {
  width: 27px; height: 27px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 800; color: #fff;
  flex: 0 0 auto;
}

.camDropMeta {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column;
}
.camDropName {
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.camDropName i { font-style: normal; color: var(--txt-mute, #8492a6); font-size: 10.5px; }
.camDropSub {
  font-size: 10px; color: var(--txt-mute, #8492a6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.camDropLive {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2fd07a;
  box-shadow: 0 0 0 3px rgba(47,208,122,.2);
  flex: 0 0 auto;
  animation: camNabiz2 1.5s ease-in-out infinite;
}
@keyframes camNabiz2 {
  0%, 100% { box-shadow: 0 0 0 3px rgba(47,208,122,.2); }
  50%      { box-shadow: 0 0 0 5px rgba(47,208,122,.05); }
}

.camDropGo { font-size: 12px; opacity: .45; flex: 0 0 auto; }
.camDropItem:hover .camDropGo { opacity: 1; }

.camDropEmpty {
  padding: 14px 10px;
  font-size: 11.5px;
  color: var(--txt-mute, #8492a6);
  text-align: center;
  line-height: 1.5;
}

/* mobil */
@media (max-width: 760px) {
  .camDropBody {
    width: min(304px, calc(100vw - 20px));
    left: -8px;
  }
  .camDropItem { padding: 10px 9px; min-height: 48px; }
}

@media (max-width: 560px) {
  .camDropBtn .topCam-txt { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .camDropBody { width: calc(100vw - 20px); left: -56px; }
}

@media (max-width: 400px) {
  .camDropCount { display: none; }
  .camDropBtn .topCam-txt { display: none; }
}


/* "Hepsini İzle" düğmesi — çoklu kamera ızgarasını açar */
.camDropAll {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(47,208,122,.16), rgba(79,140,255,.1));
  border: 1px solid rgba(47,208,122,.4);
  color: #9fe8c0;
  transition: filter .15s, background .15s;
}
.camDropAll:hover { filter: brightness(1.15); background: linear-gradient(135deg, rgba(47,208,122,.26), rgba(79,140,255,.16)); }
.camDropAll:active { transform: scale(.985); }
