/* Poll creation and voting share the community's compact, quiet surfaces. */
.community-poll-builder { margin: 2px 0 18px; padding: 15px; border: 1px solid #e9e6ed; border-radius: 14px; background: #fff; }
.community-poll-builder__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -5px -7px 10px 0; }
.community-poll-builder__heading { display: inline-flex; align-items: center; gap: 7px; color: #db4652; font-size: 13px; font-weight: 650; line-height: 20px; }
.community-poll-builder__heading .community-icon { width: 18px; height: 18px; }
.community-poll-builder__remove { width: 32px; height: 32px; color: #a59eac; }
.community-poll-builder__remove .community-icon { width: 16px; height: 16px; }
.community-poll-builder__options { display: grid; gap: 8px; margin-top: 12px; }
.community-poll-builder__option { position: relative; min-width: 0; }
.community-poll-builder .community-poll-builder__input { display: block; width: 100%; min-width: 0; min-height: 42px; padding: 10px 42px 10px 12px; border: 1px solid #ebe8ef; border-radius: 9px; background: #faf9fc; color: #3e3745; font-size: 13px; line-height: 20px; }
.community-poll-builder__input::placeholder { color: #aaa3b1; }
.community-poll-builder .community-poll-builder__remove-option { position: absolute; top: 0; right: 1px; bottom: 0; display: inline-flex; align-items: center; justify-content: center; width: 38px; min-height: 42px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #aaa3b1; font-size: 21px; font-weight: 400; line-height: 1; }
.community-poll-builder__remove-option:hover { color: #ce4654; }
.community-poll-builder .community-poll-builder__remove-option:disabled { cursor: default; opacity: .3; }
.community-poll-builder .community-poll-builder__add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 38px; margin-top: 10px; padding: 8px 10px; border: 1px solid #e8e4ed; border-radius: 8px; background: #f5f4f7; color: #716a7a; font-size: 12px; font-weight: 550; line-height: 20px; }
.community-poll-builder__add .community-icon { width: 14px; height: 14px; }
.community-poll-builder__add:hover { background: #f8f6fb; }
.community-poll-builder .community-poll-builder__add:disabled { cursor: default; }
.community-poll-builder__multiple { display: flex; align-items: center; gap: 8px; min-height: 32px; width: fit-content; max-width: 100%; margin-top: 10px; color: #8b8295; font-size: 12px; line-height: 1.5; cursor: pointer; }
.community-poll-builder__multiple input[type="checkbox"] { flex: 0 0 auto; width: 15px; height: 15px; margin: 0; accent-color: var(--community-accent, #ff0000); }
.community-compose-tools .community-compose-add-poll { width: auto; gap: 5px; padding: 0 9px; border-radius: 9px; font-size: 12px; font-weight: 550; }
.community-compose-tools .community-compose-add-poll .community-icon { width: 20px; height: 20px; }
.community-compose-tools .community-compose-add-poll[aria-pressed="true"] { background: #fff1f2; color: #db4652; cursor: default; opacity: 1; }
.community-poll-builder__summary { display: grid; gap: 7px; margin: 12px 0; padding: 0; list-style: none; }
.community-poll-builder__summary li { padding: 10px 12px; border-radius: 8px; background: #f7f6f9; color: #5d5366; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.community-poll-builder__hint { margin: 6px 0 0; color: #77717e; font-size: 11px; line-height: 1.5; }

.community-page .community-poll-summary { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-top: 18px; padding: 12px 16px; border-radius: 10px; background: #fff5f6; color: #db4652; font-size: 13px; line-height: 20px; text-decoration: none; }
.community-page .community-poll-summary:hover { background: #ffedef; }
.community-poll-summary__label { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-weight: 600; }
.community-poll-summary .community-icon { width: 17px; height: 17px; }
.community-poll-summary__participants { min-width: 0; overflow-wrap: anywhere; }
.community-poll-summary__notice { flex-shrink: 0; padding: 2px 7px; border-radius: 6px; background: #fff; color: #827780; font-size: 11px; line-height: 18px; white-space: nowrap; }
.community-poll-summary__arrow { flex-shrink: 0; margin-left: auto; }
.community-poll { margin-top: 18px; padding: 17px; border: 1px solid #e9e6ed; border-radius: 14px; background: #fff; scroll-margin-top: 100px; }
.community-poll__header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: #db4652; font-size: 13px; font-weight: 650; line-height: 20px; }
.community-poll__header > :first-child { display: inline-flex; align-items: center; gap: 7px; }
.community-poll__header .community-icon { width: 18px; height: 18px; }
.community-poll__header > :last-child:not(:first-child) { color: #d34c59; font-size: 12px; font-weight: 500; white-space: nowrap; }
.community-poll__hint { margin: 9px 0 12px; color: #77717e; font-size: 11px; line-height: 1.5; }
.community-poll__options { display: grid; gap: 8px; margin-top: 12px; }
.community-poll__option { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; padding: 11px 12px; overflow: hidden; border: 1px solid #eeeaf1; border-radius: 9px; background: #f6f6f8; }
.community-poll__option:has(.community-poll__input:not(:disabled)):hover { border-color: #d7cddf; }
.community-poll__option:focus-within { outline: 2px solid var(--community-accent, #ff0000); outline-offset: 2px; }
.community-poll__bar { position: absolute; inset: 0 auto 0 0; width: clamp(0%, var(--poll-percentage, 0%), 100%); background: #dadddf; pointer-events: none; }
.community-poll__input { position: relative; z-index: 1; flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--community-accent, #ff0000); }
.community-poll__label { position: relative; z-index: 1; flex: 1; min-width: 0; color: #45414b; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.community-poll__result { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; margin-left: auto; color: #55515b; font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1.5; white-space: nowrap; }
.community-poll__option.is-selected { border-color: #efc0c6; background: #fff6f7; }
.community-poll__option.is-selected .community-poll__bar { background: #f9e1e5; }
.community-poll__option.is-selected .community-poll__label { color: #a84454; }
.community-poll__option.is-selected .community-poll__result { color: #c55e6e; }
.community-poll__footer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.community-poll .community-poll__submit { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 20px; border: 0; border-radius: 9px; background: var(--community-accent, #ff0000); color: #fff; font-size: 12px; font-weight: 600; line-height: 20px; text-decoration: none; }
.community-poll__submit:hover { filter: brightness(.94); }
.community-poll__notice { margin: 0; color: #77717e; font-size: 11px; line-height: 1.5; }
.community-poll__error { flex: 0 0 100%; margin: 0; color: #bc485a; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.community-poll.is-voted .community-poll__notice { color: #bb7180; }
/* While choosing, rows show only their choices; results wait for a vote or a preview. */
.community-poll[data-poll-mode="vote"] :is(.community-poll__bar, .community-poll__result) { display: none; }
.community-poll .community-poll__preview { min-height: 42px; padding: 0 6px; border: 0; background: none; color: #77717e; font-size: 12px; font-weight: 600; line-height: 20px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.community-poll .community-poll__preview:hover { color: #3e3745; }
.community-poll .community-poll__preview:disabled { cursor: default; opacity: .5; }
@media (max-width: 767px) {
  .community-poll-builder { padding: 12px; }
  .community-poll-builder .community-poll-builder__input { font-size: 16px; }
  .community-poll { margin-top: 15px; padding: 13px; }
  .community-page .community-poll-summary { gap: 9px; margin-top: 15px; padding: 12px; font-size: 12px; }
  .community-poll { scroll-margin-top: 72px; }
  .community-poll__option { gap: 8px; padding: 10px; }
  .community-poll__result { font-size: 10px; }
  /* On a phone, Vote spans the card, with the results preview beneath it. */
  .community-poll__footer { flex-direction: column; align-items: stretch; gap: 4px; }
  .community-poll .community-poll__submit { width: 100%; min-height: 48px; font-size: 15px; }
  .community-poll .community-poll__preview { align-self: center; min-height: 44px; font-size: 13px; }
  .community-poll__notice, .community-poll__error { text-align: center; }
}
