/**
 * MVP Voting Plugin - Frontend Styles
 * 
 * @author William Leonard, Saxon Enterprises, wfleonard@saxonenterprises.net
 */

.mvp-voting-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.mvp-voting-header {
    text-align: center;
    margin-bottom: 40px;
}

.mvp-voting-header h2 {
    font-size: 32px;
    color: #1d2327;
    margin-bottom: 15px;
    font-weight: 700;
}

.mvp-voting-header p {
    font-size: 16px;
    color: #646970;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Notice Messages */
.mvp-notice {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 16px;
    text-align: center;
}

.mvp-notice-success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.mvp-notice-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

/* Voting Form */
.mvp-voting-form {
    margin-top: 30px;
}

.mvp-candidates-list {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.mvp-candidate-card {
    position: relative;
}

.mvp-candidate-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mvp-candidate-card label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: #fff;
    border: 2px solid #dcdcde;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mvp-candidate-card label:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
    transform: translateY(-2px);
}

.mvp-candidate-card input[type="radio"]:checked + label {
    border-color: #2271b1;
    background: #f0f6fc;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.25);
}

.candidate-info {
    flex: 1;
    padding-right: 20px;
}

.candidate-name {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 8px 0;
}

.candidate-position {
    font-size: 16px;
    color: #2271b1;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.candidate-bio {
    font-size: 15px;
    color: #646970;
    line-height: 1.6;
    margin: 0;
}

.candidate-checkmark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #dcdcde;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.candidate-checkmark svg {
    width: 24px;
    height: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mvp-candidate-card input[type="radio"]:checked + label .candidate-checkmark {
    background: #2271b1;
    border-color: #2271b1;
}

.mvp-candidate-card input[type="radio"]:checked + label .candidate-checkmark svg {
    opacity: 1;
    stroke: #fff;
}

/* Form Actions */
.mvp-form-actions {
    text-align: center;
}

.mvp-submit-btn {
    background: #2271b1 !important;
    color: #fff;
    border: none;
    padding: 18px 60px;
    font-size: 20px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(34, 113, 177, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mvp-submit-btn:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(34, 113, 177, 0.6);
}

.mvp-submit-btn:active {
    transform: translateY(0);
}

.mvp-submit-btn:disabled {
    background: #8c8f94;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

/* Messages */
.mvp-message {
    margin-top: 25px;
    padding: 18px 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    display: none;
}

.mvp-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    display: block;
}

.mvp-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    display: block;
}

/* Loading State */
.mvp-voting-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mvp-submit-btn.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mvp-voting-container {
        padding: 20px 15px;
    }
    
    .mvp-voting-header h2 {
        font-size: 26px;
    }
    
    .mvp-voting-header p {
        font-size: 15px;
    }
    
    .mvp-candidate-card label {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
    
    .candidate-info {
        padding-right: 0;
        margin-bottom: 15px;
    }
    
    .candidate-name {
        font-size: 20px;
    }
    
    .candidate-position {
        font-size: 15px;
    }
    
    .candidate-bio {
        font-size: 14px;
    }
    
    .candidate-checkmark {
        align-self: flex-end;
    }
    
    .mvp-submit-btn {
        width: 100%;
        padding: 14px 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .mvp-voting-header h2 {
        font-size: 22px;
    }
    
    .mvp-candidate-card label {
        padding: 15px;
    }
    
    .candidate-name {
        font-size: 18px;
    }
}