/* Ballot/Voting Page Styles */

/* Ballot Header */
.ballot-header {
  padding-bottom: 2rem;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 2rem;
}

.ballot-icon {
  color: #4986ff;
  margin-bottom: 1rem;
}

.ballot-subtitle {
  font-size: 1.1rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

/* Instructions */
.ballot-instructions {
  background-color: #e7f3ff;
  border-left: 4px solid #4986ff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.ballot-instructions h5 {
  color: #333;
  font-weight: 600;
  margin-bottom: 1rem;
}

.ballot-instructions ul {
  margin-bottom: 0;
  padding-left: 1.5rem;
}

.ballot-instructions li {
  margin-bottom: 0.5rem;
  color: #555;
}

/* Question Cards */
.question-card {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 2px solid #e9ecef;
  transition: all 0.3s;
}

.question-card.completed {
  border-color: #28a745;
  background-color: #f0f9f4;
}

.question-header {
  margin-bottom: 1rem;
}

.question-number {
  display: inline-block;
  background-color: #4986ff;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.question-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.question-description {
  color: #6c757d;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Options */
.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-item {
  position: relative;
}

.option-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 0;
}

.option-label:hover {
  border-color: #4986ff;
  background-color: #f8f9ff;
  transform: translateX(5px);
}

.option-radio:checked + .option-label {
  border-color: #4986ff;
  background-color: #e7f3ff;
  box-shadow: 0 4px 12px rgba(73, 134, 255, 0.2);
}

.option-radio:focus + .option-label {
  outline: 2px solid rgba(73, 134, 255, 0.5);
  outline-offset: 2px;
}

.option-content {
  flex: 1;
}

.option-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.candidate-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 0.25rem;
}

.candidate-party {
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
}

.option-description {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

.option-check {
  margin-left: 1rem;
  font-size: 1.5rem;
  color: #dee2e6;
  transition: all 0.3s;
}

.option-radio:checked + .option-label .option-check {
  color: #4986ff;
}

/* Progress */
.ballot-progress {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.progress-text {
  font-weight: 500;
  color: #333;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.progress-text i {
  color: #28a745;
}

.progress {
  height: 25px;
  border-radius: 12px;
  background-color: #e9ecef;
}

.progress-bar {
  border-radius: 12px;
  transition: width 0.5s ease;
  font-weight: 500;
}

/* Actions */
.ballot-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

/* Notice */
.ballot-notice {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  color: #856404;
  font-size: 0.9rem;
}

.ballot-notice i {
  color: #ffc107;
  font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
  body.has-header.has-footer main {
    padding: 1rem 0 !important;
    background-color: #ffffff;
  }

  .ballot-subtitle {
    font-size: 1rem;
  }

  .ballot-info .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    display: block;
    margin-bottom: 0.5rem;
  }

  .ballot-instructions {
    padding: 1rem;
  }

  .question-card {
    padding: 1.25rem 1rem;
  }

  .question-title {
    font-size: 1.1rem;
  }

  .option-label {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .option-label:hover {
    transform: none;
  }

  .option-check {
    margin-left: 0;
    margin-top: 0.5rem;
    align-self: flex-end;
  }

  .candidate-name {
    font-size: 1rem;
  }

  .ballot-actions {
    flex-direction: column;
  }

  .ballot-notice {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .custom-container {
    padding: 1rem;
  }

  .question-title {
    font-size: 1rem;
  }

  .option-description {
    font-size: 0.85rem;
  }
}
