/* Sohbet — kurumsal / alıcı-satıcı yazışma (aşamalı ürün) */
.view-sohbet {
  flex-direction: column;
  min-height: 100%;
  width: 100%;
  background: var(--bg);
}

.sohbet-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem var(--page-gutter, 1.25rem);
  flex: 1;
}

.sohbet-hero {
  background: var(--surface);
  border-radius: var(--radius-sm, 8px);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  margin-bottom: 1.5rem;
}

.sohbet-hero h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  color: var(--accent);
}

.sohbet-hero p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: var(--text-sm);
}

.sohbet-placeholder {
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px dashed rgba(var(--accent-rgb), 0.25);
  border-radius: var(--radius-sm, 8px);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.sohbet-placeholder strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.5rem;
}

.sohbet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: center;
}

.sohbet-actions .btn {
  text-decoration: none;
}

.sohbet-context-banner {
  margin: 0 var(--page-gutter, 1.25rem) 0.75rem;
  padding: 0.65rem 1rem;
  font-size: var(--text-sm);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: var(--radius-sm);
  max-width: 960px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
}

.sohbet-context-banner-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-xs);
}

.sohbet-context-banner-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.sohbet-top-header + .sohbet-context-banner {
  margin-top: -0.25rem;
}

.sohbet-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0  var(--page-gutter, 1.25rem) 1rem;
  max-width: 1200px;
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.94), rgba(10, 12, 16, 0.72));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(4px);
}

.sohbet-panels {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 1rem;
  padding: 0 var(--page-gutter, 1.25rem) 2rem;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
  min-height: 320px;
  align-items: stretch;
}

@media (max-width: 720px) {
  .sohbet-toolbar .btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 10rem;
  }

  .sohbet-panels {
    grid-template-columns: 1fr;
  }

  .sohbet-msg {
    max-width: 92%;
  }

  .sohbet-thread {
    max-height: none;
    min-height: 26rem;
  }
}

.sohbet-rooms {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  max-height: 72vh;
  overflow: auto;
}

.sohbet-aside-title {
  margin: 0 0 0.5rem 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
}

.sohbet-rooms-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sohbet-room-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: var(--text-sm);
}

.sohbet-room-row:hover {
  background: rgba(var(--accent-rgb), 0.1);
}

.sohbet-room-row--active {
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35);
}

.sohbet-room-title {
  font-weight: 600;
  color: var(--accent);
}

.sohbet-room-preview {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.3;
}

.sohbet-thread {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  min-height: 360px;
  max-height: 78vh;
}

.sohbet-thread-header {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
}

.sohbet-thread-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  align-items: center;
}

.sohbet-search-input {
  flex: 1;
  min-width: 140px;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.15);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
}

.sohbet-search-hits {
  padding: 0.35rem 1rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  max-height: 8rem;
  overflow-y: auto;
}

.sohbet-search-hits-title {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.sohbet-search-hit {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 0.25rem;
  padding: 0.5rem 0.6rem;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.sohbet-search-hit:hover {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text-primary);
}

.sohbet-search-empty {
  font-size: var(--text-sm);
}

.sohbet-typing-line {
  min-height: 1.5rem;
  padding: 0.2rem 1rem;
  font-size: var(--text-xs);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Yazıyor animasyonu — 3 nokta */
.sohbet-typing-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.sohbet-typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: sohbet-dot-bounce 1.2s infinite ease-in-out;
}

.sohbet-typing-dot:nth-child(1) { animation-delay: 0s; }
.sohbet-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.sohbet-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes sohbet-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.sohbet-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sohbet-msg {
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  max-width: 82%;
  border: 1px solid transparent;
}

/* Kendi mesajlarım — sağda, accent arkaplan */
.sohbet-msg--self {
  align-self: flex-end;
  background: rgba(var(--accent-rgb), 0.15);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

/* Karşı taraf mesajları — solda, surface arkaplan */
.sohbet-msg--other {
  align-self: flex-start;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.sohbet-msg-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.sohbet-msg-meta-main {
  flex: 1;
  min-width: 0;
}

.sohbet-read-tick {
  color: var(--accent);
  font-weight: 600;
  margin-left: 0.15rem;
}

.sohbet-msg-report {
  flex-shrink: 0;
  padding: 0.1rem 0.35rem;
  font-size: var(--text-2xs);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sohbet-msg-report:hover {
  color: var(--text-primary);
}

.sohbet-msg-body {
  font-size: var(--text-sm);
  line-height: 1.52;
  white-space: pre-wrap;
  word-break: break-word;
}

.sohbet-msg-attachment {
  margin-top: 0.4rem;
  font-size: var(--text-sm);
}

.sohbet-msg-attachment a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sohbet-composer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  align-items: stretch;
  background: rgba(255, 255, 255, 0.01);
}

.sohbet-composer-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sohbet-input--narrow {
  flex: 1;
  min-width: 140px;
  min-height: 2rem;
  resize: none;
}

.sohbet-composer .btn-primary {
  align-self: flex-end;
}

.sohbet-input {
  flex: 1;
  width: 100%;
  min-height: 2.5rem;
  resize: vertical;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
}

.sohbet-layout {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  width: 100%;
  background: var(--bg);
}
