/**
 * @file
 * CSS for the Election module.
 */

/* Unpublished elections, posts, and candidates */
.election-unpublished.election-teaser,
.election-post-unpublished.election-post-teaser,
.election-candidate-unpublished.election-candidate-teaser {
  background-color: #fff4f4;
}

/* Election statuses */
.election-status-open {
  color: #347235;
  font-weight: bold;
}
.election-status-closed {
  color: #880000;
}
.election-status-future {
  color: inherit;
  font-weight: inherit;
}

/* Candidate statuses */
.election-candidate-status-elected {
  color: #347235;
}

/* Ballot paper */
#election-vote-form #edit-clear-form {
  float: right;
}
.election-ballot-row td {
  padding: 10px;
}
.election-ballot-item {
  font-size: 1.1em;
}
.election-ballot-row .form-item {
  margin: 0;
  padding: 0;
}

/* Candidate views */
.view-election-candidates h3 {
  margin-top: 1em;
}
.election-candidate-row {
  margin: 1em;
}
.election-candidate-name {
  font-size: 1.1em;
}
.election-candidate-random-order-note {
  font-style: oblique;
}

/* Manage Candidates view */
.view-election-candidates-admin .views-field-title,
.view-election-candidates-admin .views-field-candidate-name {
  overflow: hidden;
  max-width: 20em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Titles of embedded lists of posts and candidates */
.election-posts > h2,
.election-post-candidates > h2 {
  clear: both;
  margin-bottom: 0.5em;
  margin-top: 1em;
}

/* Item of information */
.election-info {
  margin-bottom: 0.5em;
  margin-top: 0.5em;
}
.election-info .label {
  font-weight: bold;
}

/* Teasers */
.election-teaser,
.election-post-teaser,
.election-candidate-teaser {
  padding-left: 15px;
}
.election-teaser h2,
.election-post-teaser h2,
.election-candidate-teaser h2 {
  margin-left: -15px;
}

/* Election vote button */
.election-post {
  position: relative;
}
.election-vote-button {
  position: absolute;
  right: 0;
  top: 1em;
}
.election-vote-button a {
  background-color: #fee94f;
  border: 1px solid #ffaa22;
  border-radius: 5px;
  font-family: sans-serif;
  font-size: 1.3em;
  padding: 0.5em 0.8em;
  text-decoration: none;
}
.election-vote-button a:link,
.election-vote-button a:visited {
  color: #333333;
}
.election-vote-button a:hover,
.election-vote-button a:active,
.election-vote-button a:focus {
  color: #000000;
}
.election-vote-button a:active {
  position: relative;
  top: 1px;
  left: 1px;
}
.election-post-teaser .election-vote-button a {
  font-size: 1em;
  padding: 0.3em 0.5em;
}
/* Leave room for button next to post title. */
.election-post > h3 {
  margin-right: 3em;
}

/* Election vote access explanation */
.election-vote-access-passed {
  color: #347235;
}
.election-vote-access-failed {
  color: #880000;
}

/* Election vote display filter (allowing to hide ineligible posts) */
.election-vote-filter-posts a {
  cursor: pointer;
}
.election-vote-filter-posts a.active {
  color: inherit;
  cursor: auto;
}

/* Statistics */
.election-statistics-user-agents .user-agent {
  overflow: hidden;
  max-width: 20em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
