/* ============================================
   v2/css/poll.css
   استایل صفحه نظرسنجی
   سایت اخبار استقلال — نسخه ۲
   ============================================ */

.poll-page {
  padding: 12px;
}

/* ============================================
   Tabs
   ============================================ */
.poll-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 2px solid var(--bg);
  margin-bottom: 16px;
}

.poll-tabs::-webkit-scrollbar { display: none; }

.poll-tab {
  padding: 10px 20px;
  border-radius: 25px;
  font-size: .78rem;
  font-weight: 600;
  color: #5a6a7a;
  background: var(--bg);
  border: none;
  cursor: pointer;
  transition: all .3s;
  white-space: nowrap;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.poll-tab i { font-size: .85rem; }

.poll-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(21,96,189,.25);
}

.poll-tab.active i { color: var(--gold); }

/* ============================================
   List
   ============================================ */
.poll-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.poll-item {
  background: #fff;
  border-radius: 16px;
  padding: 18px 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,.04);
}

.poll-item .poll-question {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 14px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.poll-item .poll-question i {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ============================================
   Options
   ============================================ */
.poll-item .poll-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .3s;
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
}

.poll-item .poll-option:last-of-type { margin-bottom: 0; }

.poll-item .poll-option:hover {
  border-color: var(--gold);
}

.poll-item .poll-option.my-vote {
  background: rgba(245, 200, 66, .12);
  border-color: var(--gold);
}

.poll-item .poll-option .poll-text {
  flex-shrink: 0;
  font-size: .85rem;
  color: var(--text);
  font-weight: 600;
  min-width: 90px;
  z-index: 2;
  position: relative;
}

.poll-item .poll-option .poll-bar {
  flex: 1;
  height: 10px;
  background: rgba(21, 96, 189, .08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.poll-item .poll-option .poll-bar .poll-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--primary));
  border-radius: 10px;
  transition: width .6s ease;
  width: 0;
}

.poll-item .poll-option .poll-percent {
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 44px;
  text-align: left;
  z-index: 2;
  position: relative;
  flex-shrink: 0;
}

.poll-item .poll-option .poll-vote-count {
  font-size: .65rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* حالت رأی نداده */
.poll-item .poll-option.not-voted {
  cursor: pointer;
}

.poll-item .poll-option.not-voted:hover .poll-text {
  color: var(--primary);
}

/* حالت بسته */
.poll-item.closed .poll-option {
  cursor: default;
  opacity: .9;
}

.poll-item.closed .poll-option:hover {
  border-color: var(--border);
}

/* ============================================
   Footer
   ============================================ */
.poll-item .poll-total {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.poll-item .poll-total .voted-badge {
  color: #0d8f4a;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.poll-item .poll-total .voted-badge i {
  color: #2ecc71;
}

.poll-item .poll-total .closed-badge {
  color: var(--danger);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.poll-item .poll-total .closed-badge i {
  color: var(--danger);
}

.poll-item .poll-expires {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.poll-item .poll-expires i {
  color: var(--gold);
}

/* ============================================
   Empty
   ============================================ */
.poll-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.poll-empty i {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}

.poll-empty p {
  font-size: .85rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 380px) {
  .poll-item .poll-option .poll-text {
    font-size: .78rem;
    min-width: 75px;
  }
  .poll-item .poll-option .poll-percent {
    font-size: .72rem;
    min-width: 38px;
  }
}