/* =============================================
   POLL WIDGET — Modern Tasarım
   ============================================= */

/* --- Ana Kart --- */
.poll-widget {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* --- Header --- */
.poll-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
  padding: 1rem 1.25rem;
  color: #fff;
}

.poll-header-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.poll-header-label {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.poll-header-sub {
  font-size: 0.75rem;
  opacity: 0.85;
}

/* --- Question --- */
.poll-question {
  padding: 1.1rem 1.25rem 0.75rem;
  font-size: 0.97rem;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.5;
  border-bottom: 1px solid #f0f0f0;
}

/* --- Vote Buttons --- */
.poll-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
}

.poll-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s ease;
  text-align: left;
  width: 100%;
  font-size: 0.88rem;
  font-weight: 500;
  color: #333;
}

.poll-btn:hover {
  border-color: #dc3545;
  background: #fff5f5;
  color: #dc3545;
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.12);
}

.poll-btn:hover .poll-btn-letter {
  background: #dc3545;
  color: #fff;
}

.poll-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.poll-btn-letter {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #dee2e6;
  color: #555;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.22s ease;
}

.poll-btn-text {
  flex: 1;
}

/* --- Results Panel --- */
.poll-results {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.poll-result-row {
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.poll-result-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.poll-result-letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #dee2e6;
  color: #555;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.poll-result-text {
  flex: 1;
  font-size: 0.83rem;
  font-weight: 500;
  color: #333;
}

.poll-result-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: #dc3545;
  flex-shrink: 0;
}

/* Progress Bar */
.poll-bar-track {
  height: 7px;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
}

.poll-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #dc3545, #e85d6e);
  border-radius: 999px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Voted row highlight */
.poll-row-voted {
  background: #fff5f5;
  border: 1px solid #f5c6cb;
}

.poll-row-voted .poll-result-letter {
  background: #dc3545;
  color: #fff;
}

/* Correct answer highlight */
.poll-row-correct {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
}

.poll-row-correct .poll-result-letter {
  background: #16a34a !important;
  color: #fff !important;
}

.poll-row-correct .poll-result-pct {
  color: #16a34a !important;
}

.poll-row-correct .poll-bar-fill {
  background: linear-gradient(90deg, #16a34a, #22c55e) !important;
}

/* --- Correct Answer Banner --- */
.poll-answer-banner {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.87rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: bannerPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.poll-banner-correct {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.poll-banner-wrong {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.poll-banner-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

@keyframes bannerPop {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* --- Footer (oy sayısı) --- */
.poll-footer {
  text-align: center;
  font-size: 0.78rem;
  color: #888;
  padding-top: 0.25rem;
}

/* --- Mesaj --- */
.poll-mesaj {
  padding: 0.5rem 1.25rem 1rem;
  font-size: 0.82rem;
  text-align: center;
}

.poll-mesaj-warn {
  color: #dc3545;
  font-weight: 600;
}

/* --- Empty State --- */
.poll-empty {
  padding: 1.5rem 1.25rem;
  color: #888;
  font-size: 0.88rem;
  text-align: center;
}