/* DVT Challenges – Frontend shared styles
 * NOTE: ranking table styles moved to dvt-ranking-block.css
 */

.dvt-challenges {
    font-family: inherit;
    max-width: 1100px;
    margin: 0 auto;
}

.dvt-challenges__title {
    margin: 0 0 20px;
    font-size: 1.3em;
    font-weight: 700;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */
.dvt-challenges__grid {
    display: grid;
    gap: 20px;
}

.dvt-challenges__grid--cols-1 { grid-template-columns: 1fr; }
.dvt-challenges__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.dvt-challenges__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.dvt-challenges__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Card ────────────────────────────────────────────────────────────────── */
.dvt-challenges__card {
	    border-radius: 20px;
	    background: rgba(0, 0, 0, 0.5);
	    display: flex;
	    flex-direction: column;
	    justify-content: space-between;
	    padding: 20px 24px;
	    color: #ffffff;
	    transition: box-shadow 0.15s, transform 0.15s;
}

.dvt-challenges__card:hover {
	    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
	    transform: translateY(-2px);
}

/* ── Card image ──────────────────────────────────────────────────────────── */
.dvt-challenges__card-image {
	    aspect-ratio: 16 / 9;
	    overflow: hidden;
	    border-radius: 16px;
	    background: #00000080;
}

.dvt-challenges__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Card body ───────────────────────────────────────────────────────────── */
.dvt-challenges__card-body {
	    padding: 16px 0 0;
	    flex: 1;
	    display: flex;
	    flex-direction: column;
	    gap: 8px;
}

.dvt-challenges__card-title {
	    margin: 0;
	    font-family: "GoodDogNewW00-Regular", cursive;
	    font-size: 30px;
	    line-height: 1.2;
	    font-weight: 400;
	    text-transform: uppercase;
	    color: #ffffff;
}

.dvt-challenges__card-desc {
	    margin: 0;
	    font-size: 14px;
	    line-height: 1.5;
	    color: #cfe0dc;
	    flex: 1;
}

/* ── Meta line ───────────────────────────────────────────────────────────── */
.dvt-challenges__card-meta {
	    display: flex;
	    gap: 12px;
	    font-size: 12px;
	    color: #eea617;
	    flex-wrap: wrap;
	    text-transform: uppercase;
	    letter-spacing: 1.2px;
}

/* ── Submission field tags ───────────────────────────────────────────────── */
.dvt-challenges__card-fields {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.dvt-challenges__field-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.78em;
    color: #1d4ed8;
    font-weight: 500;
}

.dvt-challenges__field-required {
    color: #dc2626;
    font-weight: 700;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .dvt-challenges__grid--cols-3,
    .dvt-challenges__grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dvt-challenges__grid--cols-2,
    .dvt-challenges__grid--cols-3,
    .dvt-challenges__grid--cols-4 {
        grid-template-columns: 1fr;
    }
}

/* ── Card as link ────────────────────────────────────────────────────────── */
a.dvt-challenges__card {
    color: inherit;
    text-decoration: none;
    display: flex; /* override <a> default inline */
}

a.dvt-challenges__card:hover .dvt-challenges__card-title {
    color: #2563eb;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* DVT Challenge Detail Page                                                   */
/* ═══════════════════════════════════════════════════════════════════════════ */

.dvt-challenge-detail {
    font-family: inherit;
    padding: 24px 0 48px;
}

.dvt-challenge-detail__inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px;
}

.dvt-challenge-detail__back {
    display: inline-block;
    font-size: 0.88em;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 24px;
}

.dvt-challenge-detail__back:hover {
    color: #111827;
    text-decoration: underline;
}

/* ── Hero image ──────────────────────────────────────────────────────────── */
.dvt-challenge-detail__hero {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 28px;
    background: #f3f4f6;
    max-height: 420px;
}

.dvt-challenge-detail__hero img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

/* ── Title & meta ────────────────────────────────────────────────────────── */
.dvt-challenge-detail__title {
    margin: 0 0 8px;
    font-size: 2em;
    font-weight: 800;
    line-height: 1.2;
}

.dvt-challenge-detail__meta {
    color: #6b7280;
    font-size: 0.9em;
    margin: 0 0 20px;
}

/* ── Description ─────────────────────────────────────────────────────────── */
.dvt-challenge-detail__description {
    margin: 0 0 32px;
    font-size: 1em;
    line-height: 1.7;
    color: inherit;
}

/* ── Section ─────────────────────────────────────────────────────────────── */
.dvt-challenge-detail__section {
    margin-bottom: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.dvt-challenge-detail__section-title {
    margin: 0 0 16px;
    font-size: 1.1em;
    font-weight: 700;
}

/* ── Submission fields ───────────────────────────────────────────────────── */
.dvt-challenge-detail__fields {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dvt-challenge-detail__field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95em;
}

.dvt-challenge-detail__field-icon {
    font-size: 1.3em;
    flex-shrink: 0;
}

.dvt-challenge-detail__field-label {
    font-weight: 600;
    flex: 1;
}

.dvt-challenge-detail__field-badge {
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    background: #fee2e2;
    color: #991b1b;
}

.dvt-challenge-detail__field-badge--optional {
    background: #f3f4f6;
    color: #6b7280;
}

/* ── Prizes ──────────────────────────────────────────────────────────────── */
.dvt-challenge-detail__prizes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dvt-challenge-detail__prize {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 0.95em;
}

.dvt-challenge-detail__prize-pos {
    font-weight: 700;
    color: #92400e;
    min-width: 80px;
    flex-shrink: 0;
}

.dvt-challenge-detail__prize-name {
    flex: 1;
    font-weight: 500;
}

.dvt-challenge-detail__prize-name a {
    color: inherit;
}

.dvt-challenge-detail__prize-value {
    color: #92400e;
    font-size: 0.85em;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .dvt-challenge-detail__title {
        font-size: 1.5em;
    }
    .dvt-challenge-detail__field,
    .dvt-challenge-detail__prize {
        flex-wrap: wrap;
    }
}

/* ── Challenges list view ────────────────────────────────────────────────── */
.dvt-challenges__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.dvt-challenges__item {
    
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    color: inherit;
    text-decoration: none;
    transition: background 0.12s;
}

.dvt-challenges__item:last-child {
    border-bottom: none;
}

.dvt-challenges__item:hover {
    background: #f9fafb;
}

.dvt-challenges__item:hover .dvt-challenges__item-title {
    color: #2563eb;
}

/* ── List item thumbnail ─────────────────────────────────────────────────── */
.dvt-challenges__item-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.dvt-challenges__item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── List item body ──────────────────────────────────────────────────────── */
.dvt-challenges__item-body {
    background-color: #00000080 !important;
    min-width: 0;
    display: flex;
    justify-content: space-around;
    gap: 4px;
    padding: 20px;
    border-radius: 10px;
    align-items: center;
}

.dvt-challenges__item-title {
    margin: 0;
    font-size: 0.95em;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.12s;
    color: #ffffff !important;
    text-wrap: auto;
    border-radius: 10px;
}

.dvt-challenges__item-desc {
    margin: 0;
    font-size: 0.82em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
}

.dvt-challenges__item-meta {
    display: flex;
    gap: 10px;
    font-size: 0.78em;
    color: #9ca3af;
}

.dvt-challenges__item-fields {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* ── List item arrow ─────────────────────────────────────────────────────── */
.dvt-challenges__item-arrow {
    flex-shrink: 0;
    font-size: 1.4em;
    color: #d1d5db;
    line-height: 1;
}

.dvt-challenges__item:hover .dvt-challenges__item-arrow {
    color: #2563eb;
}

/* Troca corpo-completo <-> CTA-only em mobile. Os dois seletores TEM de usar
 * o mesmo breakpoint e ser complementares, senao ha larguras onde aparecem os
 * dois ou nenhum. 600px e o breakpoint ja usado no resto deste ficheiro.
 *
 * Nao usar utilitarios Tailwind aqui: o @source do tema so varre o proprio
 * tema, nunca a pasta de plugins, por isso classes como md:block nem chegam a
 * ser geradas no CSS compilado. */
.dvt-challenges__item-cta {
    margin-top: 16px;
}

.dvt-challenges__item-body-mobile {
    display: none;
}

@media (max-width: 600px) {
    .dvt-challenges__item-body {
        display: none;
    }

    .dvt-challenges__item-body-mobile {
        display: block;
    }

    /* Em mobile o CTA e full width, de ponta a ponta do container. flex (nao
     * inline-flex) para o <a> ser bloco e o width: 100% pegar. */
    .dvt-challenges__item-body-mobile .dvt-challange-button {
        display: flex;
        width: 100%;
    }
}

/* ── Responsive (list) ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .dvt-challenges__item-thumb {
        width: 48px;
        height: 48px;
    }
    .dvt-challenges__item-desc {
        display: none;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   Participation section
   ══════════════════════════════════════════════════════════════════════════ */

/* Sem linha por cima. Tinha border-top aqui (2px) e ainda apanhava outro de
 * .dvt-challenge-detail__section (1px), que a seccao tambem tem — por isso o
 * "none" explicito: anula os dois sem tocar nas outras seccoes que partilham
 * essa classe e continuam a querer a linha. */
.dvt-participate {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: none;
}

/* Closed state */
.dvt-participate__closed {
    color: #6b7280;
    font-style: italic;
}

/* Login prompt */
.dvt-participate__login p {
    margin-bottom: 0.75rem;
    color: #374151;
}

/* Buttons */
.dvt-participate__btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.dvt-participate__btn--primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.dvt-participate__btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}
.dvt-participate__btn--secondary {
    background: transparent;
    color: #374151;
    border-color: #d1d5db;
}
.dvt-participate__btn--secondary:hover {
    border-color: #6b7280;
    color: #111827;
}

/* Submitted state */
.dvt-participate__submitted {
    background: transparent;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.dvt-participate__status-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.dvt-participate__check {
    color: #15803d;
    font-weight: 600;
}

.dvt-participate__badge {
    
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #e5e7eb;
    color: #374151;
    
}
.dvt-participate__badge--pending   { background: #fef9c3; color: #92400e; }
.dvt-participate__badge--active    { background: #dcfce7; color: #15803d; }
.dvt-participate__badge--approved  { background: #dcfce7; color: #15803d; }
.dvt-participate__badge--completed { background: #dbeafe; color: #1d4ed8; }
.dvt-participate__badge--rejected  { background: #fee2e2; color: #dc2626; }

/* ── Submissions list (all attempts) ── */
.dvt-participate__submissions {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.dvt-participate__submission {
    display: flex;
    gap: 0.85rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem;
}
.dvt-participate__submission--approved { border-left-color: #22c55e; }
.dvt-participate__submission--pending  { border-left-color: #f59e0b; }
.dvt-participate__submission--rejected { border-left-color: #ef4444; }

.dvt-participate__submission-media img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
.dvt-participate__submission-noimg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    background: #f3f4f6;
    border-radius: 6px;
    color: #9ca3af;
}
.dvt-participate__submission-info {
    flex: 1;
    min-width: 0;
}
.dvt-participate__submission-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.dvt-participate__submission-attempt {
    font-weight: 700;
    color: #6b7280;
    font-size: 0.85rem;
}
.dvt-participate__submission-won { font-size: 1rem; }
.dvt-participate__submission-points {
    font-weight: 700;
    color: #111827;
    font-size: 1rem;
}
.dvt-participate__submission-text {
    margin: 0.4rem 0 0;
    padding: 0.4rem 0.6rem;
    background: #f9fafb;
    border-left: 3px solid #e5e7eb;
    border-radius: 0 4px 4px 0;
    color: #374151;
    font-size: 0.85rem;
    font-style: normal;
}
.dvt-participate__submission-url {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    word-break: break-all;
}
.dvt-participate__submission-feedback {
    margin: 0.4rem 0 0;
    padding: 0.4rem 0.6rem;
    background: #fef2f2;
    border-radius: 4px;
    color: #b91c1c;
    font-size: 0.82rem;
}
.dvt-participate__submission-date {
    display: block;
    margin-top: 0.35rem;
    color: #9ca3af;
    font-size: 0.75rem;
}


.dvt-participate__current-image {
    margin: 0.75rem 0;
}
.dvt-participate__current-image img {
    max-width: 300px;
    max-height: 200px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}

.dvt-participate__current-text {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: #fff;
    border-left: 3px solid #bbf7d0;
    border-radius: 0 4px 4px 0;
    color: #374151;
    font-style: normal;
}

.dvt-participate__current-url {
    margin: 0.5rem 0;
}
.dvt-participate__current-url a {
    color: #2563eb;
}

/* Participation form */
.dvt-participate__form-wrap {
    margin-top: 0.5rem;
}

.dvt-participate__no-fields {
    color: #6b7280;
    margin-bottom: 1rem;
}

.dvt-participate__form {
    display: flex;
    flex-direction: row;
    gap: 1.25rem;
}

.dvt-participate__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dvt-participate__label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111827;
}

.dvt-participate__required {
    color: #dc2626;
    margin-left: 2px;
}

.dvt-participate__form textarea,
.dvt-participate__form input[type="url"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.5;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.dvt-participate__form textarea:focus,
.dvt-participate__form input[type="url"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.dvt-participate__form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Image preview */
.dvt-participate__image-preview {
    margin-top: 0.5rem;
    position: relative;
    display: inline-block;
}
.dvt-participate__image-preview img {
    display: block;
    max-width: 220px;
    max-height: 160px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}
.dvt-participate__remove-image {
    margin-top: 0.35rem;
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 0;
    text-decoration: underline;
}

.dvt-participate__hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
}

/* Actions row */
.dvt-participate__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Spinner (reuse WP .spinner geometry, no admin-bar dependency) */
.dvt-participate__spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: dvt-spin 0.6s linear infinite;
}
@keyframes dvt-spin {
    to { transform: rotate(360deg); }
}

/* Error message */
.dvt-participate__error {
    padding: 0.6rem 0.9rem;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    color: #dc2626;
    font-size: 0.9rem;
}

/* Success message */
.dvt-participate__success {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    color: #15803d;
    font-size: 0.95rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   Block wrapper (get_block_wrapper_attributes + custom extensions)
   ══════════════════════════════════════════════════════════════════════════ */

.dvt-block__wrap {
    position: relative;
    background-repeat: no-repeat;
}

/* Overlay div injected when backgroundImageUrl + overlayColor are set */
.dvt-block__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   Challenge date badges (cards + list view)
   ══════════════════════════════════════════════════════════════════════════ */

.dvt-challenges__date-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}
.dvt-challenges__date-badge--upcoming {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.dvt-challenges__date-badge--open {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.dvt-challenges__date-badge--closing {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.dvt-challenges__date-badge--closed {
    background: #f9fafb;
    color: #6b7280;
}

/* Closed card/item — dim slightly */
.dvt-challenges__card--closed,
.dvt-challenges__item--closed {
    opacity: 0.75;
}

/* ══════════════════════════════════════════════════════════════════════════
   Challenge detail page — meta row with dates
   ══════════════════════════════════════════════════════════════════════════ */

.dvt-challenge-detail__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.dvt-challenge-detail__meta-item {
    font-size: 0.9rem;
    color: #6b7280;
}

.dvt-challenge-detail__date {
    font-size: 0.85rem;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f3f4f6;
}

.dvt-challenge-detail__date--open {
    background: #f0fdf4;
    color: #15803d;
}

.dvt-challenge-detail__date--closed {
    background: #fef2f2;
    color: #dc2626;
}

/* ── User Badges (earned badges for a specific user) ─────────────────────── */

.dvt-user-badges {
    font-family: inherit;
}

.dvt-user-badges__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.dvt-user-badges__title {
    margin: 0;
    font-size: 1.2em;
    font-weight: 700;
}

.dvt-user-badges__count {
    font-size: 0.82em;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 2px 8px;
}

.dvt-user-badges__empty {
    color: #9ca3af;
    font-style: italic;
}

.dvt-user-badges__grid {
    display: grid;
    gap: 16px;
}

.dvt-user-badges__grid--cols-1 { grid-template-columns: repeat(1, 1fr); }
.dvt-user-badges__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.dvt-user-badges__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.dvt-user-badges__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 600px) {
    .dvt-user-badges__grid--cols-3,
    .dvt-user-badges__grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
    .dvt-user-badges__grid { grid-template-columns: 1fr; }
}

.dvt-user-badges__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.dvt-user-badges__icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
}

.dvt-user-badges__icon-placeholder {
    font-size: 2.5em;
    line-height: 1;
}

.dvt-user-badges__name {
    font-weight: 700;
    font-size: 0.95em;
    color: #1f2937;
}

.dvt-user-badges__desc {
    font-size: 0.82em;
    color: #6b7280;
    line-height: 1.4;
}

.dvt-user-badges__date {
    font-size: 0.75em;
    color: #9ca3af;
    margin-top: 2px;
}

/* ── Badge Catalog (all available badges, with optional earned highlight) ─── */

.dvt-badge-catalog {
    font-family: inherit;
}

.dvt-badge-catalog__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.dvt-badge-catalog__title {
    margin: 0;
    font-size: 1.2em;
    font-weight: 700;
}

.dvt-badge-catalog__count {
    font-size: 0.82em;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 2px 8px;
}

.dvt-badge-catalog__empty {
    color: #9ca3af;
    font-style: italic;
}

.dvt-badge-catalog__grid {
    display: grid;
    gap: 16px;
}

.dvt-badge-catalog__grid--cols-1 { grid-template-columns: repeat(1, 1fr); }
.dvt-badge-catalog__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.dvt-badge-catalog__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.dvt-badge-catalog__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 600px) {
    .dvt-badge-catalog__grid--cols-3,
    .dvt-badge-catalog__grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
    .dvt-badge-catalog__grid { grid-template-columns: 1fr; }
}

.dvt-badge-catalog__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    opacity: 0.6;
    transition: opacity .2s;
}

.dvt-badge-catalog__item--earned {
    opacity: 1;
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, .15), 0 1px 3px rgba(0,0,0,.05);
}

.dvt-badge-catalog__earned-mark {
    position: absolute;
    top: 8px;
    right: 10px;
    background: #7c3aed;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.dvt-badge-catalog__icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
}

.dvt-badge-catalog__icon-placeholder {
    font-size: 2.5em;
    line-height: 1;
}

.dvt-badge-catalog__name {
    font-weight: 700;
    font-size: 0.95em;
    color: #1f2937;
}

.dvt-badge-catalog__desc {
    font-size: 0.82em;
    color: #6b7280;
    line-height: 1.4;
}

.dvt-badge-catalog__points {
    font-size: 0.8em;
    font-weight: 700;
    color: #7c3aed;
    margin-top: 2px;
}

.dvt-badge-catalog__pts-label {
    font-weight: 400;
    color: #9ca3af;
}

/* ── Ranking row: earned badge mini-icons ────────────────────────────────── */

.dvt-ranking__user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}

.dvt-ranking__user-badge-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
    vertical-align: middle;
}

.dvt-ranking__user-badge-placeholder {
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

/* ── Profile widget ──────────────────────────────────────────────────────── */

.dvt-profile {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    max-width: 480px;
}

.dvt-profile__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.dvt-profile__avatar-wrap img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

.dvt-profile__identity {
    flex: 1;
}

.dvt-profile__name {
    margin: 0 0 4px;
    font-size: 1.2em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dvt-profile__handle {
    font-size: 0.85em;
    color: #6b7280;
}

.dvt-profile__stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.dvt-profile__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.dvt-profile__stat-value {
    font-size: 1.4em;
    font-weight: 700;
    line-height: 1.1;
}

.dvt-profile__stat-sub {
    font-size: 0.7em;
    color: #9ca3af;
    font-weight: 400;
}

.dvt-profile__stat-label {
    font-size: 0.72em;
    color: #6b7280;
    margin-top: 2px;
    text-align: center;
}

.dvt-profile__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dvt-profile__badge-item img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: contain;
}

.dvt-profile__badge-item span {
    font-size: 28px;
    line-height: 1;
}

/* ── My Participations table ─────────────────────────────────────────────── */

.dvt-participations {
    font-size: 0.95em;
}

.dvt-participations__header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.dvt-participations__title {
    margin: 0;
}

.dvt-participations__count {
    color: #6b7280;
    font-size: 0.85em;
}

.dvt-participations__table-wrap {
    overflow-x: auto;
}

.dvt-participations__table {
    width: 100%;
    border-collapse: collapse;
}

.dvt-participations__table th,
.dvt-participations__table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.dvt-participations__table th {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

.dvt-participations__status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.8em;
    font-weight: 600;
}

.dvt-participations__status--approved { background: #d1fae5; color: #065f46; }
.dvt-participations__status--rejected { background: #fee2e2; color: #991b1b; }
.dvt-participations__status--pending  { background: #fef3c7; color: #92400e; }

.dvt-participations__revalidate-btn {
    font-size: 0.82em;
    padding: 3px 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    border-radius: 4px;
    cursor: pointer;
}

.dvt-participations__revalidate-btn:hover {
    background: #e5e7eb;
}

.dvt-participations__empty {
    color: #6b7280;
    font-style: italic;
}

/* ── Prize catalog ───────────────────────────────────────────────────────── */

.dvt-prizes__header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}

.dvt-prizes__title {
    margin: 0;
}

.dvt-prizes__grid {
    display: grid;
    gap: 20px;
}

.dvt-prizes__grid--cols-1 { grid-template-columns: repeat(1, 1fr); }
.dvt-prizes__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.dvt-prizes__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.dvt-prizes__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 640px) {
    .dvt-prizes__grid { grid-template-columns: 1fr; }
}

.dvt-prizes__card {
    border-radius: 28px;
    background-color: #00000080;
    padding-top: 40px;
    padding-right: 28px;
    padding-bottom: 44px;
    padding-left: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.dvt-prizes__card-image {
    /* Faz a imagem "flutuar" um pouco acima do bloco, tal como nos cards
     * da página Prizes (agros-prize-card__image). */
    margin-top: -90px;
    margin-bottom: 8px;
}

.div-prizes__text_span {
    color: #cfe0dc;
    margin-top: 0;
    margin-right: 0;
    font-size: 14px;
    line-height: 1.5;
    font-family: var(--font-brand);
    text-align: center;
}

.dvt-prizes__card-image img {
	    display: block;
        width: 238px;
        height: auto;
        position: relative;
}

.dvt-prizes__card-body {
	    padding: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
}

.dvt-prizes__card-pos {
	    display: inline-block;
	    font-size: 12px;
	    font-weight: 700;
	    text-transform: uppercase;
	    letter-spacing: 1.2px;
	    background: #eea617;
	    color: #000000;
	    border-radius: 999px;
	    padding: 5px 12px;
	    margin-bottom: 10px;
}

.dvt-prizes__custom-text {
	    margin-left: 1rem;
	    font-size: 0.85rem;
	    font-weight: 600;
	    letter-spacing: 0.08em;
	    text-transform: uppercase;
	    color: #eea617;
}

.dvt-prizes__card-title {
	       color: #ffffff !important;
            margin-top: 0;
            margin-bottom: 0;
            font-size: 40px !important;
            line-height: 1.1;
            font-family: var(--font-campanha);
}

.dvt-prizes__card-title a {
    text-decoration: none;
    color: inherit;
}

.dvt-prizes__card-title a:hover { text-decoration: underline; }

.dvt-prizes__card-value {
	    font-size: 24px;
	    font-weight: 600;
	    color: #dcefdc;
	    margin-bottom: 6px;
}

.dvt-prizes__card-desc {
	    font-size: 24px;
	    color: #dcefdc;
	    margin: 0;
}

.dvt-prizes__card-challenge {
	    font-size: 14px;
	    color: #dcefdc;
	    margin-top: 10px;
}

.dvt-prizes__card-condition {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #f0f9ff;
    border-left: 3px solid #38bdf8;
    font-size: 0.82em;
}
.dvt-prizes__card-condition--required {
    background: #fff7ed;
    border-left-color: #f97316;
}
.dvt-prizes__card-condition-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: #0ea5e9;
    color: #fff;
    margin-bottom: 4px;
}
.dvt-prizes__card-condition-badge--optional {
    background: #64748b;
}
.dvt-prizes__card-condition p {
    margin: 0;
    color: #374151;
}

.dvt-prizes__empty {
    color: #6b7280;
    font-style: italic;
}

.dvt-participations__view-link {
    font-size: 0.82em;
    text-decoration: none;
    color: #2563eb;
}

.dvt-participations__view-link:hover { text-decoration: underline; }

.dvt-participations__view-link--approved { color: #059669; }


.dvt-challanges-text {
        color: #eea617;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    line-height: 1.1;
    text-transform: uppercase;
    font-family: var(--font-brand);
}

.dvt-challange-badge-extra {
    font-family: var(--font-brand);
        border-radius: 999px;
    background-color: #eea617;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 5px;
    padding-right: 12px;
    padding-bottom: 5px;
    padding-left: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.1;
    color:#000000;
}

/* inline-flex, nao inline: em <a> o display inline nao cria caixa de bloco, o
 * padding vertical nao conta para a altura da linha e o pill fica cortado
 * (media: caixa de 49px dentro de um contentor de 27px). */
.dvt-challange-button {
    /* Mesma fonte de marca dos restantes CTAs (var vem do @theme do tema, tal
     * como ja acontece no dvt-participate.css e no dvt-prizes-block.css). */
    font-family: var(--font-campanha);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 999px;
    color: #ffffff;
    background-color: #008851;
    padding-top: 14px;
    padding-right: 24px;
    padding-bottom: 14px;
    padding-left: 24px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
