/**
 * Styles for Weiser Fiddle Contest
 */

/* Common Styles */
.wsr-contest-single,
.wsr-contestant-single,
.wsr-judge-single,
.wsr-contest-archive,
.wsr-judge-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.wsr-contestant-single,
.wsr-judge-archive,
.wsr-contest-archive{
    width: 800px;
}


.wsr-contest-header,
.wsr-contestant-header,
.wsr-judge-header,
.wsr-archive-header {
    margin-bottom: 2rem;
}

.wsr-contest-content,
.wsr-contestant-content,
.wsr-judge-content {
    margin-bottom: 2rem;
}

/* Tables */
.wsr-results-table,
.wsr-contestant-scores-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.wsr-results-table th,
.wsr-results-table td,
.wsr-contestant-scores-table th,
.wsr-contestant-scores-table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
}

.wsr-results-table th,
.wsr-contestant-scores-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.wsr-results-table tr:nth-child(even),
.wsr-contestant-scores-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.wsr-tie-breaker-note {
    font-style: italic;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Judges List */
.wsr-judges-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.wsr-judge-item {
    /* flex: 0 0 calc(33.333% - 1rem); */
    min-width: 250px;
    margin-bottom: 1.5rem;
}

.wsr-judge-image-archive {
    float: left;
    margin: 0.5rem 0;
}

.wsr-judge-image-archive img{
    background-size: cover;
    object-fit: cover;
    margin-right: 20px;
    height: 250px;
    width: 250px;
}

.wsr-contest-image img{
    max-width: 100%;
    background-size: cover;
    object-fit: cover;
    height: 84px;     
}


.wsr-judge-name {
    margin: 0.5rem 0;
}

/* Contestant Bio */
.wsr-contestant-bio,
.wsr-judge-bio {
    margin: 1rem 0;
    line-height: 1.6;
}

.wsr-contestant-image,
.wsr-judge-image {
    margin-bottom: 1rem;
}

/* Contest Archive */
.wsr-upcoming-contest {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
}

.wsr-upcoming-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.wsr-upcoming-dates,
.wsr-upcoming-location {
    flex: 1;
    min-width: 200px;
}

.wsr-upcoming-tickets {
    margin-top: 1rem;
    width: 100%;
}

.wsr-ticket-button {
    display: inline-block;
    background-color: #0073aa;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.wsr-ticket-button:hover {
    background-color: #005177;
    color: white;
}

.wsr-contests-grid {
    margin-bottom: 2rem;
}

.wsr-contest-year-group {
    margin-bottom: 2rem;
}

.wsr-year-heading {
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.wsr-year-contests {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.wsr-contest-item {
    flex: 0 0 calc(33.333% - 1rem);
    min-width: 250px;
    margin-bottom: 1.5rem;
}

.wsr-contest-image {
    margin-bottom: 0.75rem;
}

.wsr-contest-title {
    margin: 0.5rem 0;
}

/* Judge Archive */
.wsr-judges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.wsr-judge-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
}



/* Judge Contests List */
.wsr-contests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.wsr-contest-info {
    margin-top: 0.5rem;
}

.wsr-contest-year {
    font-size: 0.9rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .wsr-judge-item,
    .wsr-contest-item {
        flex: 0 0 100%;
    }
    
    .wsr-judges-list {
        flex-direction: column;
    }
    
    .wsr-results-table,
    .wsr-contestant-scores-table {
        display: block;
        overflow-x: auto;
    }
    .wsr-judge-archive,
    .wsr-contest-archive{
        width: unset;
    }

    /* single judge & contestant  */
    .wsr-judge-image-archive,
    .wsr-judge-image-single,
    .wsr-contestant-image-single {
        float: none !important;
        margin-bottom: 10px;
    }
    .wsr-judge-image-archive img,
    .wsr-judge-image-single img,
    .wsr-contestant-image-single img {
        width: 100%;
    }
} 

.wsr-judge-image-single,
.wsr-contestant-image-single {
    float: left;
    margin-right: 15px; 
    width: auto; 
}

.wsr-judge-image-single img,
.wsr-contestant-image-single img {
    height: auto;
}

/* Clearfix to prevent layout issues */
.wsr-judge-bio-single::after {
    content: "";
    display: table;
    clear: both;
}
