/* Version: 1.4 */

/* Basic wrapper */
.ele-te .epoll-wrapper,
.elemate-micro-poll.epoll-wrapper {
  box-sizing: border-box;
}

.epoll-wrapper {
  border-radius: 4px;
  padding:20px;
}

/* Two-column layout for desktop/tablet: left (question/options), right (results) */
.epoll-body {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-start;
}

.epoll-main {
  flex: 1 1 260px;
}

.epoll-results {
  flex: 1 1 260px;
}

/* Question */
.epoll-question {
  margin-bottom: 12px;
}

.epoll-title {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.3;
}

.epoll-desc {
  margin: 0;
  font-size: 14px;
  color: #555;
}

/* Options: vertical list of radio rows */
.epoll-options {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 8px;
}

/* Label acts as the "pill" */
.epoll-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 0;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  width: 100%;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Native radio */
.epoll-option-input {
  margin: 0;
}

/* Label text */
.epoll-option-label {
  font-size: 13px;
  line-height: 1.2;
  color: #333;
}

/* Hover / active */
.epoll-option:hover {
  border-color: #ff2266;
}

.epoll-option.is-selected {
  background: #ff2266;
  border-color: #ff2266;
  box-shadow: 0 0 0 1px rgba(255, 34, 102, 0.25);
}

.epoll-option.is-selected .epoll-option-label {
  color: #fff;
}

/* While AJAX is in progress */
.epoll-option.is-disabled {
  opacity: 0.6;
  cursor: default;
}

/* Just a state marker; clicks are blocked in JS while locked */
.epoll-options-locked .epoll-option {
  cursor: default;
}

/* Message */
.epoll-message {
  margin: 4px 0 4px;
  font-size: 12px;
  color: #555;
}

/* Results container */
.epoll-results {
  margin-top: 10px;
}

/* Bar layout block (textual list) */
.epoll-results-bars {
  /* visible by default; JS hides when using bar_chart layout */
}

.epoll-result-row {
  margin-bottom: 10px;
}

.epoll-result-label {
  font-size: 13px;
  margin-bottom: 4px;
}

.epoll-result-bar {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 0;
  background: #eee;
  overflow: hidden;
  border: 1px solid #fd9fb3;
}

.epoll-result-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: #fd9fb3;
  border-radius: inherit;
  transition: width 0.3s ease;
}

.epoll-result-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}

.epoll-result-percent {
  font-weight: 600;
}

.epoll-total {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #444;
}

/* Bar chart block */
.epoll-results-chart {
  display: none; /* JS toggles this based on selected layout */
  margin-top: 16px;
}

.epoll-results-chart canvas {
  max-width: 100%;
  width: 100%;
}

/* Mobile: stack everything vertically */
@media (max-width: 767px) {
  .epoll-body {
    flex-direction: column;
  }

  .epoll-main,
  .epoll-results {
    min-width: 100%;
  }
}
