/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

 /*Hide Header and Footer*/
.poll_topic-template-default #colophon,
.poll_topic-template-default header#masthead,
.poll_topic-template-default #wpadminbar {
  display: none;
}

.poll_topic-template-default {
  padding: 20px;
}

.poll_topic-template-default .entry-content-wrap {
  padding: 0;
}

.poll_topic-title {
  margin-bottom: 0;
}

.poll_topic-title h1.entry-title {
    background: #fff;
    padding: 20px;
    font-size: 20px;
}

.amsa-voting-proxy-table-wrapper {
  max-height: 50vh; /* Adjust the height as needed */
  overflow-y: auto; /* Enables vertical scrolling */
  overflow-x: hidden; /* Hides horizontal scroll bar */
}

.loading-spinner {
  position: relative;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  margin-top: 15px;
}

.loading-spinner::before {
  content: "";
  box-sizing: border-box;
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid #ccc;
  border-radius: 50%;
  border-top-color: rgba(0, 0, 0, 0.3);
  animation: spin 1s linear infinite;
  left: 0;
  top: 0;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Wrapper div */
.amsa-voting-poll-topic-wrapper {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #dee2e6;
  margin-bottom: 20px;
}

.amsa-voting-poll-topic-wrapper h4 {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;

}

.amsa-voting-poll-topic-wrapper p {
  margin-bottom: 10px !important;
}

.amsa-voting-poll-topic-wrapper button {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 20px!important;
}

/* Warning message */
.amsa-voting-poll-warning-messasges {
  padding: 10px;
  margin-bottom: 10px;
  position: relative;
  border-radius: 4px;
  box-shadow: 2px 2px 1px rgba(0,0,0,0.1);
  font-weight: 700;
  text-transform: uppercase;
  color: #FFF;
  background: #c84b4b;
}

.amsa-voting-poll-warning-messasges .closebtn {
  position: absolute;
  top: 5px;
  right: 10px;
  cursor: pointer;
}

/* Poll settings */
.amsa-voting-poll-settings {
  margin-bottom: 20px;
}

.amsa-voting-poll-settings h4 {
  margin-top: 0;
}

.amsa-voting-poll-settings ul {
  list-style: none;
  padding-left: 0;
}

.amsa-voting-poll-settings ul li {
  margin-bottom: 5px;
  list-style: disc;
}

/* Result wrapper */
#amsa-voting-result-wrapper {
  margin-bottom: 10px;
}

/* Result row */
.amsa-voting-result-row {
  display: flex;
  flex-wrap: wrap;
}

/* Result column */
.amsa-voting-result-col {
  flex: auto;
  margin-right: 15px;
}

@media screen and (max-width: 992px) {
  .amsa-voting-result-col {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
  }
}

/* Voting form */
#amsa-voting-form-wrapper {
  margin-bottom: 20px;
}

#amsa_voting_form p {
  margin: 5px 0;
}

#amsa_voting_form input[type="radio"] {
  margin-right: 10px;
}

#amsa-voting-unvoted-reps-wrapper {
  margin-bottom: 20px;
}

.amsa-voting-already-voted_message {
  margin-bottom: 20px;
}

.amsa-voting-already-voted_message h5 {
  margin: 0;
}

.poll-status-display {
  padding: 10px;
  margin-bottom: 20px;
  border: none;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 2px 2px 1px rgba(0,0,0,0.1);
  border-radius: 4px;
}

/* Poll status classes */
.poll-status-closed {
  background-color: #d9534f; /* Red color for closed status */
}

.poll-status-open {
  background-color: #5cb85c; /* Green color for open status */
}

.poll-status-unvoted {
  background-color: #337ab7; /* Blue color for unvoted status */
}

/* Search input */
#amsa-voting-search-proxy {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
}

/* Table wrapper */
.amsa-voting-proxy-table-wrapper {
  overflow-x: auto;
}

/* Table */
#amsa-voting-proxy-table {
  width: 100%;
  border-collapse: collapse;
}

/* Table header */
#amsa-voting-proxy-table thead {
  background-color: #f0f0f0;
}

#amsa-voting-proxy-table th {
  padding: 10px;
  text-align: left;
}

/* Table body */
#amsa-voting-proxy-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

#amsa-voting-proxy-table tbody td {
  padding: 10px;
  border-top: 1px solid #ccc;
  min-width: 125px;
}

/* Voting card */
.amsa-voting-card {
  margin-bottom: 10px;
}

.amsa-voting-card-header {
  margin-bottom: 10px;
}

.amsa-voting-card-title {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
}

.amsa-voting-voted-users {
  list-style-type: none;
  padding: 0;
}

.amsa-voting-voted-users li {
  margin-bottom: 5px;
}

/* Underline color for vote types */
.amsa-voting-card-Votes-for .amsa-voting-card-title {
  border-bottom: 2px solid #5cb85c; /* Blue underline for "Votes for" */
}

.amsa-voting-card-Votes-against .amsa-voting-card-title {
  border-bottom: 2px solid #dc3545; /* Red underline for "Votes against" */
}

.amsa-voting-card-Abstentions .amsa-voting-card-title {
  border-bottom: 2px solid #ffc107; /* Yellow underline for "Abstentions" */
}

/* Style for the table */
.amsa-voting-poll-topics-overview-table {
  overflow-x: scroll;
}

.amsa-voting-poll-topics-overview-table table {
  width: 100%;
  border-collapse: collapse;
}

/* Style for table header */
.amsa-voting-poll-topics-overview-table th {
  background-color: #f2f2f2;
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  font-size: 11px;
}

/* Style for table data */
.amsa-voting-poll-topics-overview-table td {
  padding: 8px;
  border-bottom: 1px solid #ddd;
  min-width: 150px;
  font-size: 12px;
}

/* Style for alternating row colors */
.amsa-voting-poll-topics-overview-table tbody tr:nth-child(even) {
  background-color: #f2f2f2;
}

/* Style for closed rows */
.amsa-voting-poll-topics-overview-row-closed {
  background-color: #f9f9f9;
}

/* Style for outcome colors */
.amsa-voting-poll-topics-overview-row td:nth-child(3) strong {
  font-weight: bold;
}

.amsa-voting-poll-topics-overview-row
  td:nth-child(3)
  strong[style="color:red"] {
  color: red;
}

.amsa-voting-poll-topics-overview-row
  td:nth-child(3)
  strong[style="color:green"] {
  color: green;
}

.amsa-voting-poll-topics-overview-row
  td:nth-child(3)
  strong[style="color:blue"] {
  color: blue;
}

.amsa-voting-poll-topics-overview-row-open {
  background-color: #eaf7ea !important; /* Light green background color */
}

/* Style for active poll topics overview */
.amsa-voting-active-poll-topics-overview {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* Style for active poll topics column */
.amsa-voting-active-poll-topics-col {
  width: calc(50% - 10px); /* Adjust the width as needed */
  margin-bottom: 20px;
}

/* Style for active poll topics card */
.amsa-voting-active-poll-topics-card {
  border: 1px solid #ddd;
  padding: 10px;
}

/* Style for active poll topics card header */
.amsa-voting-active-poll-topics-card-header {
  margin-bottom: 10px;
}

/* Style for active poll topics card title */
.amsa-voting-active-poll-topics-card-title {
  margin: 0;
  font-size: 14px;
}

/* Style for active poll topics card body */
.amsa-voting-active-poll-topics-card-body {
  margin-bottom: 15px;
}

/* Style for active poll topics card text */
.amsa-voting-active-poll-topics-card-text {
  margin: 0;
  font-size: 11px;
}

/* Style for active poll topics button */
#admin-toggle-poll-status {
  margin-bottom: 16px;
}

a.amsa-voting-active-poll-topics-btn.btn.button {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 11px;
  min-width: 75px;
  text-align: center;
}

/* Style for wrapper div */
.amsa-voting-speaker-short-code-wrapper {
  padding: 20px;
  background-color: #fff;
  font-size: 13px;
}

.nominate-speaker-form input {
  font-size: 12px !important;
  text-transform: uppercase!important;
  font-weight: 700!important;
  margin-top: 20px!important;
}

/* Style for warning messages */
.amsa-voting-speaker-list-warning-messasges {
  margin-bottom: 15px;
  background: #c02e2e;
  color: #FFF;
  border: none;
  font-weight: 700;
  padding: 5px 10px;
  text-transform: uppercase;
}

/* Style for close button in warning messages */
.closebtn {
  color: #fff;
  float: right;
  font-weight: bold;
  cursor: pointer;
  font-weight: 700;
}

.closebtn:hover {
  color: #fff;
}

/* Style for speaker table */
#amsa-voting-speaker-table {
  width: 100%;
  border-collapse: collapse;
}

#amsa-voting-speaker-table th,
#amsa-voting-speaker-table td {
  background: none;
  border: none;
  padding: 0 4px;
}

button.speaker-removal-button {
  color: #FFF !important;
  padding: 3px 8px;
}

.amsa-voting-real-time-switch {
  background: #FFF;
  padding: 10px 20px 0 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.amsa-voting-ballot-wrapper {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #dee2e6;
  margin-bottom: 20px;
}
