/**
 * Guest Poll System - Poll Styles
 * Version: 1.1.0
 */

/* Poll Container */
.gps-poll-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Question Styling */
.gps-question h3 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 600;
}

/* Question description styling */
.gps-question-description {
    margin: 10px 0 20px;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.5;
    color: #555;
}

.gps-question-description p {
    margin: 0 0 10px;
}

.gps-question-description p:last-child {
    margin-bottom: 0;
}

/* Answer Options */
.gps-answer {
    margin: 10px 0;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.gps-answer:hover {
    background-color: #f0f0f0;
}

.gps-answer input[type="radio"] {
    margin-right: 10px;
    vertical-align: middle;
}

.gps-answer label {
    cursor: pointer;
    display: inline-block;
    width: calc(100% - 30px);
    font-size: 16px;
    vertical-align: middle;
}

/* Answer description styling */
.gps-answer-description {
    margin-top: 8px;
    margin-left: 25px;
    padding: 8px 10px;
    background-color: #f0f8ff;
    border-left: 3px solid #0073aa;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    transition: all 0.3s ease;
}

.gps-answer-description p {
    margin: 0 0 8px;
}

.gps-answer-description p:last-child {
    margin-bottom: 0;
}

/* Submit Button */
.gps-submit, .gps-next, .gps-prev {
    display: inline-block;
    padding: 10px 20px;
    margin: 15px 10px 15px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease, transform 0.1s ease;
}

.gps-submit {
    background-color: #0073aa;
    color: #fff;
}

.gps-submit:hover {
    background-color: #005177;
}

.gps-submit:disabled {
    background-color: #7FB3D5;
    cursor: default;
}

/* Navigation buttons container */
.gps-navigation {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Previous button styling */
.gps-prev {
    background-color: #6c757d;
    color: white;
}

.gps-prev:hover {
    background-color: #5a6268;
    transform: translateX(-2px);
}

/* Next button styling */
.gps-next {
    background-color: #4CAF50;
    color: white;
}

.gps-next:hover {
    background-color: #45a049;
    transform: translateX(2px);
}

/* Results Display */
.gps-results {
    margin-top: 20px;
}

.gps-result-item {
    padding: 10px;
    margin: 5px 0;
    border-radius: 4px;
    position: relative;
}

.gps-result-bar {
    height: 24px;
    background-color: #eee;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-top: 5px;
}

.gps-result-fill {
    height: 100%;
    background-color: #0073aa;
    border-radius: 4px;
    transition: width 0.8s ease-out;
}

.gps-result-text {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
    z-index: 1;
    font-size: 14px;
}

.gps-result-votes {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: bold;
}

/* Highlight for most voted answer */
.gps-most-votes {
/*     border: 3px solid green !important;
    background-color: rgba(0, 128, 0, 0.05) !important; */
    position: relative;
    padding-top: 30px !important; /* Make space for label */
}

/* Special styling for most voted answer description */
.gps-most-votes .gps-answer-description {
    background-color: rgba(0, 128, 0, 0.05);
    border-left: 3px solid green;
}

.most-selected-label {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: green;
    color: white;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 10px;
    white-space: nowrap;
    z-index: 1;
}

/* Selected answer styling before submission */
.gps-selected {
    background-color: #f0f8ff;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Animation effects */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gps-question-description, 
.gps-answer-description {
    animation: fadeIn 0.5s ease-in-out;
}

/* Progress bar for results page */
.gps-progress-bar {
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    margin-top: 4px;
    overflow: hidden;
}

.gps-progress-fill {
    height: 100%;
    background-color: #0073aa;
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

/* Responsive Styles */
@media screen and (max-width: 500px) {
    .gps-poll-container {
        padding: 15px;
        margin: 10px;
    }

    .gps-question h3 {
        font-size: 18px;
    }

    .gps-answer {
        padding: 10px;
    }

    .gps-submit, .gps-next, .gps-prev {
        padding: 8px 15px;
        font-size: 14px;
        width: 100%;
        margin: 10px 0 0 0;
        text-align: center;
    }

    .gps-navigation {
        flex-direction: column;
        gap: 5px;
    }

    .most-selected-label {
        font-size: 10px;
        padding: 2px 8px;
    }

    .gps-question-description,
    .gps-answer-description {
        padding: 6px;
        font-size: 14px;
    }
}

/* Style fixes for various themes */
.gps-poll-container input[type="radio"] {
    -webkit-appearance: radio;
    -moz-appearance: radio;
    appearance: radio;
    opacity: 1;
    position: static;
    margin-right: 10px;
    width: auto;
    height: auto;
}

.gps-poll-container label {
    display: inline;
    width: auto;
}

.gps-poll-container button {
    text-transform: none;
}

/* Print styles - hide buttons when printing */
@media print {
    .gps-submit,
    .gps-next,
    .gps-prev,
    .gps-navigation {
        display: none !important;
    }

    .gps-poll-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
