/* Copyright 2013 Zachary Doll — modernized poll voting + cake results
 * Forum palette: navy #344254, coral #EA6D86, cyan #4fc6de, bg #f6f9fc.
 */

.DP_AnswerForm,
.DP_ResultsForm {
  margin: 14px 0;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(27, 39, 51, .04);
}

/* Heading -------------------------------------------------------------- */
.DP_ResultsHead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f5;
}

.DP_ResultsHead .DP_Icon {
  width: 18px;
  height: 18px;
  color: #4fc6de;
  flex: 0 0 auto;
}

.DP_ResultsTitle {
  font-size: 16px;
  font-weight: 700;
  color: #344254;
}

.DP_ResultQuestions,
.DP_AnswerQuestions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.DP_ResultQuestion,
.DP_AnswerQuestion {
  padding: 14px 0;
}

.DP_ResultQuestion:not(:first-child),
.DP_AnswerQuestion:not(:first-child) {
  border-top: 1px solid #eef2f5;
}

/* Question head + vote count ------------------------------------------- */
.DP_QHeadRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.DP_QuestionTitle {
  font-weight: 600;
  font-size: 15px;
  color: #2b2e3d;
}

.DP_VoteCount {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #565b70;
  background: #f1f5f8;
  padding: 2px 10px;
  border-radius: 999px;
}

/* Results body: chart + ordered legend --------------------------------- */
.DP_ResultBody {
  display: flex;
  align-items: center;
  gap: 18px;
}

.DP_ChartWrap {
  position: relative;
  flex: 0 0 168px;
  width: 168px;
  height: 168px;
}

.DP_Legend {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.DP_LegendItem {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #46545f;
}

.DP_LegendDot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.DP_LegendLabel {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.DP_LegendVotes {
  flex: 0 0 auto;
  color: #838c96;
  font-variant-numeric: tabular-nums;
}

.DP_LegendPct {
  flex: 0 0 auto;
  min-width: 44px;
  text-align: right;
  font-weight: 700;
  color: #344254;
  font-variant-numeric: tabular-nums;
}

.DP_CardNoVotes {
  padding: 10px 0;
  color: #9aa4ad;
  font-style: italic;
  font-size: 14px;
}

.DP_NoResults {
  color: #838c96;
  padding: 8px 0;
}

@media (max-width: 540px) {
  .DP_ResultBody {
    flex-direction: column;
    align-items: stretch;
  }
  .DP_ChartWrap {
    margin: 0 auto;
  }
}

/* Voting form ---------------------------------------------------------- */
.DP_AnswerOptions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.DP_AnswerOptions li {
  margin: 0 0 6px;
}

.DP_AnswerOptions label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.DP_AnswerOptions label:hover {
  border-color: #4fc6de;
  background: #f6fcfe;
}

.DP_AnswerForm hr {
  border: 0;
  border-top: 1px solid #eef2f5;
  margin: 10px 0;
}

/* Tools --------------------------------------------------------------- */
#DP_Tools {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

#DP_Tools li a {
  font-size: 13px;
  color: #565b70;
}

#DP_Tools li a:hover {
  color: #EA6D86;
}

/* No-JS percentage-bar fallback (kept for accessibility) --------------- */
.DP_ResultOptions {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.DP_ResultOption {
  margin-bottom: 6px;
}

.DP_Bar {
  display: inline-block;
  background-color: #344254;
  color: #FFF;
  border-radius: 3px;
  padding: 0 4px;
  min-height: 18px;
}

.DP_Bar-0 { background-color: #4fc6de; color: #06303a; }
.DP_Bar-1 { background-color: #EA6D86; color: #fff; }
.DP_Bar-2 { background-color: #6BBF8A; color: #06321d; }
.DP_Bar-3 { background-color: #EECA66; color: #4a3a00; }
.DP_Bar-4 { background-color: #9B8CE0; color: #fff; }
.DP_Bar-5 { background-color: #344254; color: #fff; }
.DP_Bar-6 { background-color: #FF8C66; color: #4a1a00; }
.DP_Bar-7 { background-color: #7FD1C1; color: #06322b; }
.DP_Bar-8 { background-color: #B5C46B; color: #2e3500; }
.DP_Bar-9 { background-color: #E0789E; color: #fff; }
