/* WP Photo Contest - Frontend */

/* Variáveis */
:root {
    --wpc-primary: #2271b1;
    --wpc-primary-hover: #135e96;
    --wpc-star-active: #f5b301;
    --wpc-star-inactive: #d4d4d4;
    --wpc-success: #00a32a;
    --wpc-error: #d63638;
    --wpc-bg: #ffffff;
    --wpc-border: #e0e0e0;
    --wpc-text: #1d2327;
    --wpc-muted: #777;
    --wpc-radius: 8px;
    --wpc-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Submission form */
.wpc-submission-wrapper {
    max-width: 640px;
    margin: 2em auto;
    padding: 2em;
    background: var(--wpc-bg);
    border: 1px solid var(--wpc-border);
    border-radius: var(--wpc-radius);
    box-shadow: var(--wpc-shadow);
}

.wpc-alert {
    padding: 12px 16px;
    border-radius: var(--wpc-radius);
    margin-bottom: 1.5em;
    font-weight: 500;
}
.wpc-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.wpc-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wpc-submission-form .wpc-field {
    margin-bottom: 1.25em;
}
.wpc-submission-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5em;
    color: var(--wpc-text);
}
.wpc-submission-form input[type="text"],
.wpc-submission-form input[type="email"],
.wpc-submission-form input[type="file"],
.wpc-submission-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--wpc-border);
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
}
.wpc-submission-form input:focus,
.wpc-submission-form select:focus {
    outline: none;
    border-color: var(--wpc-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}
.wpc-required {
    color: var(--wpc-error);
}
.wpc-hint {
    margin-top: 0.4em;
    font-size: 13px;
    color: var(--wpc-muted);
}

.wpc-submit-button {
    background: var(--wpc-primary);
    color: #fff;
    border: 0;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s ease;
}
.wpc-submit-button:hover {
    background: var(--wpc-primary-hover);
}

/* Galeria */
.wpc-gallery {
    margin: 2em 0;
}
.wpc-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5em;
}
.wpc-card {
    background: var(--wpc-bg);
    border: 1px solid var(--wpc-border);
    border-radius: var(--wpc-radius);
    overflow: hidden;
    box-shadow: var(--wpc-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.wpc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.wpc-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f5f5f5;
}
.wpc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wpc-card-info {
    padding: 1em;
}
.wpc-artwork-name {
    margin: 0 0 0.25em 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--wpc-text);
}
.wpc-artist-name {
    margin: 0 0 1em 0;
    font-size: 14px;
    color: var(--wpc-muted);
    font-style: italic;
}

/* Estrelas */
.wpc-stars-wrapper {
    margin-top: 0.5em;
}
.wpc-stars {
    display: inline-flex;
    gap: 2px;
}
.wpc-star {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 2px;
    line-height: 0;
}
.wpc-star svg {
    fill: var(--wpc-star-inactive);
    transition: fill .15s ease, transform .15s ease;
}
.wpc-star:hover:not([disabled]) svg {
    transform: scale(1.15);
}
.wpc-star.is-active svg,
.wpc-star.is-hover svg {
    fill: var(--wpc-star-active);
}
.wpc-star[disabled] {
    cursor: not-allowed;
}

.wpc-vote-info {
    margin-top: 0.5em;
    font-size: 14px;
    color: var(--wpc-muted);
}
.wpc-vote-info .wpc-avg {
    font-weight: 700;
    color: var(--wpc-text);
}
.wpc-message {
    margin-top: 0.5em;
    font-size: 13px;
    min-height: 1em;
}
.wpc-message.is-success { color: var(--wpc-success); }
.wpc-message.is-error   { color: var(--wpc-error); }

/* Paginação */
.wpc-pagination {
    margin-top: 2em;
    text-align: center;
}
.wpc-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid var(--wpc-border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--wpc-text);
}
.wpc-pagination .page-numbers.current {
    background: var(--wpc-primary);
    color: #fff;
    border-color: var(--wpc-primary);
}

/* Ranking */
.wpc-ranking {
    max-width: 800px;
    margin: 2em auto;
}
.wpc-ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wpc-ranking-item {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1em;
    background: var(--wpc-bg);
    border: 1px solid var(--wpc-border);
    border-radius: var(--wpc-radius);
    margin-bottom: 0.75em;
    box-shadow: var(--wpc-shadow);
}
.wpc-ranking-position-1 { border-left: 4px solid #f5b301; }
.wpc-ranking-position-2 { border-left: 4px solid #c0c0c0; }
.wpc-ranking-position-3 { border-left: 4px solid #cd7f32; }

.wpc-ranking-position {
    font-size: 28px;
    width: 50px;
    text-align: center;
    flex-shrink: 0;
}
.wpc-medal { font-weight: 700; }

.wpc-ranking-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}
.wpc-ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wpc-ranking-info {
    flex: 1;
    min-width: 0;
}
.wpc-ranking-info h4 {
    margin: 0 0 0.25em 0;
    font-size: 17px;
    font-weight: 700;
}
.wpc-ranking-artist {
    margin: 0 0 0.5em 0;
    color: var(--wpc-muted);
    font-size: 14px;
    font-style: italic;
}
.wpc-ranking-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    font-size: 14px;
    color: var(--wpc-muted);
}
.wpc-score strong {
    color: var(--wpc-primary);
}

/* Vencedor */
.wpc-winner-wrapper {
    max-width: 800px;
    margin: 2em auto;
}
.wpc-winner-card {
    background: linear-gradient(135deg, #fff8e1 0%, #fff 100%);
    border: 2px solid #f5b301;
    border-radius: 12px;
    padding: 2em;
    text-align: center;
    box-shadow: 0 8px 24px rgba(245, 179, 1, 0.15);
}
.wpc-winner-badge {
    display: inline-block;
    background: #f5b301;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5em;
}
.wpc-winner-image {
    margin: 0 auto 1.5em;
    max-width: 600px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.wpc-winner-image img {
    width: 100%;
    height: auto;
    display: block;
}
.wpc-winner-artwork {
    margin: 0 0 0.5em 0;
    font-size: 28px;
    font-weight: 800;
}
.wpc-winner-artist {
    color: var(--wpc-muted);
    font-style: italic;
    font-size: 16px;
    margin: 0 0 1em 0;
}
.wpc-winner-stats {
    display: flex;
    justify-content: center;
    gap: 0.75em;
    font-size: 16px;
    color: var(--wpc-text);
}

/* Empty */
.wpc-empty {
    text-align: center;
    padding: 2em;
    color: var(--wpc-muted);
    background: #fafafa;
    border: 1px dashed var(--wpc-border);
    border-radius: var(--wpc-radius);
}

/* Responsivo */
@media (max-width: 480px) {
    .wpc-submission-wrapper { padding: 1.25em; }
    .wpc-ranking-item { flex-wrap: wrap; }
    .wpc-ranking-thumb { width: 60px; height: 60px; }
    .wpc-winner-artwork { font-size: 22px; }
}
