/**
 * Frontend styles for Pohádko Polls
 */

/* Poll Container */
.pohadko-poll-container {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Poll Question */
.pohadko-poll-question {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

/* Poll Options */
.pohadko-poll-options {
    margin: 0 0 20px 0;
}

.pohadko-poll-option {
    display: block;
    padding: 12px 15px;
    margin: 0 0 10px 0;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.pohadko-poll-option:hover {
    border-color: #4a90e2;
    background: #f0f7ff;
}

.pohadko-poll-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.pohadko-poll-option span {
    font-size: 16px;
    color: #333;
    vertical-align: middle;
}

/* Submit Button */
.pohadko-poll-submit {
    text-align: center;
    margin-top: 15px;
}

.pohadko-poll-button {
    background: #4a90e2;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pohadko-poll-button:hover {
    background: #357abd;
}

.pohadko-poll-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loader */
.pohadko-poll-loader {
    text-align: center;
    padding: 15px;
    color: #666;
    font-style: italic;
}

/* Error Message */
.pohadko-poll-error-message {
    background: #ffe6e6;
    color: #c00;
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
    text-align: center;
    border: 1px solid #ffcccc;
}

/* Voted State */
.pohadko-poll-voted {
    text-align: center;
}

.pohadko-poll-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 2px solid #81c784;
}

.pohadko-poll-message p {
    margin: 0;
    font-size: 16px;
}

/* Results */
.pohadko-poll-results {
    margin-top: 20px;
    text-align: left;
}

.pohadko-poll-results h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.pohadko-poll-result-item {
    margin-bottom: 15px;
}

.pohadko-poll-result-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}

.pohadko-poll-result-stats {
    font-weight: 600;
    color: #4a90e2;
}

.pohadko-poll-result-bar {
    background: #e0e0e0;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
}

.pohadko-poll-result-bar-fill {
    background: linear-gradient(90deg, #4a90e2 0%, #357abd 100%);
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.pohadko-poll-total-votes {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* Bonus Article */
.pohadko-poll-bonus {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.pohadko-poll-bonus p {
    margin: 0 0 10px 0;
    color: #856404;
}

.pohadko-poll-bonus-link {
    display: inline-block;
    background: #ffc107;
    color: #000;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.pohadko-poll-bonus-link:hover {
    background: #e0a800;
    color: #000;
}

/* Restricted Content */
.pohadko-poll-restricted {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.pohadko-poll-restricted h3 {
    color: #856404;
    margin: 0 0 15px 0;
}

.pohadko-poll-restricted p {
    color: #856404;
    margin: 0;
}

/* Error States */
.pohadko-poll-error {
    background: #ffe6e6;
    color: #c00;
    padding: 15px 20px;
    border-radius: 6px;
    text-align: center;
    border: 2px solid #ffcccc;
}

.pohadko-poll-closed,
.pohadko-poll-not-started {
    background: #f5f5f5;
    color: #666;
    padding: 15px 20px;
    border-radius: 6px;
    text-align: center;
    border: 2px solid #ddd;
    font-style: italic;
}

/* Multiple Choice Hint */
.pohadko-poll-multiple-hint {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin: 10px 0 0 0;
    text-align: center;
}

/* Text Response Fields */
.pohadko-poll-text-response {
    margin: 0 0 20px 0;
}

.pohadko-poll-text-response textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.pohadko-poll-text-response textarea:focus {
    outline: none;
    border-color: #4a90e2;
}

/* Other Option Text Field */
.pohadko-poll-option-other {
    margin-bottom: 5px !important;
}

.pohadko-poll-other-text {
    margin: 0 0 10px 0;
    padding-left: 25px;
}

.pohadko-poll-other-text textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.pohadko-poll-other-text textarea:focus {
    outline: none;
    border-color: #4a90e2;
}

/* Responsive */
@media (max-width: 600px) {
    .pohadko-poll-container {
        padding: 20px 15px;
    }

    .pohadko-poll-question {
        font-size: 18px;
    }

    .pohadko-poll-option {
        padding: 10px 12px;
    }

    .pohadko-poll-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}
