/**
 * JBU Voting Results Styles
 */

/* Main Container */
.jbu-voting-results-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Thank You Section */
.jbu-voting-thank-you {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.jbu-voting-thank-you h2 {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 700;
}

.jbu-voting-thank-you p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Title */
.jbu-voting-results-title {
    text-align: center;
    margin: 0 0 40px 0;
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

/* Stats Section */
.jbu-voting-results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.results-stat {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.results-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.results-stat .stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 8px;
    display: block;
}

.results-stat .stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Category Results */
.jbu-voting-results-categories {
    display: grid;
    gap: 40px;
}

.jbu-voting-category-results {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.category-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    border-bottom: 3px solid #0073aa;
    padding-bottom: 10px;
}

.category-description {
    margin: 0 0 25px 0;
    color: #666;
    font-style: italic;
    line-height: 1.5;
}

/* Results List */
.category-results-list {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.result-item {
    border: 2px solid #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.result-item:hover {
    border-color: #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Position Styling */
.result-item.first-place {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fff9e6, #ffffff);
}

.result-item.second-place {
    border-color: #c0c0c0;
    background: linear-gradient(135deg, #f5f5f5, #ffffff);
}

.result-item.third-place {
    border-color: #cd7f32;
    background: linear-gradient(135deg, #fdf4e6, #ffffff);
}

/* Result Header */
.result-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
}

.result-position {
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
    background: #f8f9fa;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.first-place .result-position {
    background: #ffd700;
    color: #b8860b;
}

.second-place .result-position {
    background: #c0c0c0;
    color: #666;
}

.third-place .result-position {
    background: #cd7f32;
    color: #8b4513;
}

.result-info {
    min-width: 0; /* Allow flexbox item to shrink */
}

.nominee-name {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.nominee-description {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.result-stats {
    text-align: right;
}

.vote-count {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.vote-percentage {
    font-size: 20px;
    font-weight: 700;
    color: #0073aa;
}

/* Progress Bar */
.result-progress {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

.first-place .progress-fill {
    background: linear-gradient(90deg, #ffd700, #ffed4e);
}

.second-place .progress-fill {
    background: linear-gradient(90deg, #c0c0c0, #d3d3d3);
}

.third-place .progress-fill {
    background: linear-gradient(90deg, #cd7f32, #deb887);
}

/* Category Summary */
.category-summary {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    text-align: center;
    color: #666;
}

/* Results Widget */
.jbu-voting-results-widget {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.jbu-voting-results-widget h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.top-nominations {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget-nomination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget-nomination:last-child {
    border-bottom: none;
}

.nomination-info {
    flex: 1;
    min-width: 0;
}

.nomination-info strong {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.nomination-category {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.nomination-stats {
    text-align: right;
    white-space: nowrap;
}

.nomination-stats .vote-count {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.nomination-stats .vote-percentage {
    font-size: 14px;
    font-weight: 600;
    color: #0073aa;
}

.widget-footer {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.view-all-results {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.view-all-results:hover {
    color: #005177;
    text-decoration: underline;
}

/* Voter Confirmation */
.jbu-voting-confirmation {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.confirmation-header {
    text-align: center;
    margin-bottom: 30px;
}

.confirmation-header h2 {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #28a745;
}

.confirmation-details {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.detail-row {
    margin-bottom: 10px;
    font-size: 15px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.next-steps {
    margin-bottom: 30px;
}

.next-steps h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps li {
    padding: 8px 0;
    font-size: 15px;
    line-height: 1.4;
}

.share-section {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.share-section h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.share-button {
    padding: 10px 20px;
    border: 2px solid #0073aa;
    border-radius: 6px;
    background: transparent;
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-button:hover {
    background: #0073aa;
    color: white;
    text-decoration: none;
}

.confirmation-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.button {
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.button-primary {
    background: #0073aa;
    color: white;
}

.button-primary:hover {
    background: #005177;
    color: white;
    text-decoration: none;
}

.button-secondary {
    background: #6c757d;
    color: white;
}

.button-secondary:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
}

/* Footer */
.jbu-voting-results-footer {
    margin-top: 50px;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.results-disclaimer {
    margin: 0;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jbu-voting-results-container {
        padding: 15px;
    }
    
    .jbu-voting-results-title {
        font-size: 26px;
    }
    
    .jbu-voting-results-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .jbu-voting-category-results {
        padding: 20px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    .result-header {
        grid-template-columns: auto 1fr;
        gap: 15px;
    }
    
    .result-stats {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .result-position {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .nominee-name {
        font-size: 16px;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .confirmation-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .button {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .jbu-voting-results-container {
        padding: 10px;
    }
    
    .jbu-voting-thank-you {
        padding: 20px;
    }
    
    .jbu-voting-thank-you h2 {
        font-size: 22px;
    }
    
    .results-stat {
        padding: 20px 15px;
    }
    
    .results-stat .stat-number {
        font-size: 28px;
    }
    
    .jbu-voting-category-results {
        padding: 15px;
    }
    
    .result-item {
        padding: 15px;
    }
    
    .result-header {
        gap: 10px;
    }
    
    .jbu-voting-confirmation {
        padding: 20px;
    }
    
    .confirmation-header h2 {
        font-size: 22px;
    }
}

/* Animation for progress bars */
@keyframes fillProgress {
    from {
        width: 0%;
    }
    to {
        width: var(--target-width);
    }
}

.progress-fill {
    animation: fillProgress 1.5s ease-out;
}

/* Print styles */
@media print {
    .jbu-voting-thank-you,
    .confirmation-actions,
    .share-section,
    .widget-footer {
        display: none !important;
    }
    
    .jbu-voting-results-container {
        max-width: none;
        padding: 0;
    }
    
    .jbu-voting-category-results {
        border: 1px solid #333;
        margin-bottom: 30px;
        page-break-inside: avoid;
    }
    
    .result-item {
        border: 1px solid #ccc !important;
        background: white !important;
    }
}