/* ====== Feature Voting Page - Landing Page Aligned ====== */

.voting-page {
  padding: var(--space-xl) var(--space-md);
  background: var(--bg-light-secondary);
  min-height: 100vh;
}

/* ====== Header Section ====== */
.polls-header {
  text-align: center;
  margin-bottom: var(--space-xxl);
  padding: var(--space-xl) 0;
  background: var(--gradient-primary);
  color: var(--text-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.polls-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.polls-intro {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ====== Main Grid Layout ====== */
.polls-container {
  max-width: 1200px;
  margin: 0 auto;
}

.polls-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* ====== Active Polls Section ====== */
.active-polls h2 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: var(--space-lg);
  border-bottom: 3px solid var(--primary);
  padding-bottom: var(--space-sm);
}

/* ====== Poll Cards ====== */
.poll-card {
  background: var(--bg-light);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-lg);
  transition: var(--transition-normal);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.poll-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.poll-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.poll-card.voted {
  border-color: var(--success);
  background: linear-gradient(135deg, var(--bg-light) 0%, rgba(76, 175, 80, 0.05) 100%);
}

.poll-card.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ====== Poll Header ====== */
.poll-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
}

.poll-category {
  background: var(--gradient-accent);
  color: var(--text-light);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.8rem;
}

.poll-status {
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.poll-status::before {
  content: '⏰';
  font-size: 1rem;
}

/* ====== Poll Content ====== */
.poll-question {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.poll-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

/* ====== Poll Results ====== */
.poll-results {
  background: var(--bg-light-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--space-lg) 0;
  min-height: 50px;
  position: relative;
}

.result-bar {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.8s ease;
  position: relative;
  overflow: hidden;
}

.result-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.result-bar.yes { 
  background: linear-gradient(135deg, var(--success) 0%, #66BB6A 100%);
}

.result-bar.no { 
  background: linear-gradient(135deg, var(--error) 0%, #EF5350 100%);
}

/* ====== Vote Actions ====== */
.poll-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.vote-btn {
  padding: var(--space-md) var(--space-lg);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.vote-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: var(--transition-normal);
}

.vote-btn:hover::before {
  left: 100%;
}

.vote-btn.yes {
  background: transparent;
  color: var(--success);
  border-color: var(--success);
}

.vote-btn.yes:hover {
  background: var(--success);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.vote-btn.no {
  background: transparent;
  color: var(--error);
  border-color: var(--error);
}

.vote-btn.no:hover {
  background: var(--error);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.vote-btn.selected {
  transform: scale(0.98);
  box-shadow: var(--shadow-lg);
}

.vote-btn.yes.selected {
  background: var(--success);
  color: var(--text-light);
}

.vote-btn.no.selected {
  background: var(--error);
  color: var(--text-light);
}

.vote-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ====== Loading Spinner ====== */
.vote-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ====== Already Voted State ====== */
.already-voted {
  background: var(--bg-light-secondary);
  color: var(--text-secondary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 500;
  border: 2px solid var(--border-light);
}

.already-voted::before {
  content: '✅ ';
  color: var(--success);
}

/* ====== Suggestion Section ====== */
.suggestion-section h2 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
  border-bottom: 3px solid var(--primary);
  padding-bottom: var(--space-sm);
}

.suggestion-card {
  background: var(--bg-light);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-lg);
  border: 2px solid var(--border-light);
  transition: var(--transition-normal);
}

.suggestion-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.suggestion-form .form-group {
  margin-bottom: var(--space-lg);
}

.suggestion-form label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.suggestion-form input,
.suggestion-form textarea {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-fast);
  background: var(--bg-light);
}

.suggestion-form input:focus,
.suggestion-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.suggestion-form textarea {
  resize: vertical;
  min-height: 120px;
}

.char-count {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

.suggestion-form .btn {
  background: var(--gradient-primary);
  color: var(--text-light);
  border: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.suggestion-form .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ====== Guidelines Section ====== */
.poll-guidelines {
  background: var(--bg-light);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.poll-guidelines h3 {
  color: var(--primary);
  margin-bottom: var(--space-md);
  font-size: 1.2rem;
}

.guidelines-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guidelines-list li {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-light-secondary);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
  font-weight: 500;
  transition: var(--transition-fast);
}

.guidelines-list li:hover {
  background: var(--primary-light);
  transform: translateX(4px);
}

/* ====== Toast Notifications ====== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success);
  color: var(--text-light);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  transform: translateX(100%);
  transition: var(--transition-normal);
  z-index: 1000;
  font-weight: 600;
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  background: var(--error);
}

/* ====== Responsive Design ====== */
@media (max-width: 992px) {
  .polls-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .polls-header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .voting-page {
    padding: var(--space-lg) var(--space-sm);
  }
  
  .poll-card {
    padding: var(--space-lg);
  }
  
  .poll-actions {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  
  .polls-header {
    padding: var(--space-lg) var(--space-md);
  }
  
  .polls-header h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .poll-header {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
  }
  
  .poll-question {
    font-size: 1.2rem;
  }
}
