.wp-voting-poll {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.wp-voting-poll h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.voting-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.voting-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.voting-option img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
}

.voting-option p {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.vote-button {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}

.vote-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.refresh-vote-container {
    grid-column: 1 / -1; /* Span the entire row */
    text-align: center;
    margin-top: 20px;
}

.refresh-vote {
    background-color: #4caf50; /* Green color to indicate an action */
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}

.refresh-vote:hover {
    background-color: #45a049;
}

/* Loader Overlay Styles */
.loader-overlay {
    position: fixed; /* Cover the entire viewport */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7); /* Black transparent overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it appears above all other elements */
}

/* Spinner Styles */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3; /* Light grey border */
    border-top: 5px solid #3f51b5; /* Blue top border for spinning effect */
    border-radius: 50%;
    animation: spin 1s linear infinite; /* Spin animation */
}

/* Keyframes for spinning animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message {
    text-align: center;
    padding: 20px;
    background-color: #e8f5e9;
    border-radius: 10px;
    margin: 20px 0;
}

.tick-icon {
    display: block;
    margin: 0 auto 10px auto;
}

.success-message p {
    margin: 5px 0;
    font-size: 16px;
}

.view-results {
    margin: 10px;
    padding: 10px 20px;
    background-color: #3f51b5;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.voting-results h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.result-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.result-row span:first-child {
    width: 100px;
    font-size: 16px;
}

.result-bar {
    height: 20px;
    margin-right: 10px;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.result-row span:last-child {
    width: 150px;
    text-align: right;
    font-size: 14px;
}

.voting-results p {
    font-size: 14px;
    margin-top: 10px;
}

.back-to-vote {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #3f51b5;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.error {
    color: #d32f2f;
    text-align: center;
    padding: 10px;
}

/* Mobile styles */
@media (max-width: 600px) {
    .wp-voting-poll {
        padding: 10px;
    }

    .wp-voting-poll h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .voting-options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .voting-option {
        margin-bottom: 0;
    }

    .voting-option img {
        width: 100px;
        height: 100px;
    }

    .voting-option p {
        font-size: 14px;
    }

    .vote-button {
        padding: 8px 16px;
        font-size: 12px;
    }

    .refresh-vote-container {
        margin-top: 15px;
    }

    .refresh-vote {
        padding: 8px 16px;
        font-size: 12px;
    }

    .success-message {
        padding: 15px;
        margin: 15px 0;
    }

    .tick-icon {
        width: 32px;
        height: 32px;
    }

    .success-message p {
        font-size: 14px;
    }

    .view-results {
        padding: 8px 16px;
        font-size: 12px;
    }

    .voting-results h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .result-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 15px;
    }

    .result-row span:first-child {
        width: 100%;
        font-size: 14px;
        margin-bottom: 5px;
    }

    .result-bar {
        height: 16px;
        margin-right: 0;
        width: 100%;
        border-radius: 5px;
    }

    .result-row span:last-child {
        width: 100%;
        text-align: left;
        font-size: 12px;
        margin-top: 5px;
    }

    .voting-results p {
        font-size: 12px;
        margin-top: 8px;
    }

    .back-to-vote {
        padding: 8px 16px;
        font-size: 12px;
    }

    /* Adjust spinner size for mobile */
    .spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
}