/**
 * Redzora Theme - Günün Anketi Widget Styles
 * Exact Reference Match to Image 1
 */

.poll-card {
  padding: 24px;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 16px;
  background: var(--color-surface, #ffffff);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.poll-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.poll-top-title {
  font-size: 14px;
  font-weight: 800;
  color: #0b2240;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.2;
}

.poll-top-link {
  font-size: 12px;
  color: #94a3b8;
  transition: color 0.2s ease;
  text-decoration: none;
}
.poll-top-link:hover {
  color: #2563eb;
}

.poll-widget-thumb {
  width: 100%;
  max-height: 140px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.poll-widget-thumb img {
  width: 100%;
  height: 100%;
  max-height: 140px;
  object-fit: cover;
  display: block;
}

.poll-question {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  color: #0b2240;
}

/* Options */
.poll-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.poll-widget-opt-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #f8fafc;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-sizing: border-box;
}

.poll-widget-opt-label:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.poll-widget-opt-label.is-selected {
  background: #ffffff;
  border-color: #2563eb;
  color: #0f172a;
}

.poll-radio-indicator {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.poll-widget-opt-label.is-selected .poll-radio-indicator {
  border-color: #2563eb;
}

.poll-widget-opt-label.is-selected .poll-radio-indicator::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  display: block;
}

.poll-widget-opt-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #cbd5e1;
}

.poll-widget-opt-text {
  flex-grow: 1;
}

/* Actions Button */
.poll-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.poll-btn-main {
  width: 100%;
  padding: 13px 20px;
  background: #e9ecef;
  color: #0f172a;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

.poll-btn-main:hover:not(:disabled) {
  background: #dee2e6;
  color: #000000;
}

.poll-btn-main:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Feedback alert */
.poll-feedback {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.poll-feedback.is-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.poll-feedback.is-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.poll-feedback.is-info {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

/* Results panel - Exact match to Image 1 */
.poll-results {
  border-top: 1px solid #e2e8f0;
  margin-top: 24px;
  padding-top: 20px;
}

.poll-results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.poll-results__label {
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.poll-results__total {
  font-size: 13px;
  font-weight: 800;
  color: #0b2240;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.poll-results__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.poll-result-item {
  display: flex;
  flex-direction: column;
}

.poll-result-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 800;
  color: #0b2240;
  margin-bottom: 6px;
}

.poll-result-item__head strong {
  font-weight: 800;
  color: #0b2240;
}

.poll-result-item__track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}

.poll-result-item__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b91c1c 0%, #2563eb 100%);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.poll-result-item__meta {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-align: left;
}

/* Already voted notice (when show_results=0) */
.poll-voted-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  margin-top: 14px;
}
.poll-voted-card i {
  color: #10b981;
  font-size: 24px;
  display: block;
  margin-bottom: 8px;
}

/* Dark mode compatibility */
[data-theme-mode="dark"] .poll-card {
  background: #111827 !important;
  border-color: #1f2937 !important;
  color: #f1f5f9 !important;
}

[data-theme-mode="dark"] .poll-top-title,
[data-theme-mode="dark"] .poll-question,
[data-theme-mode="dark"] .poll-results__total,
[data-theme-mode="dark"] .poll-result-item__head,
[data-theme-mode="dark"] .poll-result-item__head strong {
  color: #f8fafc !important;
}

[data-theme-mode="dark"] .poll-widget-opt-label {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e2e8f0 !important;
}
[data-theme-mode="dark"] .poll-widget-opt-label:hover {
  background: #111827 !important;
  border-color: #4b5563 !important;
}
[data-theme-mode="dark"] .poll-widget-opt-label.is-selected {
  background: #111827 !important;
  border-color: #3b82f6 !important;
}
[data-theme-mode="dark"] .poll-radio-indicator {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
}

[data-theme-mode="dark"] .poll-btn-main {
  background: #1f2937 !important;
  color: #f1f5f9 !important;
  border: 1px solid #374151 !important;
}
[data-theme-mode="dark"] .poll-btn-main:hover {
  background: #374151 !important;
}

[data-theme-mode="dark"] .poll-results {
  border-color: #1f2937 !important;
}
[data-theme-mode="dark"] .poll-result-item__track {
  background: #374151 !important;
}
[data-theme-mode="dark"] .poll-results__label,
[data-theme-mode="dark"] .poll-result-item__meta {
  color: #94a3b8 !important;
}

[data-theme-mode="dark"] .poll-voted-card {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #cbd5e1 !important;
}
