/* ================================================================
   COMMUNITY — Daily Debate (Dashboard bar chart)
   Premium design tokens aligned with style.css
   ================================================================ */

.community-widgets {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.debate-card {
  background: linear-gradient(145deg, var(--white) 0%, var(--cream) 100%);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  border: 1px solid var(--cream-dark);
  box-shadow: var(--sh-sm);
  position: relative;
  overflow: hidden;
}

.debate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--honey) 0%, var(--forest) 100%);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}

.debate-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--forest);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.debate-header i {
  width: 18px;
  height: 18px;
  color: var(--honey-dark);
}

/* Dashboard question + status */
.debate-dash-head {
  margin-bottom: var(--sp-4);
}

.debate-dash-question {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--cacao);
  line-height: 1.35;
  margin: 0 0 var(--sp-3);
}

.debate-dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--r-full);
}

.debate-dash-badge--voted {
  background: rgba(39, 174, 96, 0.12);
  color: var(--success);
  border: 1px solid rgba(39, 174, 96, 0.25);
}

.debate-dash-badge--pending {
  background: rgba(241, 196, 15, 0.15);
  color: var(--cacao);
  border: 1px solid rgba(241, 196, 15, 0.35);
}

.debate-dash-msg {
  color: var(--cacao-light);
  font-size: var(--text-sm);
}

/* Horizontal bar chart — no vote numbers */
.debate-barchart {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.debate-barchart__row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--cream-dark);
  transition: box-shadow var(--tr-fast), border-color var(--tr-fast);
}

.debate-barchart__row--lead {
  border-color: rgba(44, 94, 59, 0.35);
  box-shadow: 0 4px 16px rgba(44, 94, 59, 0.1);
}

.debate-barchart__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.debate-barchart__option {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--cacao);
  line-height: 1.4;
}

.debate-barchart__crown {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--forest);
  background: rgba(241, 196, 15, 0.2);
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.debate-barchart__track {
  height: 12px;
  background: var(--cream-dark);
  border-radius: var(--r-full);
  overflow: hidden;
}

.debate-barchart__fill {
  height: 100%;
  border-radius: var(--r-full);
  width: 0%;
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 4px;
}

.debate-barchart__fill--a {
  background: linear-gradient(90deg, var(--honey-dark), var(--honey));
}

.debate-barchart__fill--b {
  background: linear-gradient(90deg, var(--forest), var(--forest-light));
}

.debate-dash-footer {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--cream-darker);
  font-size: var(--text-xs);
  color: var(--cacao-light);
  text-align: center;
}

/* ── Mobile / small screens ───────────────────────────────────── */
@media (max-width: 640px) {
  .community-widgets {
    margin-bottom: var(--sp-4);
  }

  .debate-card {
    padding: var(--sp-4);
    border-radius: var(--r-md);
  }

  .debate-header {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    margin-bottom: var(--sp-3);
  }

  .debate-dash-question {
    font-size: var(--text-lg);
  }

  .debate-barchart__row {
    padding: var(--sp-2) var(--sp-3);
  }

  .debate-barchart__label {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .debate-barchart__option {
    font-size: var(--text-xs);
    word-break: break-word;
  }

  .debate-barchart__track {
    height: 10px;
  }
}

@media (max-width: 380px) {
  .debate-card {
    padding: var(--sp-3);
  }

  .debate-dash-question {
    font-size: var(--text-base);
  }
}