/* css/components/poll.css */

/* Floating poll container */
.hybrid-poll {
    position: fixed;
    bottom: 24px;
    right: calc(var(--config-width) + 40px);
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: pollSlideIn 0.4s ease forwards;
    animation-delay: 2s;
}

@keyframes pollSlideIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hybrid-poll.poll-hidden {
    display: none;
}

.hybrid-poll-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, rgba(129, 140, 248, 0.1) 100%);
    border-bottom: 1px solid var(--glass-border);
}

.hybrid-poll-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.hybrid-poll-title-icon {
    font-size: 16px;
}

.hybrid-poll-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
    transition: color var(--transition-fast);
}

.hybrid-poll-close:hover {
    color: var(--text-primary);
}

.hybrid-poll-body {
    padding: 16px;
}

.hybrid-poll-question {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.hybrid-poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hybrid-poll-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.hybrid-poll-option:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.hybrid-poll-option-radio {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.hybrid-poll-option:hover .hybrid-poll-option-radio {
    border-color: var(--accent-primary);
}

.hybrid-poll-option-radio-inner {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-fast);
}

.hybrid-poll-option.selected .hybrid-poll-option-radio {
    border-color: var(--accent-primary);
}

.hybrid-poll-option.selected .hybrid-poll-option-radio-inner {
    opacity: 1;
    transform: scale(1);
}

.hybrid-poll-option-text {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.4;
}

.hybrid-poll-option-icon {
    font-size: 14px;
    margin-right: 2px;
}

.hybrid-poll-footer {
    padding: 0 16px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hybrid-poll-optional {
    font-size: 10px;
    color: var(--text-muted);
}

.hybrid-poll-submit {
    padding: 8px 16px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.5;
    pointer-events: none;
    transition: all var(--transition-fast);
}

.hybrid-poll-submit.active {
    opacity: 1;
    pointer-events: auto;
}

.hybrid-poll-submit.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

/* Thank you state */
.hybrid-poll-thankyou {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
}

.hybrid-poll-thankyou.show {
    display: flex;
}

.hybrid-poll-body.hidden,
.hybrid-poll-footer.hidden {
    display: none;
}

.hybrid-poll-thankyou-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: thankYouBounce 0.6s ease;
}

@keyframes thankYouBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.hybrid-poll-thankyou-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.hybrid-poll-thankyou-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Confetti animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(-100px) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hybrid-poll {
        width: calc(100% - 32px);
        right: 16px;
        bottom: 16px;
    }
}
