/* =====================================================
   SAATDURUM — REALTIME CHAT v3.0 (THEME-OPTIMIZED & MOBILE-FIRST)
   - Geniş, ferah ve mobil uyumlu mesajlaşma arayüzü
   - Temalarla (Dark, Light, Pink, Aero, Purple, Mono) %100 uyumlu
   - Instagram/Telegram tarzı yumuşak hatlı mesaj balonları
   - Çift dokunma kalp animasyonu (@keyframes heartPop)
   - Akıcı alıntı yanıtlama, emoji ve çıkartma çekmecesi
===================================================== */

/* ── 1. ANA SOHBET KONTEYNERİ ── */
.grp-chat-wrap {
  display: flex;
  flex-direction: column;
  background: var(--grp-card, var(--bg-card, #121217));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.08));
  border-radius: 20px;
  overflow: hidden;
  height: 520px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

/* ── 2. MESAJ AKIŞ ALANI (FEED) ── */
.grp-chat-feed {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px;
  scroll-behavior: smooth;
  position: relative;
  -webkit-overflow-scrolling: touch;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

.grp-chat-feed::-webkit-scrollbar {
  width: 5px;
}
.grp-chat-feed::-webkit-scrollbar-track {
  background: transparent;
}
.grp-chat-feed::-webkit-scrollbar-thumb {
  background: var(--grp-border, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
}

/* ── Boş Durum ── */
.grp-chat-empty {
  text-align: center;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.5));
  font-size: 13.5px;
  padding: 48px 16px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.grp-chat-empty-icon {
  font-size: 38px;
  margin-bottom: 2px;
  animation: floatChatIcon 2.5s ease-in-out infinite;
}

@keyframes floatChatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Faz 4: eski mesaj sayfalama göstergesi — feed'in tepesine kullanıcı
   yukarı kaydırdığında geçici olarak eklenir/kaldırılır. */
.grp-chat-older-loading {
  text-align: center;
  font-size: 11.5px;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.5));
  padding: 8px 0 10px 0;
  user-select: none;
}

/* ── Faz 6: Yükleniyor İskeleti (Skeleton) ──
   İlk Firestore cevabı gelmeden önce, "henüz mesaj/sohbet yok" boş
   durumuyla karışmasın diye gösterilir. dmManager.js + group.js hem
   inbox listesi hem mesaj feed'i için ortak kullanır (chatCore.js →
   renderChatSkeletonHtml). Var olan renk değişkenleri (--grp-*) dışında
   yeni bir tasarım dili eklenmedi. */
.grp-chat-skeleton-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 4px;
  width: 100%;
}

.grp-chat-skeleton-row {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.85;
}

.grp-chat-skeleton-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(90deg,
    var(--grp-border, rgba(255,255,255,0.08)) 25%,
    var(--grp-bg-mid, rgba(255,255,255,0.16)) 37%,
    var(--grp-border, rgba(255,255,255,0.08)) 63%);
  background-size: 400% 100%;
  animation: grpSkeletonShimmer 1.4s ease infinite;
}

.grp-chat-skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.grp-chat-skeleton-lines span {
  display: block;
  height: 9px;
  border-radius: 5px;
  background: linear-gradient(90deg,
    var(--grp-border, rgba(255,255,255,0.08)) 25%,
    var(--grp-bg-mid, rgba(255,255,255,0.16)) 37%,
    var(--grp-border, rgba(255,255,255,0.08)) 63%);
  background-size: 400% 100%;
  animation: grpSkeletonShimmer 1.4s ease infinite;
}

.grp-chat-skeleton-lines span:first-child { width: 55%; }
.grp-chat-skeleton-lines span:last-child { width: 85%; height: 7px; opacity: 0.7; }

@keyframes grpSkeletonShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ── Faz 6: Bağlantı Sorunu Durumu ──
   .grp-chat-empty ile aynı iskeleti kullanır (bkz. üstteki kural),
   sadece vurgu rengi ve ikon farklı — ayrı bir kutu tasarımı icat
   edilmedi. */
.grp-chat-connection-error .grp-chat-empty-icon {
  animation: none;
}

.grp-chat-connection-error strong {
  color: #f59e0b;
}

/* ── 3. MESAJ ÖĞESİ & HİZALAMA ── */
.grp-chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 84%;
  position: relative;
  transition: transform 0.15s ease;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

.grp-chat-msg.is-selected-for-action {
  z-index: 25;
}

.grp-chat-msg.is-new {
  animation: grpMsgFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes grpMsgFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.grp-chat-msg.is-mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* ── Gönderen Profil İkonu ── */
.grp-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.05));
  border: 1.5px solid var(--grp-border, rgba(255, 255, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.grp-chat-avatar:hover {
  transform: scale(1.08);
  border-color: var(--grp-accent, var(--accent, #f97316));
}

.grp-chat-avatar.is-mine-avatar {
  background: var(--accent-dim, rgba(148, 163, 184, 0.15));
  border-color: var(--grp-accent, var(--accent, #f97316));
}

/* ── Balon Sarmalayıcı & İsim ── */
.grp-chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  min-width: 64px;
}

.grp-chat-msg.is-mine .grp-chat-bubble-wrap {
  align-items: flex-end;
}

.grp-chat-sender-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--grp-accent, var(--accent, #f97316));
  padding: 0 4px;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: opacity 0.15s ease;
}
.grp-chat-sender-name:hover {
  opacity: 0.85;
  text-decoration: underline;
}

/* ── 4. MESAJ BALONU (BUBBLE) ── */
.grp-chat-bubble {
  background: var(--grp-card-inner, var(--bg-card-hv, #1e1e2d));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.08));
  border-radius: 18px 18px 18px 4px;
  padding: 9px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: filter 0.15s ease, transform 0.15s cubic-bezier(0.2, 0, 0, 1), opacity 0.15s ease, box-shadow 0.2s ease, outline 0.2s ease;
  color: var(--grp-text-p, #ffffff);
}

.grp-chat-bubble.is-pressing {
  transform: scale(0.96) !important;
  opacity: 0.88 !important;
  filter: brightness(1.08);
}

.grp-chat-msg.is-selected-for-action .grp-chat-bubble {
  outline: 2px solid var(--grp-accent, var(--accent, #f97316));
  outline-offset: 2px;
  box-shadow: 0 0 18px var(--grp-accent-glow, rgba(249, 115, 22, 0.45));
}

.grp-chat-bubble:active {
  transform: scale(0.99);
}

/* Kendi Gönderdiğim Mesaj Balonu (Tema Vurgu Rengi) */
.grp-chat-msg.is-mine .grp-chat-bubble {
  background: var(--grp-accent, var(--accent, #f97316));
  border-color: transparent;
  border-radius: 18px 18px 4px 18px;
  color: var(--accent-text, #ffffff);
  box-shadow: 0 3px 12px var(--grp-accent-glow, rgba(0, 0, 0, 0.2));
}

/* Çıkartma (Sticker) Balon Stili */
.grp-chat-bubble.is-sticker {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px 6px;
}

.grp-chat-sticker-img {
  width: 112px;
  height: 112px;
  max-width: 130px;
  max-height: 130px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.22));
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grp-chat-sticker-img:hover {
  transform: scale(1.08) rotate(2deg);
}

/* GIF Mesaj Balon & Görsel Stili */
.grp-chat-bubble.is-gif {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px 6px;
  max-width: 260px;
}

.chat-gif {
  max-width: 250px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  cursor: pointer;
  image-rendering: -webkit-optimize-contrast;
}

.chat-gif:hover {
  transform: scale(1.025);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* ── 5. ALINTI YANIT KARTI (BALON İÇİ) ── */
.grp-chat-reply-preview {
  background: rgba(0, 0, 0, 0.1);
  border-left: 3.5px solid var(--grp-accent, var(--accent, #f97316));
  border-radius: 8px;
  padding: 5px 9px;
  margin-bottom: 3px;
  font-size: 11px;
  line-height: 1.35;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.grp-chat-msg.is-mine .grp-chat-reply-preview {
  background: rgba(0, 0, 0, 0.2);
  border-left-color: rgba(255, 255, 255, 0.9);
  color: #ffffff;
}

.grp-chat-reply-preview:hover {
  background: rgba(0, 0, 0, 0.22);
}

.grp-chat-reply-sender {
  font-weight: 700;
  display: block;
  margin-bottom: 1px;
  color: var(--grp-accent, var(--accent, #f97316));
}

.grp-chat-msg.is-mine .grp-chat-reply-sender {
  color: #ffffff;
  opacity: 0.95;
}

.grp-chat-reply-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}

/* ── 6. MESAJ METNİ VE LİNKLER ── */
.grp-chat-text {
  font-size: 13.5px;
  color: inherit;
  line-height: 1.45;
  word-break: break-word;
}

.grp-chat-link {
  color: inherit;
  text-decoration: underline;
  word-break: break-all;
  font-weight: 600;
}

/* ── 7. SAAT VE METADATA ── */
.grp-chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.grp-chat-msg.is-mine .grp-chat-meta {
  justify-content: flex-end;
}

.grp-chat-time {
  font-size: 9.5px;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.5));
  font-family: var(--grp-font-mono, monospace);
  white-space: nowrap;
  opacity: 0.75;
}

.grp-chat-msg.is-mine .grp-chat-time {
  color: rgba(255, 255, 255, 0.75);
  opacity: 0.9;
}

/* ── 8. EYLEM BUTONLARI ÇUBUĞU (REPLY/HEART/COPY/DELETE) ── */
.grp-chat-actions {
  position: absolute;
  top: -14px;
  right: 6px;
  background: var(--grp-card, var(--bg-card, #1e1e2d));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.15));
  border-radius: 20px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 10;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (hover: hover) and (pointer: fine) {
  .grp-chat-msg:hover .grp-chat-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

.grp-chat-msg.is-mine .grp-chat-actions {
  right: auto;
  left: 6px;
}

.grp-chat-action-btn {
  background: transparent;
  border: none;
  color: var(--grp-text-s, #94a3b8);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.grp-chat-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--grp-text-p, #ffffff);
  transform: scale(1.15);
}

.grp-chat-action-btn.delete-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

/* ── 9. REAKSİYON ROZETİ (FLOATING PILL) ── */
.grp-chat-reactions {
  position: absolute;
  bottom: -9px;
  right: 8px;
  background: var(--grp-card, var(--bg-card, #1e1e2d));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.15));
  border-radius: 12px;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--grp-text-p, #f1f5f9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 3;
  user-select: none;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease;
}

.grp-chat-reactions:hover {
  transform: scale(1.15);
  background: var(--grp-card-inner, #2a2a3e);
}

.grp-chat-reactions.has-my-heart {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.grp-chat-reactions .reaction-heart {
  font-size: 12px;
  line-height: 1;
}

.grp-chat-reactions .reaction-count {
  font-size: 10.5px;
}

/* ── 10. ÇİFT DOKUNMA KALP ANİMASYONU ── */
@keyframes heartPop {
  0% {
    transform: translate(-50%, -50%) scale(0) rotate(-15deg);
    opacity: 0;
  }
  35% {
    transform: translate(-50%, -50%) scale(1.35) rotate(0deg);
    opacity: 1;
  }
  65% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) translateY(-32px) scale(0.8);
    opacity: 0;
  }
}

.heart-pop-anim {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  font-size: 44px;
  line-height: 1;
  z-index: 30;
  animation: heartPop 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  filter: drop-shadow(0 4px 14px rgba(239, 68, 68, 0.6));
  user-select: none;
}

/* ── 11. YANITLAMA ÜST BARI (REPLYING BAR) ── */
.grp-chat-replying-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--grp-card-inner, var(--bg-card-hv, rgba(0, 0, 0, 0.15)));
  border-top: 1px solid var(--grp-border, rgba(255, 255, 255, 0.08));
  border-left: 3.5px solid var(--grp-accent, var(--accent, #f97316));
  font-size: 12px;
  animation: grpBarSlideDown 0.18s ease-out;
}

@keyframes grpBarSlideDown {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.grp-replying-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.grp-replying-title {
  font-weight: 700;
  color: var(--grp-accent, var(--accent, #f97316));
  display: flex;
  align-items: center;
  gap: 4px;
}

.grp-replying-snippet {
  color: var(--grp-text-s, rgba(255, 255, 255, 0.6));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.grp-replying-cancel {
  background: transparent;
  border: none;
  color: var(--grp-text-s, #94a3b8);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.grp-replying-cancel:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ── 12. MESAJ YAZMA ALANI (INPUT ROW) ── */
.grp-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--grp-border, rgba(255, 255, 255, 0.08));
  background: var(--grp-card, var(--bg-card, #121217));
  padding: 8px 12px;
  position: relative;
  z-index: 5;
}

.grp-chat-input {
  flex: 1;
  background: var(--grp-card-inner, var(--bg-card-hv, rgba(255, 255, 255, 0.05)));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.1));
  border-radius: 24px;
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--grp-text-p, #ffffff);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.grp-chat-input:focus {
  border-color: var(--grp-accent, var(--accent, #f97316));
  box-shadow: 0 0 0 3px var(--grp-accent-glow, rgba(249, 115, 22, 0.25));
}

.grp-chat-input::placeholder {
  color: var(--grp-text-s, rgba(255, 255, 255, 0.45));
}

.grp-chat-btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--grp-text-s, #94a3b8);
  font-size: 19px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.grp-chat-btn-icon:hover {
  color: var(--grp-accent, var(--accent, #f97316));
  background: rgba(255, 255, 255, 0.06);
  transform: scale(1.08);
}

.grp-chat-btn-icon.is-active {
  color: var(--grp-accent, var(--accent, #f97316));
  background: var(--accent-dim, rgba(249, 115, 22, 0.15));
}

.grp-chat-send-btn {
  background: var(--grp-accent, var(--accent, #f97316));
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  color: var(--accent-text, #ffffff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 8px var(--grp-accent-glow, rgba(249, 115, 22, 0.3));
}

.grp-chat-send-btn:hover {
  filter: brightness(1.12);
  transform: scale(1.06);
}

.grp-chat-send-btn:active {
  transform: scale(0.94);
}

/* ── 13. EMOJİ & ÇIKARTMA ÇEKMECESİ ── */
.grp-sticker-drawer {
  display: none;
  flex-direction: column;
  background: var(--grp-card, var(--bg-card, #121217));
  border-top: 1px solid var(--grp-border, rgba(255, 255, 255, 0.1));
  height: 230px;
  overflow: hidden;
  position: relative;
  z-index: 10;
  animation: grpDrawerSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes grpDrawerSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.grp-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--grp-card-inner, rgba(0, 0, 0, 0.15));
  border-bottom: 1px solid var(--grp-border, rgba(255, 255, 255, 0.08));
}

.grp-drawer-tabs {
  display: flex;
  gap: 6px;
}

.grp-drawer-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--grp-text-s, #94a3b8);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.grp-drawer-tab:hover {
  color: var(--grp-text-p, #ffffff);
  background: rgba(255, 255, 255, 0.05);
}

.grp-drawer-tab.active {
  color: var(--grp-accent, var(--accent, #f97316));
  background: var(--accent-dim, rgba(249, 115, 22, 0.15));
  border-color: var(--accent-dim, rgba(249, 115, 22, 0.3));
}

.grp-drawer-close {
  background: transparent;
  border: none;
  color: var(--grp-text-s, #94a3b8);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.grp-drawer-close:hover {
  color: #ef4444;
  background: rgba(255, 255, 255, 0.06);
}

.grp-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
}

.grp-drawer-body::-webkit-scrollbar {
  width: 4px;
}
.grp-drawer-body::-webkit-scrollbar-thumb {
  background: var(--grp-border, rgba(255, 255, 255, 0.1));
  border-radius: 4px;
}

/* Emoji Izgarası */
.grp-emoji-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grp-emoji-cat-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--grp-text-s, #94a3b8);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.grp-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 4px;
}

.grp-emoji-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.12s ease, background 0.12s ease;
}

.grp-emoji-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.25);
}

.grp-emoji-btn:active {
  transform: scale(0.95);
}

/* Çıkartma Izgarası */
.grp-stickers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
  padding: 4px 0;
}

.grp-sticker-item {
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.06));
  border-radius: 14px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 86px;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.grp-sticker-item:hover {
  transform: translateY(-3px) scale(1.05);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--grp-accent, var(--accent, #f97316));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.grp-sticker-thumb {
  width: 50px;
  height: 50px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.22));
}

.grp-sticker-title {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--grp-text-s, #94a3b8);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── 14. MOBİL TAM EKRAN SOHBET (INSTAGRAM/WHATSAPP TARZ) ── */

/* ── 14a. Mobil Sohbet Üst Barı (Mobile Chat Header) ── */
.grp-chat-mobile-header {
  display: none; /* Masaüstünde gizli */
}

@media (max-width: 768px) {
  /* Oda başlığı ve Masalar/Sıralama/Yoklama sekme çubuğunu mobilde tamamen gizle */
  body.chat-fullscreen-open .grp-room-header,
  body.chat-fullscreen-open .grp-room-tabs {
    display: none !important;
  }

  /* Tam Ekran Sohbet Kabı — body.chat-fullscreen-open olduğunda devreye girer */
  body.chat-fullscreen-open .grp-chat-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    inset: 0 !important;
    z-index: 10000 !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    width: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--grp-card, var(--bg-card, #121217)) !important;
    overflow: hidden !important;
  }

  /* Tam ekran modunda mesaj alanı esnek genişler */
  body.chat-fullscreen-open .grp-chat-feed {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 12px 10px 8px 10px;
  }

  /* Input bar en alta yapışık */
  body.chat-fullscreen-open .grp-chat-input-row {
    flex-shrink: 0;
  }

  /* Sticker drawer tam ekranda da çalışır */
  body.chat-fullscreen-open .grp-sticker-drawer {
    flex-shrink: 0;
  }

  /* ── Mobil Sohbet Header Bar ── */
  .grp-chat-mobile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 10px 14px;
    padding-top: max(10px, env(safe-area-inset-top, 10px));
    background: var(--grp-card, var(--bg-card, #121217));
    border-bottom: 1px solid var(--grp-border, rgba(255,255,255,0.08));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    z-index: 2;
  }

  /* Geri Dön Butonu */
  .grp-chat-mobile-back {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--grp-card-inner, rgba(255,255,255,0.07));
    border: 1px solid var(--grp-border, rgba(255,255,255,0.1));
    color: var(--grp-text-p, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .grp-chat-mobile-back:active {
    transform: scale(0.92);
    background: rgba(255,255,255,0.12);
  }

  /* Grup İsmi ve Durum Alanı */
  .grp-chat-mobile-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
  }

  .grp-chat-mobile-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--grp-text-p, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    letter-spacing: -0.2px;
  }

  .grp-chat-mobile-status {
    font-size: 11.5px;
    color: var(--grp-text-s, rgba(255,255,255,0.55));
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
  }

  .grp-chat-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    flex-shrink: 0;
    animation: chatOnlinePulse 2s ease-in-out infinite;
  }

  @keyframes chatOnlinePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
  }

  /* Grup Avatar (Sağ Taraf) */
  .grp-chat-mobile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--grp-card-inner, rgba(255,255,255,0.08));
    border: 2px solid var(--grp-accent, var(--accent, #f97316));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s ease;
    overflow: hidden;
  }

  .grp-chat-mobile-avatar:active {
    transform: scale(0.92);
  }

  /* Mesaj Balonu mobil ince ayar */
  .grp-chat-msg {
    max-width: 88%;
  }

  .grp-chat-bubble {
    padding: 8px 12px;
    font-size: 13px;
  }

  .grp-chat-text {
    font-size: 13.5px;
  }

  /* Input Bar mobil — minimum 16px (iOS zoom önleme) */
  .grp-chat-input-row {
    padding: 8px 10px;
    gap: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
  }

  .grp-chat-input {
    padding: 10px 14px;
    font-size: 16px !important; /* iOS otomatik zoom önleme — kritik! */
    border-radius: 24px;
    min-height: 42px;
  }

  .grp-chat-btn-icon,
  .grp-chat-send-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  /* Sticker drawer mobilde klavyenin üstüne yumuşak kayar */
  .grp-sticker-drawer {
    height: 240px;
  }

  /* Mobilde taşmayı önlemek için eski küçük hover aksiyon barını gizle, yerine alt action sheet kullanılır */
  .grp-chat-actions {
    display: none !important;
  }
}

/* ── Normal mobil düzen (tam ekran modu değilken) ── */
@media (max-width: 768px) {
  body:not(.chat-fullscreen-open) .grp-chat-wrap {
    height: calc(100dvh - 205px);
    min-height: 460px;
    max-height: calc(100dvh - 170px);
    border-radius: 18px;
    box-shadow: none;
    margin: 0;
  }

  body:not(.chat-fullscreen-open) .grp-chat-mobile-header {
    display: none;
  }
}

@media (max-width: 480px) {
  body:not(.chat-fullscreen-open) .grp-chat-wrap {
    height: calc(100dvh - 195px);
    min-height: 440px;
  }

  .grp-chat-msg {
    max-width: 90%;
  }

  .grp-chat-avatar {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .grp-chat-sticker-img {
    width: 90px;
    height: 90px;
  }
}

/* ── 15. TEMA BAZLI ÖZEL BALON VE KONTRAST AYARLARI ── */

/* AÇIK TEMA (LIGHT & LITEWHITE) */
body.theme-light .grp-chat-bubble,
body.light-theme .grp-chat-bubble,
[data-theme="light"] .grp-chat-bubble,
[data-theme="litewhite"] .grp-chat-bubble {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

body.theme-light .grp-chat-msg.is-mine .grp-chat-bubble,
body.light-theme .grp-chat-msg.is-mine .grp-chat-bubble,
[data-theme="light"] .grp-chat-msg.is-mine .grp-chat-bubble,
[data-theme="litewhite"] .grp-chat-msg.is-mine .grp-chat-bubble {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
}

body.theme-light .grp-chat-reply-preview,
body.light-theme .grp-chat-reply-preview,
[data-theme="light"] .grp-chat-reply-preview,
body.theme-litewhite .grp-chat-reply-preview,
body.litewhite-theme .grp-chat-reply-preview,
[data-theme="litewhite"] .grp-chat-reply-preview {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}

/* PEMBE TEMA (PINK) */
body.theme-pink .grp-chat-bubble,
body.pink-theme .grp-chat-bubble,
[data-theme="pink"] .grp-chat-bubble {
  background: #fff5f7;
  border-color: rgba(244, 63, 94, 0.16);
  color: #4c2f35;
}

body.theme-pink .grp-chat-msg.is-mine .grp-chat-bubble,
body.pink-theme .grp-chat-msg.is-mine .grp-chat-bubble,
[data-theme="pink"] .grp-chat-msg.is-mine .grp-chat-bubble {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
}

body.theme-pink .grp-chat-reply-preview,
body.pink-theme .grp-chat-reply-preview,
[data-theme="pink"] .grp-chat-reply-preview {
  background: rgba(244, 63, 94, 0.08);
}

/* AERO TEMA */
body.theme-aero .grp-chat-bubble,
body.aero-theme .grp-chat-bubble,
[data-theme="aero"] .grp-chat-bubble {
  background: rgba(0, 168, 255, 0.08);
  border-color: rgba(0, 168, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

body.theme-aero .grp-chat-msg.is-mine .grp-chat-bubble,
body.aero-theme .grp-chat-msg.is-mine .grp-chat-bubble,
[data-theme="aero"] .grp-chat-msg.is-mine .grp-chat-bubble {
  background: linear-gradient(135deg, #00a8ff 0%, #0284c7 100%);
  color: #ffffff;
}

/* MOR TEMA (PURPLE) */
body.theme-purple .grp-chat-bubble,
body.purple-theme .grp-chat-bubble,
[data-theme="purple"] .grp-chat-bubble {
  background: rgba(139, 92, 246, 0.09);
  border-color: rgba(139, 92, 246, 0.22);
  color: #ffffff;
}

body.theme-purple .grp-chat-msg.is-mine .grp-chat-bubble,
body.purple-theme .grp-chat-msg.is-mine .grp-chat-bubble,
[data-theme="purple"] .grp-chat-msg.is-mine .grp-chat-bubble {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #ffffff;
}

/* MONO TEMA */
body.theme-mono .grp-chat-bubble,
body.mono-theme .grp-chat-bubble,
[data-theme="mono"] .grp-chat-bubble {
  background: #111111;
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-radius: 12px 12px 12px 2px;
}

body.theme-mono .grp-chat-msg.is-mine .grp-chat-bubble,
body.mono-theme .grp-chat-msg.is-mine .grp-chat-bubble,
[data-theme="mono"] .grp-chat-msg.is-mine .grp-chat-bubble {
  background: #ffffff;
  border-color: transparent;
  color: #000000;
  border-radius: 12px 12px 2px 12px;
}

body.theme-mono .grp-chat-send-btn,
body.mono-theme .grp-chat-send-btn,
[data-theme="mono"] .grp-chat-send-btn {
  background: #ffffff;
  color: #000000;
}

/* ═════════════════════════════════════════════════════════════
   16. ÖZEL MOBİL AKSİYON SAYFASI (ACTION SHEET) & PORTAL
   ═════════════════════════════════════════════════════════════ */

#grp-chat-action-portal {
  position: relative;
  z-index: 50000;
}

.grp-action-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.grp-action-sheet-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.grp-action-sheet {
  background: var(--grp-card, var(--bg-card, #16161f));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.12));
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 12px 16px max(18px, env(safe-area-inset-bottom, 18px)) 16px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  box-sizing: border-box;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.55);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grp-action-sheet-backdrop.is-active .grp-action-sheet {
  transform: translateY(0);
}

/* Çekme Göstergesi (Drag Handle) */
.grp-sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 auto 2px auto;
}

/* Mesaj Önizleme Başlığı */
.grp-sheet-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  padding: 8px 12px;
}

.grp-sheet-preview-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grp-card, rgba(255, 255, 255, 0.08));
  overflow: hidden;
}

.grp-sheet-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.grp-sheet-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grp-sheet-preview-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--grp-accent, var(--accent, #f97316));
}

.grp-sheet-preview-time {
  font-size: 10px;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.5));
  font-family: var(--grp-font-mono, monospace);
}

.grp-sheet-preview-text {
  font-size: 12.5px;
  color: var(--grp-text-p, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.9;
}

/* Hızlı Emoji Reaksiyon Barı */
.grp-sheet-reactions {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  padding: 6px 8px;
}

.grp-sheet-reaction-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.grp-sheet-reaction-btn:active {
  transform: scale(1.35);
  background: rgba(255, 255, 255, 0.12);
}

/* Aksiyon Listesi */
.grp-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grp-sheet-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  color: var(--grp-text-p, #ffffff);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, transform 0.1s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.grp-sheet-btn:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.99);
}

.grp-sheet-btn-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  flex-shrink: 0;
}

.grp-sheet-btn-danger {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
  background: rgba(239, 68, 68, 0.06) !important;
}

.grp-sheet-btn-danger:active {
  background: rgba(239, 68, 68, 0.15) !important;
}

.grp-sheet-cancel-btn {
  margin-top: 2px;
  text-align: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.1));
  color: var(--grp-text-s, rgba(255, 255, 255, 0.6));
  font-weight: 500;
}

.grp-sheet-cancel-btn:active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--grp-text-p, #ffffff);
}

/* ═════════════════════════════════════════════════════════════
   17. MASAÜSTÜ SMART POPOVER MENÜ (BOUNDING CLIENT RECT PLACED)
   ═════════════════════════════════════════════════════════════ */

.grp-chat-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50000;
  background: transparent;
}

.grp-chat-popover-menu {
  position: fixed;
  z-index: 50001;
  background: var(--grp-card, var(--bg-card, #1a1a26));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.14));
  border-radius: 16px;
  padding: 6px;
  min-width: 190px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: grpPopoverPop 0.16s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: top left;
  user-select: none;
}

.grp-chat-popover-menu.dropup {
  transform-origin: bottom left;
}

@keyframes grpPopoverPop {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.grp-popover-quick-reactions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 8px 6px;
  border-bottom: 1px solid var(--grp-border, rgba(255, 255, 255, 0.08));
  margin-bottom: 4px;
}

.grp-popover-quick-reactions button {
  background: transparent;
  border: none;
  font-size: 17px;
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 6px;
  transition: transform 0.12s ease, background 0.12s ease;
}

.grp-popover-quick-reactions button:hover {
  transform: scale(1.25);
  background: rgba(255, 255, 255, 0.1);
}

.grp-popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--grp-text-p, #e2e8f0);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.12s ease, color 0.12s ease;
}

.grp-popover-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.grp-popover-item.danger {
  color: #ef4444;
}

.grp-popover-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.grp-popover-icon {
  font-size: 14px;
  width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

/* ═════════════════════════════════════════════════════════════
   18. TEMALARA GÖRE ACTION SHEET & POPOVER UYARLAMALARI
   ═════════════════════════════════════════════════════════════ */

/* Light / Litewhite */
body.theme-light .grp-action-sheet,
body.light-theme .grp-action-sheet,
[data-theme="light"] .grp-action-sheet,
[data-theme="litewhite"] .grp-action-sheet,
body.theme-light .grp-chat-popover-menu,
body.light-theme .grp-chat-popover-menu,
[data-theme="light"] .grp-chat-popover-menu,
[data-theme="litewhite"] .grp-chat-popover-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

body.theme-light .grp-sheet-handle,
body.light-theme .grp-sheet-handle,
[data-theme="light"] .grp-sheet-handle,
[data-theme="litewhite"] .grp-sheet-handle {
  background: rgba(0, 0, 0, 0.2);
}

body.theme-light .grp-sheet-btn,
body.light-theme .grp-sheet-btn,
[data-theme="light"] .grp-sheet-btn,
[data-theme="litewhite"] .grp-sheet-btn,
body.theme-light .grp-sheet-preview,
body.light-theme .grp-sheet-preview,
[data-theme="light"] .grp-sheet-preview,
[data-theme="litewhite"] .grp-sheet-preview,
body.theme-light .grp-sheet-reactions,
body.light-theme .grp-sheet-reactions,
[data-theme="light"] .grp-sheet-reactions,
[data-theme="litewhite"] .grp-sheet-reactions {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

body.theme-light .grp-sheet-preview-text,
body.light-theme .grp-sheet-preview-text,
[data-theme="light"] .grp-sheet-preview-text,
[data-theme="litewhite"] .grp-sheet-preview-text {
  color: #1e293b;
}

body.theme-light .grp-popover-item,
body.light-theme .grp-popover-item,
[data-theme="light"] .grp-popover-item,
[data-theme="litewhite"] .grp-popover-item {
  color: #0f172a;
}

body.theme-light .grp-popover-item:hover,
body.light-theme .grp-popover-item:hover,
[data-theme="light"] .grp-popover-item:hover,
[data-theme="litewhite"] .grp-popover-item:hover {
  background: #f1f5f9;
}

/* Pink */
body.theme-pink .grp-action-sheet,
body.pink-theme .grp-action-sheet,
[data-theme="pink"] .grp-action-sheet,
body.theme-pink .grp-chat-popover-menu,
body.pink-theme .grp-chat-popover-menu,
[data-theme="pink"] .grp-chat-popover-menu {
  background: #fff5f7;
  border-color: rgba(244, 63, 94, 0.2);
  color: #4c2f35;
}

body.theme-pink .grp-sheet-btn,
body.pink-theme .grp-sheet-btn,
[data-theme="pink"] .grp-sheet-btn,
body.theme-pink .grp-sheet-preview,
body.pink-theme .grp-sheet-preview,
[data-theme="pink"] .grp-sheet-preview,
body.theme-pink .grp-sheet-reactions,
body.pink-theme .grp-sheet-reactions,
[data-theme="pink"] .grp-sheet-reactions {
  background: #ffffff;
  border-color: rgba(244, 63, 94, 0.12);
  color: #4c2f35;
}

body.theme-pink .grp-sheet-preview-text,
body.pink-theme .grp-sheet-preview-text,
[data-theme="pink"] .grp-sheet-preview-text {
  color: #4c2f35;
}

body.theme-pink .grp-popover-item,
body.pink-theme .grp-popover-item,
[data-theme="pink"] .grp-popover-item {
  color: #4c2f35;
}

body.theme-pink .grp-popover-item:hover,
body.pink-theme .grp-popover-item:hover,
[data-theme="pink"] .grp-popover-item:hover {
  background: rgba(244, 63, 94, 0.08);
}

/* Aero */
body.theme-aero .grp-action-sheet,
body.aero-theme .grp-action-sheet,
[data-theme="aero"] .grp-action-sheet,
body.theme-aero .grp-chat-popover-menu,
body.aero-theme .grp-chat-popover-menu,
[data-theme="aero"] .grp-chat-popover-menu {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(0, 168, 255, 0.25);
  box-shadow: 0 -10px 40px rgba(0, 168, 255, 0.15);
}

/* Purple */
body.theme-purple .grp-action-sheet,
body.purple-theme .grp-action-sheet,
[data-theme="purple"] .grp-action-sheet,
body.theme-purple .grp-chat-popover-menu,
body.purple-theme .grp-chat-popover-menu,
[data-theme="purple"] .grp-chat-popover-menu {
  background: #181528;
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 -10px 40px rgba(139, 92, 246, 0.15);
}

/* Mono */
body.theme-mono .grp-action-sheet,
body.mono-theme .grp-action-sheet,
[data-theme="mono"] .grp-action-sheet,
body.theme-mono .grp-chat-popover-menu,
body.mono-theme .grp-chat-popover-menu,
[data-theme="mono"] .grp-chat-popover-menu {
  background: #000000;
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 0;
}

/* ═════════════════════════════════════════════════════════════
   19. "@" KİŞİ ETİKETLEME (MENTION AUTOCOMPLETE) & VURGU
   ═════════════════════════════════════════════════════════════ */

/* Mention Dropdown Popup */
.grp-mention-dropdown {
  position: absolute;
  bottom: 58px;
  left: 12px;
  right: 12px;
  max-width: 440px;
  margin: 0 auto;
  max-height: 220px;
  background: var(--grp-card, var(--bg-card, #1a1a26));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.14));
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: grpMentionPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-sizing: border-box;
}

@keyframes grpMentionPop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.grp-mention-dropdown-header {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--grp-accent, var(--accent, #f97316));
  padding: 6px 10px 4px 10px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grp-mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--grp-text-p, #ffffff);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.12s ease, transform 0.1s ease;
  user-select: none;
  box-sizing: border-box;
}

.grp-mention-item:hover,
.grp-mention-item.active {
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.1));
}

.grp-mention-item.active {
  outline: 1.5px solid var(--grp-accent, var(--accent, #f97316));
}

.grp-mention-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 13px;
}

.grp-mention-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.grp-mention-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--grp-text-p, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grp-mention-username {
  font-size: 11px;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.55));
  font-family: var(--grp-font-mono, monospace);
}

.grp-mention-role-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--grp-text-s, rgba(255, 255, 255, 0.7));
  flex-shrink: 0;
}

.grp-mention-role-tag.owner {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.grp-mention-role-tag.mod {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.grp-mention-empty {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.5));
}

/* Mesaj İçindeki "@" Vurgusu (Mention Chip) */
.grp-chat-mention {
  background: var(--accent-dim, rgba(249, 115, 22, 0.16));
  color: var(--grp-accent, var(--accent, #f97316));
  font-weight: 700;
  padding: 1px 6px;
  margin: 0 1px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  border: 1px solid rgba(249, 115, 22, 0.25);
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
  user-select: text !important;
  vertical-align: baseline;
}

.grp-chat-mention:hover {
  background: var(--accent-dim, rgba(249, 115, 22, 0.28));
  border-color: var(--grp-accent, var(--accent, #f97316));
  transform: translateY(-1px);
}

/* Kendi Gönderdiğim Mesajdaki Mention */
.grp-chat-msg.is-mine .grp-chat-mention {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.grp-chat-msg.is-mine .grp-chat-mention:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* Oturum Açan Kullanıcı Etiketlendiğinde Özel Dikkat Çekici Vurgu */
.grp-chat-mention.is-my-mention {
  background: #f59e0b !important;
  color: #000000 !important;
  font-weight: 800 !important;
  border-color: #d97706 !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.55);
}

.grp-chat-msg.has-my-mention .grp-chat-bubble {
  border-color: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

/* Temalara Göre Mention Dropdown Uyarlamaları */
body.theme-light .grp-mention-dropdown,
body.light-theme .grp-mention-dropdown,
[data-theme="light"] .grp-mention-dropdown,
[data-theme="litewhite"] .grp-mention-dropdown {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

body.theme-light .grp-mention-name,
body.light-theme .grp-mention-name,
[data-theme="light"] .grp-mention-name,
[data-theme="litewhite"] .grp-mention-name {
  color: #0f172a;
}

body.theme-light .grp-mention-username,
body.light-theme .grp-mention-username,
[data-theme="light"] .grp-mention-username,
[data-theme="litewhite"] .grp-mention-username {
  color: #64748b;
}

body.theme-light .grp-mention-item:hover,
body.light-theme .grp-mention-item:hover,
[data-theme="light"] .grp-mention-item:hover,
[data-theme="litewhite"] .grp-mention-item:hover,
body.theme-light .grp-mention-item.active,
body.light-theme .grp-mention-item.active,
[data-theme="light"] .grp-mention-item.active,
[data-theme="litewhite"] .grp-mention-item.active {
  background: #f1f5f9;
}

/* ═════════════════════════════════════════════════════════════
   20. "+" EKLENTİLER MENÜSÜ & ANKET (POLL) SİSTEMİ
   ═════════════════════════════════════════════════════════════ */

/* Attach (+) Button */
.grp-chat-attach-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.12));
  color: var(--grp-text-p, #ffffff);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.grp-chat-attach-btn:hover {
  background: var(--grp-accent, var(--accent, #f97316));
  color: #ffffff;
  transform: scale(1.06);
}

.grp-chat-attach-btn.is-active {
  background: var(--grp-accent, var(--accent, #f97316));
  color: #ffffff;
  transform: rotate(45deg);
}

/* Attachment Menu Popover */
.grp-chat-attach-menu {
  position: absolute;
  bottom: 58px;
  left: 10px;
  width: 270px;
  background: var(--grp-card, var(--bg-card, #1a1a26));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.15));
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: grpAttachPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: bottom left;
  box-sizing: border-box;
}

@keyframes grpAttachPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.grp-attach-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--grp-text-p, #ffffff);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
  user-select: none;
  box-sizing: border-box;
}

.grp-attach-item:hover {
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.1));
  transform: translateX(2px);
}

.grp-attach-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.grp-attach-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.grp-attach-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--grp-text-p, #ffffff);
}

.grp-attach-desc {
  font-size: 11px;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.55));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Bento Grid Anket Kartı (Poll Component) ── */
.grp-poll-card {
  width: 100%;
  max-width: 380px;
  background: var(--grp-card, var(--bg-card, #161622));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.12));
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  text-align: left;
}

.grp-chat-bubble.is-poll {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  max-width: 100% !important;
}

.grp-poll-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grp-poll-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.grp-poll-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--grp-accent, var(--accent, #f97316));
  background: var(--accent-dim, rgba(249, 115, 22, 0.14));
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.grp-poll-type-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.6));
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 6px;
}

.grp-poll-question {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--grp-text-p, #ffffff);
  line-height: 1.4;
  word-break: break-word;
}

/* Seçenekler Listesi */
.grp-poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grp-poll-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--grp-border, rgba(255, 255, 255, 0.1));
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.04));
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-sizing: border-box;
}

.grp-poll-option:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
}

.grp-poll-option.is-voted {
  border-color: var(--grp-accent, var(--accent, #f97316));
  background: var(--accent-dim, rgba(249, 115, 22, 0.12));
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.2);
}

/* Arka plan dolgu ilerleme çubuğu */
.grp-poll-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--accent-dim, rgba(249, 115, 22, 0.16));
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
  pointer-events: none;
}

.grp-poll-option.is-voted .grp-poll-bar-fill {
  background: var(--accent-dim, rgba(249, 115, 22, 0.28));
}

.grp-poll-opt-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.grp-poll-opt-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--grp-text-p, #ffffff);
  word-break: break-word;
}

.grp-poll-opt-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--grp-accent, var(--accent, #f97316));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.grp-poll-opt-stats {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.grp-poll-opt-percent {
  font-size: 13px;
  font-weight: 800;
  color: var(--grp-text-p, #ffffff);
  font-family: var(--grp-font-mono, monospace);
}

.grp-poll-opt-count {
  font-size: 10.5px;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.5));
}

/* Anket Alt Bilgisi (Footer) */
.grp-poll-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.55));
}

.grp-poll-total-votes {
  font-weight: 700;
  color: var(--grp-text-p, #ffffff);
}

/* Light Theme Uyumları */
body.theme-light .grp-chat-attach-menu,
body.light-theme .grp-chat-attach-menu,
[data-theme="light"] .grp-chat-attach-menu,
[data-theme="litewhite"] .grp-chat-attach-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

body.theme-light .grp-attach-item:hover,
body.light-theme .grp-attach-item:hover,
[data-theme="light"] .grp-attach-item:hover,
[data-theme="litewhite"] .grp-attach-item:hover {
  background: #f1f5f9;
}

body.theme-light .grp-attach-title,
body.light-theme .grp-attach-title,
[data-theme="light"] .grp-attach-title,
[data-theme="litewhite"] .grp-attach-title {
  color: #0f172a;
}

body.theme-light .grp-poll-card,
body.light-theme .grp-poll-card,
[data-theme="light"] .grp-poll-card,
[data-theme="litewhite"] .grp-poll-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.theme-light .grp-poll-question,
body.light-theme .grp-poll-question,
[data-theme="light"] .grp-poll-question,
[data-theme="litewhite"] .grp-poll-question,
body.theme-light .grp-poll-opt-text,
body.light-theme .grp-poll-opt-text,
[data-theme="light"] .grp-poll-opt-text,
[data-theme="litewhite"] .grp-poll-opt-text,
body.theme-light .grp-poll-opt-percent,
body.light-theme .grp-poll-opt-percent,
[data-theme="light"] .grp-poll-opt-percent,
[data-theme="litewhite"] .grp-poll-opt-percent {
  color: #0f172a;
}

body.theme-light .grp-poll-option,
body.light-theme .grp-poll-option,
[data-theme="light"] .grp-poll-option,
[data-theme="litewhite"] .grp-poll-option {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

/* ═════════════════════════════════════════════════════════════
   21. GIPHY GIF SEÇİCİ & ARAMA PANELİ (GIPHY PICKER MODAL)
   ═════════════════════════════════════════════════════════════ */

.giphy-modal-dialog {
  max-width: 480px;
  width: 100%;
  max-height: min(82vh, 620px);
  border-radius: 20px;
  background: var(--grp-card, var(--bg-card, #12141c));
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.14));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.giphy-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--grp-border, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.giphy-modal-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.giphy-powered-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.5));
}

.giphy-modal-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Medya Türü Seçimi (GIF'ler & Çıkartmalar) ── */
.giphy-type-tabs {
  display: flex;
  gap: 6px;
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.05));
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.1));
  flex-shrink: 0;
}

.giphy-type-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.6));
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.giphy-type-tab:hover {
  color: var(--grp-text-p, #ffffff);
  background: rgba(255, 255, 255, 0.06);
}

.giphy-type-tab.active {
  background: var(--grp-card, var(--bg-card, #1c1d28));
  color: var(--grp-text-p, #ffffff);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

body.theme-light .giphy-type-tab.active,
body.light-theme .giphy-type-tab.active,
[data-theme="light"] .giphy-type-tab.active,
[data-theme="litewhite"] .giphy-type-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ── Arama Girdisi & İkonu ── */
.giphy-search-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.giphy-search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.giphy-search-icon {
  position: absolute;
  left: 14px;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.5));
  pointer-events: none;
}

.giphy-search-input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 40px;
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.06));
  border: 1.5px solid var(--grp-border, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  color: var(--grp-text-p, #ffffff);
  font-size: 13.5px;
  font-weight: 500;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.giphy-search-input:focus {
  border-color: var(--grp-accent, var(--accent, #a855f7));
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px var(--grp-accent-glow, rgba(168, 85, 247, 0.2));
}

.giphy-search-input::placeholder {
  color: var(--grp-text-s, rgba(255, 255, 255, 0.45));
}

.giphy-search-clear-btn {
  position: absolute;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: var(--grp-text-p, #ffffff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.15s ease;
}

.giphy-search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

/* ── Hızlı Kategori Çipleri (Pills) ── */
.giphy-categories-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.giphy-categories-row::-webkit-scrollbar {
  display: none;
}

.giphy-cat-chip {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--grp-border, rgba(255, 255, 255, 0.12));
  background: var(--grp-card-inner, rgba(255, 255, 255, 0.05));
  color: var(--grp-text-s, rgba(255, 255, 255, 0.7));
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  flex-shrink: 0;
}

.giphy-cat-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--grp-text-p, #ffffff);
  transform: translateY(-1px);
}

.giphy-cat-chip.active {
  background: var(--grp-accent, var(--accent, #a855f7));
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 10px var(--grp-accent-glow, rgba(168, 85, 247, 0.35));
}

/* ── 2 Sütunlu Responsive GIF & Sticker Sonuçları Izgarası ── */
.giphy-results-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  grid-auto-rows: 130px !important;
  gap: 10px !important;
  flex: 1;
  min-height: 240px;
  max-height: 58vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 6px 16px 2px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: var(--grp-border, rgba(255, 255, 255, 0.15)) transparent;
  box-sizing: border-box;
}

.giphy-results-grid::-webkit-scrollbar {
  width: 5px;
}

.giphy-results-grid::-webkit-scrollbar-thumb {
  background: var(--grp-border, rgba(255, 255, 255, 0.2));
  border-radius: 4px;
}

/* GIF / Sticker Kartı (Üst üste binmeyi önleyen sabit yükseklik & izolasyon) */
.giphy-card {
  position: relative !important;
  width: 100% !important;
  height: 130px !important;
  min-height: 130px !important;
  max-height: 130px !important;
  border-radius: 12px;
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  flex-shrink: 0;
}

.giphy-card:hover,
.giphy-card:focus-visible {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--grp-accent, var(--accent, #a855f7));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.giphy-card:active {
  transform: scale(0.97);
}

.giphy-card-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.giphy-card.is-loaded .giphy-card-thumb {
  opacity: 1;
}

/* Çıkartma (Sticker) Kartı */
.giphy-card.is-sticker-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
}

.giphy-card.is-sticker-card .giphy-card-thumb {
  object-fit: contain !important;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

/* Hover Overlay & Gönder Butonu */
.giphy-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.giphy-card:hover .giphy-card-overlay,
.giphy-card:focus-visible .giphy-card-overlay {
  opacity: 1;
}

.giphy-send-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--grp-accent, var(--accent, #a855f7));
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transform: translateY(4px);
  transition: transform 0.2s ease;
}

.giphy-card:hover .giphy-send-badge {
  transform: translateY(0);
}

/* Skeleton Yükleniyor Parıltısı */
.giphy-card-skeleton {
  position: relative !important;
  width: 100% !important;
  height: 130px !important;
  min-height: 130px !important;
  max-height: 130px !important;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.giphy-skeleton-shimmer {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: giphyShimmer 1.4s infinite;
}

@keyframes giphyShimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Boş ve Hata Durumları */
.giphy-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  text-align: center;
}

.giphy-empty-icon {
  font-size: 36px;
  margin-bottom: 8px;
  opacity: 0.8;
}

.giphy-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--grp-text-p, #ffffff);
  margin-bottom: 4px;
}

.giphy-empty-desc {
  font-size: 12.5px;
  color: var(--grp-text-s, rgba(255, 255, 255, 0.55));
  max-width: 280px;
  margin: 0;
  line-height: 1.45;
}

/* ═════════════════════════════════════════════════════════════
   22. THEME STUDIO & AÇIK/ÖZEL TEMA ENTEGRASYONLARI (GIPHY)
   ═════════════════════════════════════════════════════════════ */

body.theme-light .giphy-modal-dialog,
body.light-theme .giphy-modal-dialog,
[data-theme="light"] .giphy-modal-dialog,
body.litewhite-theme .giphy-modal-dialog,
body.theme-litewhite .giphy-modal-dialog,
[data-theme="litewhite"] .giphy-modal-dialog {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

body.theme-light .giphy-modal-header,
body.light-theme .giphy-modal-header,
[data-theme="light"] .giphy-modal-header,
body.litewhite-theme .giphy-modal-header,
body.theme-litewhite .giphy-modal-header,
[data-theme="litewhite"] .giphy-modal-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  background: #f8fafc;
}

body.theme-light .giphy-search-input,
body.light-theme .giphy-search-input,
[data-theme="light"] .giphy-search-input,
body.litewhite-theme .giphy-search-input,
body.theme-litewhite .giphy-search-input,
[data-theme="litewhite"] .giphy-search-input {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}

body.theme-light .giphy-search-input::placeholder,
body.light-theme .giphy-search-input::placeholder,
[data-theme="light"] .giphy-search-input::placeholder,
body.litewhite-theme .giphy-search-input::placeholder,
body.theme-litewhite .giphy-search-input::placeholder,
[data-theme="litewhite"] .giphy-search-input::placeholder {
  color: #64748b;
}

body.theme-light .giphy-search-clear-btn,
body.light-theme .giphy-search-clear-btn,
[data-theme="light"] .giphy-search-clear-btn,
body.litewhite-theme .giphy-search-clear-btn,
body.theme-litewhite .giphy-search-clear-btn,
[data-theme="litewhite"] .giphy-search-clear-btn {
  background: #e2e8f0;
  color: #475569;
}

body.theme-light .giphy-cat-chip,
body.light-theme .giphy-cat-chip,
[data-theme="light"] .giphy-cat-chip,
body.litewhite-theme .giphy-cat-chip,
body.theme-litewhite .giphy-cat-chip,
[data-theme="litewhite"] .giphy-cat-chip {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

body.theme-light .giphy-cat-chip:hover,
body.light-theme .giphy-cat-chip:hover,
[data-theme="light"] .giphy-cat-chip:hover,
body.litewhite-theme .giphy-cat-chip:hover,
body.theme-litewhite .giphy-cat-chip:hover,
[data-theme="litewhite"] .giphy-cat-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.theme-light .giphy-card,
body.light-theme .giphy-card,
[data-theme="light"] .giphy-card,
body.litewhite-theme .giphy-card,
body.theme-litewhite .giphy-card,
[data-theme="litewhite"] .giphy-card {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body.theme-light .giphy-card-skeleton,
body.light-theme .giphy-card-skeleton,
[data-theme="light"] .giphy-card-skeleton,
body.litewhite-theme .giphy-card-skeleton,
body.theme-litewhite .giphy-card-skeleton,
[data-theme="litewhite"] .giphy-card-skeleton {
  background: #e2e8f0;
}

body.theme-light .giphy-empty-title,
body.light-theme .giphy-empty-title,
[data-theme="light"] .giphy-empty-title,
body.litewhite-theme .giphy-empty-title,
body.theme-litewhite .giphy-empty-title,
[data-theme="litewhite"] .giphy-empty-title {
  color: #0f172a;
}

body.theme-light .giphy-empty-desc,
body.light-theme .giphy-empty-desc,
[data-theme="light"] .giphy-empty-desc,
body.litewhite-theme .giphy-empty-desc,
body.theme-litewhite .giphy-empty-desc,
[data-theme="litewhite"] .giphy-empty-desc {
  color: #64748b;
}

/* Mobil Ekran Uyumları (Responsive Bottom Sheet & Grid) */
@media (max-width: 640px) {
  .giphy-modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88dvh !important;
    height: 88dvh !important;
    border-radius: 20px 20px 0 0 !important;
    margin: auto 0 0 0 !important;
  }
  
  .giphy-modal-body {
    padding: 10px 12px 18px !important;
    flex: 1;
    overflow: hidden;
  }

  .giphy-results-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: 115px !important;
    gap: 8px !important;
    max-height: calc(88dvh - 160px) !important;
    padding-bottom: 24px !important;
  }

  .giphy-card,
  .giphy-card-skeleton {
    height: 115px !important;
    min-height: 115px !important;
    max-height: 115px !important;
  }

  .chat-gif {
    max-width: 200px;
  }
}




