/* India Poll Maker – Public Poll Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --ipm-saffron: #FF6B00;
  --ipm-green:   #138808;
  --ipm-navy:    #000080;
  --ipm-gold:    #F5A623;
  --ipm-white:   #FFFFFF;
  --ipm-radius:  14px;
}

.ipm-poll-wrap {
  font-family: 'Poppins', 'Noto Sans Devanagari', sans-serif;
  background: #fff;
  border-radius: var(--ipm-radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.1);
  border: 1px solid #E5E7EB;
  max-width: 560px;
  margin: 20px auto;
  animation: ipmFadeIn .4s ease;
}
@keyframes ipmFadeIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

/* Header strip */
.ipm-poll-header {
  background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 50%, #000080 100%);
  padding: 20px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ipm-poll-header::before {
  content:'';
  position:absolute; top:-30px; right:-30px;
  width:120px; height:120px;
  background: rgba(255,255,255,.07);
  border-radius:50%;
}
.ipm-poll-badge {
  display:inline-block;
  background: rgba(255,255,255,.2);
  border-radius:20px; padding:4px 14px;
  font-size:12px; font-weight:600;
  margin-bottom:10px; letter-spacing:.5px;
  backdrop-filter:blur(4px);
}
.ipm-poll-title {
  margin: 0 0 6px 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.ipm-poll-desc {
  margin: 0;
  font-size: 13px;
  opacity: .85;
}

/* Vote Form */
.ipm-vote-form { padding: 20px 24px; }
.ipm-option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 2px solid #E5E7EB;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all .2s;
  font-size: 14px;
}
.ipm-option-label:hover {
  border-color: var(--ipm-saffron);
  background: #FFF8F3;
  transform: translateX(4px);
}
.ipm-option-label input { accent-color: var(--ipm-saffron); width:18px; height:18px; cursor:pointer; }
.ipm-option-label input:checked + .ipm-option-text { font-weight:600; color:var(--ipm-saffron); }
.ipm-option-label:has(input:checked) {
  border-color: var(--ipm-saffron);
  background: linear-gradient(90deg, #FFF8F3, #FFFBF8);
}

.ipm-vote-btn {
  width:100%; margin-top:6px;
  background: linear-gradient(135deg, var(--ipm-saffron), #FF8C00);
  color:#fff; border:none; border-radius:10px;
  padding:13px; font-size:15px; font-weight:700;
  cursor:pointer; font-family:inherit;
  box-shadow: 0 4px 14px rgba(255,107,0,.35);
  transition:transform .2s, box-shadow .2s;
  letter-spacing:.3px;
}
.ipm-vote-btn:hover {
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(255,107,0,.45);
}
.ipm-vote-btn:active { transform:translateY(0); }

.ipm-msg {
  margin-top:10px; font-size:13px; text-align:center;
  padding:8px; border-radius:8px; display:none;
}
.ipm-msg.error   { background:#FEE2E2; color:#991B1B; display:block; }
.ipm-msg.success { background:#DCFCE7; color:#166534; display:block; }

/* Results */
.ipm-results { padding:20px 24px 10px; }
.ipm-result-item { margin-bottom:16px; }
.ipm-result-label {
  display:flex; justify-content:space-between; align-items:center;
  font-size:13px; margin-bottom:6px;
}
.ipm-result-label strong { font-size:15px; color:var(--ipm-saffron); font-weight:700; }
.ipm-result-bar-wrap {
  background:#F3F4F6; border-radius:20px; height:10px; overflow:hidden;
}
.ipm-result-bar {
  height:100%; border-radius:20px;
  background:linear-gradient(90deg, var(--ipm-saffron), var(--ipm-green));
  width:0; transition:width 1.2s cubic-bezier(.22,1,.36,1);
}
.ipm-vote-count { font-size:11px; color:#9CA3AF; display:block; margin-top:3px; }
.ipm-total {
  text-align:center; font-size:13px; color:#6B7280;
  padding:10px; border-top:1px dashed #E5E7EB; margin-top:6px;
}
.ipm-total strong { color:var(--ipm-navy); }

.ipm-voted-msg {
  background:#DCFCE7; color:#166534;
  padding:10px 24px; text-align:center;
  font-size:13px; font-weight:600;
  border-top:1px solid #BBF7D0;
}

/* Countdown */
.ipm-countdown {
  background:#FFF7ED; border-top:1px solid #FED7AA;
  padding:10px 24px; text-align:center;
  font-size:13px; color:#92400E;
}
.ipm-timer { font-weight:700; color:var(--ipm-saffron); }

/* Error */
.ipm-error { color:#991B1B; padding:12px; font-size:14px; }

/* ── Per-option color dot ── */
.ipm-option-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

/* ── Traffic Tail poll footer ── */
.ipm-poll-footer {
  text-align: center;
  padding: 8px 20px;
  font-size: 11px;
  color: #9CA3AF;
  border-top: 1px solid #F3F4F6;
  background: #FAFAFA;
}
.ipm-poll-footer a {
  color: #FF6B00;
  text-decoration: none;
  font-weight: 600;
}
.ipm-poll-footer a:hover { text-decoration: underline; }

/* ── Color theme overrides ── */
.ipm-theme-navy    .ipm-vote-btn { background: linear-gradient(135deg,#000080,#1E3A8A); }
.ipm-theme-crimson .ipm-vote-btn { background: linear-gradient(135deg,#DC2626,#EF4444); }
.ipm-theme-green   .ipm-vote-btn { background: linear-gradient(135deg,#138808,#16A34A); }
.ipm-theme-purple  .ipm-vote-btn { background: linear-gradient(135deg,#7C3AED,#A855F7); }
