/* ==========================================================================
   Aniseus 24 Saatlik Geçici Mesajlaşma (DM) Stilleri
   ========================================================================== */

.dm-page-container {
  max-width: 1100px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

.dm-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  background: var(--color-surface-card, #121017);
  border: 1px solid var(--color-border, #26242e);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  min-height: 600px;
  max-height: 750px;
}

/* Sol Kenar Paneli */
.dm-sidebar {
  background: rgba(14, 13, 19, 0.95);
  border-right: 1px solid var(--color-border, #26242e);
  display: flex;
  flex-direction: column;
}

.dm-sidebar__header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border, #26242e);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dm-sidebar__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dm-sidebar__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dm-ephemeral-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffd57e;
  background: rgba(255, 200, 87, 0.15);
  border: 1px solid rgba(255, 200, 87, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dm-sidebar__subtitle {
  font-size: 0.76rem;
  color: var(--color-text-dim, #888);
  margin: 0;
}

.dm-conversations-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dm-conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
  position: relative;
}

.dm-conv-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dm-conv-item.is-active {
  background: rgba(255, 77, 61, 0.12);
  border: 1px solid rgba(255, 77, 61, 0.3);
}

.dm-conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.dm-conv-info {
  flex: 1;
  min-width: 0;
}

.dm-conv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.dm-conv-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-conv-time {
  font-size: 0.7rem;
  color: var(--color-text-dim, #777);
  flex-shrink: 0;
}

.dm-conv-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dm-conv-snippet {
  font-size: 0.78rem;
  color: var(--color-text-dim, #888);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-unread-badge {
  background: var(--color-primary, #ff4d3d);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}

/* Sağ Sohbet Alanı */
.dm-chat {
  display: flex;
  flex-direction: column;
  background: #0d0c12;
  position: relative;
}

.dm-chat__header {
  padding: 14px 20px;
  background: rgba(18, 16, 23, 0.85);
  border-bottom: 1px solid var(--color-border, #26242e);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dm-chat__partner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dm-chat__partner-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dm-chat__partner-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dm-chat__partner-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.dm-chat__partner-rank {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.dm-chat__partner-user {
  font-size: 0.76rem;
  color: var(--color-text-dim, #888);
  font-family: var(--font-mono, monospace);
}

.dm-notice-banner {
  background: rgba(255, 200, 87, 0.08);
  border-bottom: 1px solid rgba(255, 200, 87, 0.2);
  padding: 8px 16px;
  font-size: 0.76rem;
  color: #ffd57e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dm-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dm-message-row {
  display: flex;
  flex-direction: column;
  max-width: 72%;
}

.dm-message-row--me {
  align-self: flex-end;
  align-items: flex-end;
}

.dm-message-row--other {
  align-self: flex-start;
  align-items: flex-start;
}

.dm-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
  position: relative;
}

.dm-message-row--me .dm-bubble {
  background: linear-gradient(135deg, #ff4d3d 0%, #d83526 100%);
  color: #ffffff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 14px rgba(255, 77, 61, 0.25);
}

.dm-message-row--other .dm-bubble {
  background: #1b1924;
  color: #f1f1f1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 3px;
}

.dm-bubble__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.68rem;
  opacity: 0.65;
}

.dm-input-bar {
  padding: 14px 20px;
  background: rgba(18, 16, 23, 0.95);
  border-top: 1px solid var(--color-border, #26242e);
}

.dm-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dm-textarea {
  flex: 1;
  background: #15141d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.88rem;
  font-family: inherit;
  resize: none;
  min-height: 42px;
  max-height: 100px;
  outline: none;
  transition: border-color 0.2s ease;
}

.dm-textarea:focus {
  border-color: var(--color-primary, #ff4d3d);
}

.dm-send-btn {
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--color-primary, #ff4d3d);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.dm-send-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.dm-chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  gap: 14px;
}

.dm-chat-empty__icon {
  font-size: 3rem;
  margin-bottom: 4px;
}

.dm-chat-empty__title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.dm-chat-empty__desc {
  max-width: 420px;
  font-size: 0.88rem;
  color: var(--color-text-dim, #888);
  line-height: 1.5;
  margin: 0;
}

/* Header DM butonu ve rozeti */
.nav-dm-btn {
  position: relative;
}

.nav-dm-badge {
  position: absolute;
  top: -2px;
  right: -3px;
  background: #ff4d3d;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 8px rgba(255, 77, 61, 0.6);
}

@media (max-width: 768px) {
  .dm-layout {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .dm-sidebar {
    display: block;
    max-height: 240px;
  }
  .dm-layout.has-active-partner .dm-sidebar {
    display: none;
  }
}
