/* HVD Poll System Styles */
.hvd-poll-container {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
}

.poll-box {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
}

.poll-box h3 {
    color: #0B3F86;
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.4;
}

.poll-options .option {
    margin: 10px 0;
    padding: 12px 16px;
    border: 2px solid #0B3F86;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.poll-options .option:hover {
    background: #0B3F86;
    color: #fff;
}

.poll-options .option:active {
    transform: scale(0.98);
}

.poll-results {
    margin-top: 20px;
}

.result-item {
    margin: 15px 0;
}

.option-text {
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.progress-bar {
    height: 18px;
    border-radius: 8px;
    background: #e4eaf0;
    overflow: hidden;
    position: relative;
}

.progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0B3F86, #00BF83);
    border-radius: 8px;
    text-align: center;
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    transition: width 0.6s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    min-width: 40px;
}

.stats {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

.thank-you {
    margin-top: 20px;
    color: #00BF83;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background: #f0f9f5;
    border-radius: 8px;
    border: 1px solid #00BF83;
}

/* Loading state */
.poll-box.loading .option {
    opacity: 0.6;
    pointer-events: none;
}

.poll-box.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0B3F86;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 600px) {
    .poll-box {
        margin: 10px;
        padding: 20px;
    }
    
    .poll-box h3 {
        font-size: 16px;
    }
    
    .option {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* Admin styles */
.hvd-poll-admin {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.poll-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.stat-box h3 {
    font-size: 24px;
    margin: 0 0 5px 0;
    color: #0B3F86;
}

.stat-box p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.polls-list table {
    margin-top: 20px;
}

.polls-list .button {
    margin-right: 5px;
}

.no-polls {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Modal styles */
.hvd-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #0B3F86;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.results-container .result-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Form styles */
.hvd-poll-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.option-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.option-row input {
    flex: 1;
}

.poll-preview {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.poll-preview h3 {
    margin-top: 0;
    color: #0B3F86;
}
