/**
 * Ortak kullanıcı yorum alanı — maç detay, haber detay vb.
 * match-detail.css içinden @import edilir; haber sayfası doğrudan yükler.
 */

.match-user-comments-block {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(20, 22, 28, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.match-user-comment-login {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.match-user-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.match-user-comment-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

.match-user-comment-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-user-comment-avatar-initial {
  display: block;
}

.match-user-comment-login-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  gap: 2px;
}

.match-user-comment-login-text strong {
  font-size: 0.95rem;
}

.match-user-comment-login-text span {
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  font-size: 0.8rem;
}

.match-user-comment-login-text span:empty {
  display: none;
}

.match-user-comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.match-user-comment-input {
  width: 100%;
  min-height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #e2e8f0);
  padding: 14px 16px;
  resize: vertical;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.match-user-comment-input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.match-user-comment-submit {
  align-self: flex-end;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.match-user-comment-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.match-user-comment-list {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-user-comment-item {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
  transition: background 0.2s, border-color 0.2s;
}

.match-user-comment-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.match-user-comment-item-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  min-height: 36px;
  padding-right: min(46%, 200px);
  padding-bottom: 40px; /* absolute tepki satırı metinle çakışmasın */
}

.match-user-comment-head-main {
  flex: 1;
  min-width: 0;
}

.match-user-comment-author {
  font-size: 0.9rem;
  color: var(--text-primary, #e2e8f0);
}

/* Sağ üst: tarih; altında tepkiler (absolute, sağa hizalı) */
.match-user-comment-head-aside {
  position: absolute;
  right: 0;
  top: 0;
  max-width: 46%;
  text-align: right;
  z-index: 2;
}

.match-user-comment-time {
  display: block;
  margin: 0;
  color: var(--text-muted, rgba(255, 255, 255, 0.45));
  font-size: 0.75rem;
  white-space: nowrap;
}

.match-user-comment-text {
  margin: 0;
  color: var(--text-primary, #e2e8f0);
  font-size: 0.9rem;
  line-height: 1.5;
  clear: both;
}

.match-user-comment-reactions {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  width: max-content;
  max-width: min(100vw, 280px);
  margin-left: auto;
  padding: 0;
  border-top: none;
}

.match-comment-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.match-comment-reaction-btn img {
  display: block;
}

.match-comment-reaction-count {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
}

.match-user-comment-item p,
.match-user-comment-empty {
  margin: 0;
  color: var(--text-primary, #e2e8f0);
}

.match-user-comment-empty {
  padding: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

/* Haber detay: aynı form stilleri */
.haber-detay-comments.match-user-comments-block .section-title {
  margin: 0 0 16px 0;
}

.haber-inline-register-hint {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  line-height: 1.35;
}

.haber-inline-register {
  width: 100%;
  margin: 0.25rem 0 0.5rem;
}

.haber-inline-register-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.haber-inline-register-row .match-user-comment-input {
  flex: 1;
  min-height: 40px;
  padding: 8px 14px;
  resize: none;
  line-height: 1.35;
}

.haber-inline-register-msg {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary, #cbd5e1);
}

/* Tepki onayı (toast) — maç / haber ortak */
.reaction-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 10050;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: rgba(15, 18, 22, 0.96);
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: #e2e8f0;
  font-size: 0.9rem;
  max-width: min(92vw, 360px);
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  opacity: 0;
}

.reaction-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.reaction-toast-icon {
  flex-shrink: 0;
  border-radius: 8px;
}

.reaction-toast-text {
  line-height: 1.35;
}

.match-comment-reaction-btn--selected {
  outline: 2px solid rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.12) !important;
}

.match-comment-reaction-btn:disabled:not(.match-comment-reaction-btn--selected) {
  opacity: 0.45;
  cursor: default;
}

.match-comment-reaction-btn:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.15);
  transform: scale(1.05);
}

.match-user-comment-item.match-comment-item-flash {
  animation: matchCommentTepkiFlash 2.5s ease;
}

@keyframes matchCommentTepkiFlash {
  0%,
  100% {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
  }

  15% {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
  }
}
