/* ==========================================
   סקרי בחירות - Election Polls
   ========================================== */

.election-poll-section {
    margin-bottom: 2.5rem;
}

.election-poll-section .section-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1a1a2e;
}

.election-poll-section .section-title i {
    color: var(--primary-color, #0d6efd);
}

/* כרטיס סקר */
.poll-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.poll-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

.poll-card .card-header {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.poll-card .card-header i {
    margin-left: 0.5rem;
}

.poll-card-ip .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.poll-card-registered .card-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.poll-card .card-body {
    padding: 1.5rem;
    min-height: 300px;
}

.poll-card .card-footer {
    background: #f8f9fa;
    border-top: 1px solid #eee;
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    color: #6c757d;
}

/* רשימת מפלגות להצבעה */
.poll-parties-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.poll-party-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-align: right;
}

.poll-party-btn:hover {
    border-color: var(--primary-color, #0d6efd);
    background: #f0f4ff;
}

.poll-party-btn.selected {
    border-color: var(--primary-color, #0d6efd);
    background: #e8f0fe;
    font-weight: 600;
}

.poll-party-btn .party-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* כפתור הצבעה */
.poll-vote-btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.poll-vote-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.poll-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.poll-vote-btn.registered-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.poll-vote-btn.registered-btn:hover:not(:disabled) {
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

/* טופס תגובה */
.poll-comment-area {
    margin-top: 1rem;
}

.poll-comment-area textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
    font-size: 0.9rem;
    direction: rtl;
    transition: border-color 0.2s;
}

.poll-comment-area textarea:focus {
    outline: none;
    border-color: var(--primary-color, #0d6efd);
}

.poll-comment-area .char-count {
    text-align: left;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* גרף תוצאות - עמודות אנכיות */
.poll-results {
    margin-top: 0.5rem;
}

.poll-results .total-votes {
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.poll-results .total-votes strong {
    color: #1a1a2e;
    font-size: 1.2rem;
}

.poll-chart-vertical {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 200px;
    padding: 0 0.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.poll-vbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    height: 100%;
    justify-content: flex-end;
}

.poll-vbar-pct {
    font-size: 0.65rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
    white-space: nowrap;
}

.poll-vbar-fill {
    width: 100%;
    max-width: 40px;
    border-radius: 6px 6px 0 0;
    transition: height 1s ease-out;
    min-height: 2px;
    position: relative;
}

.poll-vbar-fill:hover {
    opacity: 0.85;
    transform: scaleX(1.08);
}

.poll-chart-labels {
    display: flex;
    justify-content: center;
    gap: 3px;
    padding: 0 0.25rem;
    margin-bottom: 0.25rem;
}

.poll-vbar-label {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.6rem;
    font-weight: 600;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 50px;
}

.poll-chart-seats {
    display: flex;
    justify-content: center;
    gap: 3px;
    padding: 0 0.25rem;
}

.poll-vbar-seats {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.6rem;
    color: #6c757d;
    max-width: 50px;
}

.poll-vbar-seats strong {
    color: #1a1a2e;
}

/* הדגשת העמודה שהצבעת עליה */
.poll-vbar-voted {
    box-shadow: 0 0 0 2px #ffd700, 0 0 8px rgba(255, 215, 0, 0.5);
}

/* תגובות */
.poll-comments-section {
    margin-top: 1.5rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.poll-comments-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1a1a2e;
}

.poll-comment-item {
    padding: 0.6rem 0.8rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border-right: 3px solid #ddd;
}

.poll-comment-item .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.poll-comment-item .comment-party {
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 12px;
    color: white;
    font-size: 0.7rem;
}

.poll-comment-item .comment-text {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #333;
}

.poll-comments-more {
    text-align: center;
    margin-top: 0.5rem;
}

.poll-comments-more button {
    font-size: 0.85rem;
    color: var(--primary-color, #0d6efd);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

/* הודעת התחברות */
.poll-login-prompt {
    text-align: center;
    padding: 3rem 1.5rem;
}

.poll-login-prompt i {
    font-size: 2.5rem;
    color: #f5576c;
    margin-bottom: 1rem;
}

.poll-login-prompt p {
    color: #6c757d;
    margin-bottom: 1rem;
}

.poll-login-prompt .btn {
    border-radius: 10px;
    padding: 0.5rem 2rem;
}

/* הודעת הצלחה */
.poll-success-msg {
    text-align: center;
    padding: 1rem;
    color: #198754;
    font-weight: 600;
    animation: fadeInUp 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* כפתורי שיתוף */
.poll-share-section {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.poll-share-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.6rem;
}

.poll-share-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.poll-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.poll-share-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    color: white;
}

.poll-share-whatsapp { background: #25D366; }
.poll-share-facebook { background: #1877F2; }
.poll-share-telegram { background: #0088cc; }
.poll-share-twitter { background: #1a1a2e; }
.poll-share-copy { background: #6c757d; }
.poll-share-copy.copied { background: #198754; }

/* Disclaimer */
.poll-disclaimer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.poll-disclaimer i {
    color: #ffc107;
}

/* 3 עמודות בדסקטופ כשיש הרבה מפלגות */
@media (min-width: 992px) {
    .poll-parties-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive */
@media (max-width: 991px) {
    .poll-parties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .poll-card .card-body {
        padding: 1rem;
    }

    .poll-parties-grid {
        grid-template-columns: 1fr;
    }

    .poll-bar-name {
        min-width: 55px;
        font-size: 0.78rem;
    }

    .poll-bar-seats {
        min-width: 35px;
        font-size: 0.75rem;
    }
}
