/* Product Discussions UI (matches certempire-demo-quiz discussions styles) */

.ce-discuss-wrap {
  margin-top: 12px;
  border-top: 1px solid #eef2f7;
  padding-top: 16px;
}

.ce-discuss-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ce-discuss-title {
  font-weight: 700;
  font-size: 15px;
  color: #111827;
}

.ce-discuss-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ce-discuss-sort {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
}

.ce-discuss-sort.active {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.ce-discuss-item {
  display: flex;
  gap: 14px;
  border-bottom: 1px solid #f3f4f6;
  padding: 16px 0;
  margin-bottom: 0;
}

.ce-discuss-item:last-child {
  border-bottom: none;
}

.ce-discuss-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.ce-discuss-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.ce-discuss-vote {
  width: 72px;
  flex: 0 0 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 4px;
  user-select: none;
}

.ce-upvote-btn {
  width: 100%;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 999px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: #374151;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ce-upvote-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.ce-upvote-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ce-upvote-btn.is-active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.ce-upvote-ico {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ce-upvote-ico svg {
  width: 16px;
  height: 16px;
  display: block;
}

.ce-upvote-count {
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
}

.ce-discuss-body {
  flex: 1;
  min-width: 0;
}

.ce-discuss-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #9ca3af;
}

.ce-discuss-author {
  font-weight: 600;
  color: #111827;
  font-size: 14px;
}

.ce-discuss-date {
  color: #9ca3af;
}

.ce-discuss-content {
  font-size: 15px;
  color: #374151;
  line-height: 1.6;
}

.ce-discuss-content p {
  margin: 0 0 8px;
}

.ce-discuss-content p:last-child {
  margin-bottom: 0;
}

.ce-discuss-empty,
.ce-discuss-loading,
.ce-discuss-error {
  padding: 24px;
  text-align: center;
  color: #6b7280;
  font-style: italic;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 16px;
}

.ce-discuss-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.ce-discuss-page-btn {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: #374151;
}

.ce-discuss-page-btn:hover:not(:disabled) {
  border-color: #d1d5db;
  background: #f9fafb;
}

.ce-discuss-page-mid {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.ce-discuss-form {
  background: #f9fafb;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #f3f4f6;
  margin-top: 16px;
}

.ce-discuss-form textarea.ce-discuss-text {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
  font-family: inherit;
}

.ce-discuss-form textarea.ce-discuss-text:focus {
  border-color: #673AB7;
  outline: none;
  box-shadow: 0 0 0 3px rgba(103, 58, 183, 0.1);
}

.ce-discuss-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
}

.ce-discuss-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.ce-discuss-reply-btn {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ce-discuss-reply-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.ce-discuss-reply-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ce-discuss-reply-form {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
}

.ce-discuss-reply-form.hidden {
  display: none !important;
}

.ce-discuss-reply-name {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 8px;
  font-family: inherit;
}

.ce-discuss-reply-text {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}

.ce-discuss-replies {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 2px solid #eef2f7;
}

.ce-discuss-replies.hidden {
  display: none !important;
}

.ce-discuss-reply {
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.ce-discuss-reply:last-child {
  border-bottom: none;
}

.ce-discuss-reply-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 6px;
}

.ce-discuss-reply-actions {
  margin-top: 8px;
}

.ce-discuss-reply-pending {
  padding: 10px 12px;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #6b7280;
  font-style: italic;
  margin-bottom: 10px;
}

.ce-discuss-replies-pager {
  margin-top: 10px;
  margin-left: 14px;
}

.ce-discuss-loadmore {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: #374151;
}

.ce-discuss-loadmore:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.ce-discuss-submit {
  background: #673AB7;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.ce-discuss-submit:hover {
  background: #512DA8;
}

.ce-discuss-hint {
  font-size: 12px;
  color: #9ca3af;
}

/* Minimal base button used by quiz JS */
.ce-btn {
  background: #673AB7;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.ce-btn:hover {
  background: #512DA8;
}


