/* ============================================================
   Verdiqts — Feed & Take Card
   ============================================================ */

/* Feed page tabs */
.feed-header {
  margin-bottom: 20px;
}
.feed-header h1 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 12px;
  font-weight: 700;
}

.feed-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}
.feed-tabs a {
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}
.feed-tabs a:hover { color: var(--text-primary); }
.feed-tabs a.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* Topic pills — horizontally scrollable, no visible scrollbar,
   edge fades that disappear when fully scrolled in that direction. */
.topic-pills {
  position: relative;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 24px 12px 24px;
  margin: 0 -24px 16px -24px;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  /* Default state: fade both edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
  transition: -webkit-mask-image 200ms ease, mask-image 200ms ease;
}
.topic-pills::-webkit-scrollbar { display: none; width: 0; height: 0; }
.topic-pills[data-scroll-start="true"] {
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 32px), transparent 100%);
          mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 32px), transparent 100%);
}
.topic-pills[data-scroll-end="true"] {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 100%);
}
.topic-pills[data-scroll-start="true"][data-scroll-end="true"] {
  -webkit-mask-image: none;
          mask-image: none;
}

.topic-pills a {
  flex-shrink: 0;
  padding: 7px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.topic-pills a:hover {
  background: var(--bg-raised);
  border-color: var(--border-default);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.topic-pills a.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #0C0C0E;
}
.topic-pills a:active { transform: translateY(0) scale(0.97); }

/* Optional desktop scroll arrows — appear only when the strip is scrollable */
.topic-pills-wrap {
  position: relative;
}
.topic-pills-wrap__btn {
  position: absolute;
  top: 50%;
  width: 32px;
  height: 32px;
  margin-top: -22px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 180ms ease, background 180ms ease, transform 180ms ease;
}
.topic-pills-wrap__btn:hover { background: var(--brand); color: #0C0C0E; border-color: var(--brand); }
.topic-pills-wrap__btn[data-side="left"]  { left: -4px; }
.topic-pills-wrap__btn[data-side="right"] { right: -4px; }
.topic-pills-wrap:hover .topic-pills-wrap__btn[data-visible="true"] { opacity: 1; }
@media (hover: none) {
  .topic-pills-wrap__btn { display: none !important; }
}
@media (min-width: 700px) {
  .topic-pills-wrap__btn[data-visible="true"] { display: flex; }
}

/* ============================================================
   Take Card
   ============================================================ */
.take-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.take-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
}
.take-card:hover { border-color: var(--border-default); }

.take-card.is-hot::before {
  content: '🔥';
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 16px;
}

.take-card.is-featured {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--brand-subtle) 0%, var(--bg-surface) 50%);
}

.take-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Hashtag pills below take body */
.take-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -8px 0 16px;
}

.hashtag-pill {
  display: inline-block;
  padding: 3px 11px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-raised);
  color: var(--brand);
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition);
  letter-spacing: -0.005em;
}
.hashtag-pill:hover {
  background: var(--brand-subtle);
  border-color: var(--brand);
  color: var(--brand-hover);
  transform: translateY(-1px);
}

/* Sidebar trending hashtags */
.side-card__trending {
  display: flex;
  flex-direction: column;
}
.side-card__trending-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  font-size: 14px;
  transition: padding-left var(--transition);
}
.side-card__trending-row:last-child { border-bottom: 0; }
.side-card__trending-row:hover { padding-left: 4px; }
.side-card__trending-tag {
  color: var(--brand);
  font-weight: 700;
}
.side-card__trending-count {
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.take-card__head .user-mini { display: flex; align-items: center; gap: 8px; }
.take-card__head .user-mini img { width: 28px; height: 28px; border-radius: var(--radius-full); object-fit: cover; }
.take-card__head .user-mini a {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 14px;
}
.take-card__head .user-mini a:hover { color: var(--brand); }
.take-card__head .dot { color: var(--text-disabled); }
.take-card__head time { color: var(--text-muted); }
.badge-verified, .badge-founding {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  background: var(--brand);
  color: #0C0C0E;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 800;
}
.badge-founding { background: linear-gradient(135deg, var(--brand), var(--disagree)); color: #fff; }

.topic-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--brand);
}

.take-card__body {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  word-wrap: break-word;
}
.take-card__body a { color: inherit; }
.take-card__body a:hover { color: var(--brand); }

/* Vote bar */
.vote-bar {
  display: flex;
  height: 8px;
  background: var(--bg-raised);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}
.vote-bar__agree {
  background: var(--agree);
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.vote-bar__disagree {
  background: var(--disagree);
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.vote-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.vote-stats__agree { color: var(--agree); }
.vote-stats__disagree { color: var(--disagree); }
.vote-stats__total { color: var(--text-muted); }

.take-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vote-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.vote-btn:hover:not(:disabled):not(.is-voted) {
  background: var(--bg-overlay);
  border-color: var(--border-default);
}
.vote-btn:disabled { cursor: not-allowed; }
.vote-btn--agree.is-voted {
  background: var(--agree);
  border-color: var(--agree);
  color: #0C0C0E;
}
.vote-btn--agree:hover:not(.is-voted) {
  border-color: var(--agree);
  color: var(--agree);
}
.vote-btn--disagree.is-voted {
  background: var(--disagree);
  border-color: var(--disagree);
  color: #fff;
}
.vote-btn--disagree:hover:not(.is-voted) {
  border-color: var(--disagree);
  color: var(--disagree);
}
.vote-btn--agree.is-other { opacity: 0.45; }
.vote-btn--disagree.is-other { opacity: 0.45; }

.take-card__meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.icon-btn:hover { background: var(--bg-raised); color: var(--text-primary); }

/* ============================================================
   Take Detail (single take page)
   ============================================================ */
.take-detail {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}
.take-detail__body {
  font-size: 26px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 18px 0 24px;
  word-wrap: break-word;
}
.take-detail .vote-bar { height: 12px; margin-bottom: 12px; }
.take-detail .vote-stats { font-size: 14px; }

/* ============================================================
   Comments
   ============================================================ */
.comment-thread {
  margin-top: 32px;
}
.comment-thread h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.comment-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}
.comment-form textarea {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.comment-form textarea:focus { border-color: var(--brand); }
.comment-form__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.char-count { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.char-count.is-warn { color: var(--brand); }
.char-count.is-over { color: var(--disagree); }

.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.comment--reply {
  margin-left: 32px;
  background: var(--bg-base);
  border-left: 2px solid var(--border-default);
}
.comment__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.comment__head img { width: 24px; height: 24px; border-radius: var(--radius-full); }
.comment__head a { color: var(--text-primary); font-weight: 700; font-size: 13px; }
.comment__body { color: var(--text-primary); font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.comment__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
}
.comment__vote {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.comment__vote:hover { background: var(--bg-raised); }
.comment__vote.is-voted-up { color: var(--agree); }
.comment__vote.is-voted-down { color: var(--disagree); }
.comment__reply-link {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}
.comment__reply-link:hover { color: var(--brand); }
.comment__deleted { color: var(--text-disabled); font-style: italic; }

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.side-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.side-card h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.side-card__topics { display: flex; flex-wrap: wrap; gap: 6px; }
.side-card__lead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}
.side-card__lead:last-child { border-bottom: 0; }
.side-card__lead img { width: 28px; height: 28px; border-radius: var(--radius-full); }
.side-card__lead .name { color: var(--text-primary); font-weight: 700; }
.side-card__lead .meta { color: var(--text-muted); font-size: 12px; margin-left: auto; }

/* ============================================================
   Pagination / Load More
   ============================================================ */
.load-more {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}
.load-more:hover { border-color: var(--brand); color: var(--brand); }
.load-more.is-loading { opacity: 0.6; cursor: wait; }

/* ============================================================
   Submit form
   ============================================================ */
.submit-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.submit-form textarea {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 18px;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  outline: none;
}
.submit-form textarea:focus { border-color: var(--brand); }
.submit-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}
.submit-form select {
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  outline: none;
  flex: 1;
}

/* ============================================================
   Tag Input Component (submit form)
   ============================================================ */
.tag-input-wrap {
  position: relative;
  margin-top: 18px;
}
.tag-input-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.tag-input-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  min-height: 48px;
  transition: border-color var(--transition);
}
.tag-input-shell:focus-within {
  border-color: var(--brand);
}
.tag-input-shell input {
  flex: 1;
  min-width: 160px;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  padding: 4px 0;
}
.tag-input-shell input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.tag-input-shell input::placeholder {
  color: var(--text-muted);
}

.tag-pills {
  display: contents;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 12px;
  background: var(--brand);
  color: #0C0C0E;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
  animation: tagIn 180ms ease;
}
@keyframes tagIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.tag-pill button {
  background: rgba(12, 12, 14, 0.18);
  color: #0C0C0E;
  border: 0;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-weight: 800;
  transition: background var(--transition);
}
.tag-pill button:hover {
  background: rgba(12, 12, 14, 0.36);
}

.tag-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  max-height: 280px;
  overflow-y: auto;
  z-index: 30;
  padding: 4px;
}
.tag-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}
.tag-suggestion:hover,
.tag-suggestion.is-highlight {
  background: var(--bg-raised);
}
.tag-suggestion__tag {
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
}
.tag-suggestion__meta {
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
