/* =====================================================================
 * Base Poll Styles (Layout and overall container)
 * ===================================================================== */
.elpw-poll-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.elpw-question {
    font-size: 1.25em;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.elpw-options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Base style for each option */
.elpw-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #f9f9f9;
    transition: background-color 0.3s;
}

.elpw-option-label {
    flex-grow: 1; 
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Vote button style */
.elpw-vote-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.elpw-vote-btn:hover:not(:disabled) {
    background-color: #005177;
}

.elpw-vote-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Initial state: Hide results container */
.elpw-result-container {
    display: none; 
    flex-grow: 1;
    margin-left: 10px;
    height: 100%;
}


/* =====================================================================
 * Results View Styles (Active after voting)
 * ===================================================================== */

/* State where results are active (after vote or on load if already voted) */
.elpw-option.results-active .elpw-option-label {
    width: 30%; 
    flex-shrink: 0;
}

/* Result Bar Wrapper */
.elpw-option.results-active .elpw-result-container {
    display: flex; /* Show the container */
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    margin-left: 10px;
}

.elpw-result-bar-wrapper {
    flex-grow: 1;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.elpw-bar {
    height: 100%;
    background-color: #ff5722; 
    transition: width 0.5s ease-out;
}

.elpw-result-text {
    font-weight: bold;
    color: #333;
    width: 40px; 
    text-align: right;
    flex-shrink: 0;
    font-size: 0.9em;
}

/* In results view, adjust button size */
.elpw-option.results-active .elpw-vote-btn {
    display: block;
    padding: 5px 10px; 
    margin-left: 10px;
}


/* =====================================================================
 * Re-vote/Last Voted Styles (New changes)
 * ===================================================================== */
 
/* Highlight the last voted option */
.elpw-option.last-voted {
    background-color: #e6f7ff; /* Light blue background */
    border: 1px solid #91d5ff; 
}

/* Style for the button of the current vote */
.elpw-option.last-voted .elpw-vote-btn:disabled {
    background-color: #008000; /* Green background for "আপনার বর্তমান ভোট" button */
    color: #FFFFFF;
    cursor: default;
    opacity: 1;
    font-weight: bold;
}

/* Footer styles (Total Votes & Message) */
.elpw-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
}

.elpw-message {
    padding: 10px;
    border-radius: 3px;
    margin-top: 5px;
    font-weight: 500;
}

.elpw-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.elpw-message.info {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}