/* ─── Gelişmiş Sohbet Özellikleri ─── */

.chat-empty-hint {
  text-align: center;
  padding: 28px 18px;
  margin: 16px auto;
  max-width: 92%;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(74, 14, 46, 0.75);
  font-size: 0.82rem;
  line-height: 1.5;
  box-shadow: 0 4px 18px rgba(255, 45, 111, 0.08);
}
.chat-empty-hint strong { color: var(--dark); display: block; margin-bottom: 6px; }

#pinned-bar {
  flex-shrink: 0;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(255, 45, 111, 0.12), rgba(255, 107, 157, 0.08));
  border-bottom: 1px solid var(--pink-soft);
  font-size: .78rem;
  color: var(--dark);
}
#pinned-bar.visible { display: flex; }
#pinned-bar .pin-icon { font-size: 1rem; flex-shrink: 0; }
#pinned-bar .pin-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
#pinned-bar .pin-unpin { border: none; background: none; cursor: pointer; font-size: 1rem; opacity: .6; padding: 4px; }

#chat-screen { position: relative; }

#typing-indicator {
  display: none;
  padding: 4px 14px 8px;
  font-size: .75rem;
  color: var(--pink-light);
  font-weight: 700;
  flex-shrink: 0;
}
#typing-indicator.visible { display: block; }
.typing-dots span {
  display: inline-block;
  animation: typingBounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

#reply-preview {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(255, 45, 111, 0.1), rgba(255, 107, 157, 0.08));
  border-top: 2px solid var(--pink);
  border-left: 4px solid var(--pink);
  font-size: .78rem;
  flex-shrink: 0;
}
#reply-preview.visible { display: flex; }
#reply-preview .reply-body { flex: 1; min-width: 0; padding-left: 4px; }
#reply-preview .reply-label { font-weight: 800; color: var(--pink); font-size: .72rem; display: block; margin-bottom: 2px; }
#reply-preview .reply-text { color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-size: .78rem; }
#reply-preview .reply-cancel { border: none; background: none; cursor: pointer; font-size: 1.1rem; color: #999; }

.msg {
  position: relative;
  user-select: none;
  touch-action: pan-y;
  transition: transform .2s ease;
}
.msg.swiping { transition: none; }
.msg-reply-quote {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-left: 3px solid var(--pink);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.msg-reply-quote--missing {
  cursor: default;
  opacity: 0.75;
}
.msg.sent .msg-reply-quote {
  background: rgba(255, 255, 255, 0.22);
  border-left-color: rgba(255, 255, 255, 0.85);
}
.msg.received .msg-reply-quote { border-left-color: var(--pink-light); }
.msg-reply-name {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  color: var(--pink);
  margin-bottom: 2px;
}
.msg.sent .msg-reply-name { color: rgba(255, 255, 255, 0.95); }
.msg-reply-text {
  display: block;
  font-size: .72rem;
  opacity: .88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: normal;
}
.msg--highlight {
  animation: msgHighlight 1.6s ease;
}
@keyframes msgHighlight {
  0%, 100% { box-shadow: none; transform: none; }
  15%, 85% { box-shadow: 0 0 0 3px rgba(255, 45, 111, 0.45); transform: scale(1.01); }
}
.msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.msg-reaction-pill {
  background: rgba(255,255,255,.9);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: .85rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.msg.sent .msg-reaction-pill { background: rgba(255,255,255,.25); }

#reaction-menu {
  position: fixed;
  z-index: 600;
  display: none;
  gap: 4px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 28px rgba(255, 45, 111, 0.25);
  border: 2px solid var(--pink-soft);
}
#reaction-menu.visible { display: flex; }
#reaction-menu button {
  border: none;
  background: none;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  transition: transform .15s, background .15s;
}
#reaction-menu button:hover { background: var(--pink-bg); transform: scale(1.15); }

#msg-context-menu {
  position: fixed;
  z-index: 600;
  display: none;
  flex-direction: column;
  min-width: 140px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.15);
  border: 1px solid var(--pink-soft);
}
#msg-context-menu.visible { display: flex; }
#msg-context-menu button {
  border: none;
  background: none;
  padding: 12px 16px;
  text-align: left;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--dark);
}
#msg-context-menu button:hover { background: var(--pink-bg); }

.nudge-btn {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(135deg, #ff9ec5, var(--pink-light));
  font-size: 1.2rem;
  animation: nudgePulse 1.5s ease-in-out infinite;
  box-shadow: 0 3px 12px rgba(255, 45, 111, 0.35);
}
@keyframes nudgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

#nudge-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(255, 45, 111, 0.25);
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#nudge-overlay.visible { display: flex; }
.nudge-heart {
  font-size: 8rem;
  animation: nudgeHeartBeat 1s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(255, 45, 111, 0.5));
}
@keyframes nudgeHeartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

#float-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 700;
  overflow: hidden;
}
.float-particle {
  position: absolute;
  font-size: 1.2rem;
  animation: floatDown linear forwards;
  opacity: 0;
}
@keyframes floatDown {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.media-card--draw { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }

#draw-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(45, 10, 30, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#draw-modal.visible { display: flex; }
.draw-modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  width: 100%;
  max-width: 400px;
}
.draw-modal-box h3 { font-weight: 800; margin-bottom: 10px; color: var(--dark); }
#draw-canvas {
  display: block;
  width: 100%;
  height: 280px;
  border: 2px solid var(--pink-soft);
  border-radius: 14px;
  touch-action: none;
  cursor: crosshair;
  background: #fff;
}
.draw-tools {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  flex-wrap: wrap;
  align-items: center;
}
.draw-color {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ddd;
  cursor: pointer;
}
.draw-color.active { box-shadow: 0 0 0 2px var(--pink); }
.draw-actions { display: flex; gap: 8px; margin-top: 10px; }
.draw-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.draw-clear { background: #eee; color: #666; }
.draw-send { background: linear-gradient(135deg, var(--pink), var(--pink-light)); color: #fff; }

.msg-embed {
  margin-top: 4px;
  border-radius: 12px;
  overflow: hidden;
  max-width: 260px;
}
.msg-embed iframe {
  width: 100%;
  border: none;
  display: block;
}
.msg-embed--spotify iframe { height: 80px; }
.msg-embed--youtube iframe { height: 150px; }

.msg-nudge-bubble { font-size: 2rem; text-align: center; padding: 8px 0; animation: nudgeHeartBeat 1.2s ease-in-out infinite; }

.media-grid { grid-template-columns: repeat(4, 1fr); }

/* ─── Medya büyütme (lightbox) ─── */
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 16px;
}
.media-lightbox[hidden] { display: none !important; }
.media-lightbox-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}
.media-lightbox-inner img,
.media-lightbox-inner video {
  max-width: min(92vw, 520px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.media-lightbox-inner img { pointer-events: none; }
.media-lightbox-inner video { background: #000; }
.media-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.media-lightbox-close:hover { background: rgba(255, 45, 111, 0.85); }
.protected-wrap:has(.msg-image),
.gallery-item.protected-wrap {
  cursor: zoom-in;
}
