/* ========== Komentar Section ========== */
.comment-section {
  margin-top: 60px;
  padding: 0 20px;
  width:100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  font-family: 'Inter', sans-serif;
}

.comment-section h2 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 25px;
  color: #1a1a1a;
}
.comment-input-wrapper {
  flex: 1; /* ini yang bikin dia full width */
  display: flex;
  flex-direction: column;
}


/* ========== Form Komentar ========== */
.comment-form {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 100%;
  object-fit: cover;
}

#comment-input {
  width: 100%;
  padding: 8px 0;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #202124;
  border: none;
  border-bottom: 1px solid #dadce0;
  background-color: transparent;
  resize: none;
  outline: none;
}

#comment-input::placeholder {
  color: #5f6368;
}

.comment-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-top: 4px;
  color: #5f6368;
}

#char-count {
  font-size: 12px;
  color: #6b7280;
}

#submit-comment {
  padding: 6px 20px;
  background-color: #14532d;
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

#submit-comment:hover {
  background-color: #0f3c20;
}


.reply-box {
  margin-top: 12px;
  margin-left: 52px; /* biar agak masuk ke dalam dari avatar parent */
  width: 100%;
}

.reply-input {
  width: 100%;
  min-height: 54px;
  padding: 12px 0;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #202124;
  border: none;
  border-bottom: 1px solid #dadce0;
  background-color: transparent;
  resize: none;
  outline: none;
}

.reply-input::placeholder {
  color: #5f6368;
}

.reply-box .comment-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 12px;
  margin-top: 4px;
  color: #5f6368;
}

.reply-box .send-reply-btn {
  padding: 6px 20px;
  background-color: #14532d;
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.reply-box .send-reply-btn:hover {
  background-color: #0f3c20;
}



/* ========== Login Prompt ========== */
.comment-login-prompt {
  background: #f3f4f6;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  color: #374151;
  margin-bottom: 25px;
  font-size: 14px;
}

.comment-login-prompt i {
  margin-right: 6px;
  color: #14532d;
}


/* ========== Filter Tab ========== */
.comment-filters {
  display: flex;
  gap: 10px;
  margin-top: 50px;
  margin-bottom: 50px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  background: #e5e7eb;
  border: none;
  padding: 8px 25px;
  border-radius: 9999px;
  font-size: 13px;
  cursor: pointer;
  color: #374151;
  transition: background 0.2s;
}

.filter-btn.active {
  background: #14532d;
  color: white;
  font-weight: 600;
}

/* ========== Komentar Utama & Reply ========== */
.comment-item {
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  position: relative;

}

.comment-body {
  flex: 1;
  background: transparent;
  padding: 0;
  border-radius: 0;
  position: relative;
}

.comment-top {
   font-family: 'Inter', sans-serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-top strong {
  font-weight: 600;
  font-size: 15px;
}

.comment-meta {
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 11px;
  gap: 10px;
  color: #6b7280;
  margin-bottom: 13px;
}

.comment-meta strong {
  display: inline-block;
  margin-right: 6px;
  color: #111827;
  font-weight: 600;
  font-size: 11px;
}

.comment-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.6;
  margin-bottom: 6px;
  margin-top: 6px;
  white-space: pre-wrap;
}

.comment-actions {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #6b7280;
  border-bottom: 1px solid #e0e0e0; /* warna abu muda */
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.comment-actions button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
}

.like-btn.liked .like-icon {
  color: red;
}

.like-btn .like-icon {
  transition: color 0.2s ease;
}

.reply-btn {
  background: none;
  border: none;
  font: inherit;
  color: #444;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.reply-icon {
  width: 19px;
  height: 19px;
  object-fit: contain;
}


.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #888;
}

.comment-options {
  position: relative;
  display: inline-block;
}

.options-popup {
  position: absolute;
  top: 100%; /* di bawah tombol */
  right: 0;  /* sejajar kanan */
  transform: translateY(5px); /* beri jarak sedikit */
  background: white;
  border: 1px solid #ccc;
  padding: 6px 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  display: none;
  z-index: 100;
  white-space: nowrap;
}

.options-popup button.delete-comment {
  background: none;
  border: none;
  color: #d00;
  font: inherit;
  cursor: pointer;
}

.comment-options.active .options-popup {
  display: block;
}

.delete-popup {
  position: absolute;
  right: 0;
  margin-top: 5px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 100;
}


.delete-popup button {
  background: none;
  border: none;
  color: #d00;
  font-weight: bold;
  cursor: pointer;
}


/* ========== Nested Padding ========== */
.level-1 { margin-left: 40px; }
.level-2 { margin-left: 80px; }
.level-3 { margin-left: 120px; }
.level-4 { margin-left: 160px; }
.level-5 { margin-left: 200px; }

/* ========== Tampilkan Semua Komentar ========== */
.comment-toggle-wrapper {
  display: flex;
  justify-content: center;
  margin: 25px 0 40px;
}


#toggle-comments-btn {
  display: block;
  margin: 25px auto 40px;
  padding: 8px 20px;
  border: none;
  border-radius: 20px;
  background-color: #f3f4f6;
  cursor: pointer;
  font-size: 14px;
  color: #14532d;
  font-weight: 500;
  transition: background 0.2s ease;
}
#toggle-comments-btn:hover {
 background-color: #e5e7eb;

}

/* ========== Tombol Login ========== */
.google-login-komen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  color: #555;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  max-width: 250px; /* atau width: fit-content; */
  width: fit-content;
   margin: 0 auto;
   margin-top: 10px;
}

.google-login-komen img {
  width: 20px;
  height: 20px;
}

.google-login-komen:hover {
  background-color: #f7f7f7;
  border-color: #ccc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}


@media (max-width: 768px) {
  /* Umum: bikin layout fluid & mobile friendly */
.comment-section {
  margin-top: 40px;
  padding: 0 16px;
  width: 100%;
  max-width: none;
  font-family: 'Inter', sans-serif;
}

/* Form komentar utama */
.comment-form {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  width: 100%;
  padding: 0 12px;
  box-sizing: border-box;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Input utama */
#comment-input {
 width: 100%;
  padding: 14px 0;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #202124;
  border: none;
  border-bottom: 1px solid #ccc;
  background-color: transparent;
  resize: none;
  outline: none;
  min-height: 54px;
}

#comment-input::placeholder {
  color: #888;
}

/* Footer tombol dan word count */
.comment-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 8px;
  gap: 10px;
  font-size: 12px;
}

/* Tombol Kirim */
#submit-comment,
.reply-box .send-reply-btn {
  background-color: #0e75c5;
  color: white;
  padding: 6px 16px;
  border: none;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

#submit-comment:hover,
.reply-box .send-reply-btn:hover {
  background-color: #095a9d;
}

/* Reply Box (balasan) */
.reply-box {
  margin-top: 12px;
  margin-left: 0;
  width: 100%;
}

.reply-input {
  width: 100%;
  padding: 14px 0;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #202124;
  border: none;
  border-bottom: 1px solid #ccc;
  background-color: transparent;
  resize: none;
  outline: none;
  min-height: 54px;
}

.reply-input::placeholder {
  color: #888;
}

/* Responsif Tambahan */
@media (max-width: 600px) {

  .comment-footer {
    flex-direction: row;
    justify-content: space-between;
    margin-top: 4px;
  }

  #submit-comment {
    padding: 6px 16px;
  }

  .reply-box .send-reply-btn {
    padding: 6px 16px;
  }

  .comment-avatar {
    width: 32px;
    height: 32px;
  }
}
