/**
 * Selos WordPress - Estilos
 * Versão 1.3.0 - Alta Especificidade
 * Baseado no design do site terceiroz.com
 */

/* Estilo base do selo - Alta especificidade */
.selos-wp-badge,
span.selos-wp-badge,
.selo-badge.selos-wp-badge {
    display: inline-block !important;
    padding: 6px 14px !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    line-height: 1 !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    border: none !important;
    text-decoration: none !important;
}

/* Selo Novo - Verde */
.selos-wp-badge.selos-wp-novo,
span.selos-wp-badge.selos-wp-novo {
    background-color: #28a745 !important;
}

.selos-wp-badge.selos-wp-novo:hover {
    background-color: #218838 !important;
}

/* Selo Atualizado - Azul */
.selos-wp-badge.selos-wp-atualizado,
span.selos-wp-badge.selos-wp-atualizado {
    background-color: #007bff !important;
}

.selos-wp-badge.selos-wp-atualizado:hover {
    background-color: #0056b3 !important;
}

/* Selo Finalizado - Vermelho */
.selos-wp-badge.selos-wp-finalizado,
span.selos-wp-badge.selos-wp-finalizado {
    background-color: #dc3545 !important;
}

.selos-wp-badge.selos-wp-finalizado:hover {
    background-color: #c82333 !important;
}

/* Selo no conteúdo do post */
.selos-wp-content.selos-wp-badge {
    margin-bottom: 20px !important;
    margin-right: 10px !important;
    position: relative !important;
}

/* Selo na thumbnail - Múltiplas variações para compatibilidade */
.selos-wp-thumbnail.selos-wp-badge,
.post-thumbnail .selos-wp-badge,
.wp-post-image + .selos-wp-badge,
a .selos-wp-badge.selos-wp-thumbnail {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 999 !important;
    font-size: 11px !important;
    padding: 5px 12px !important;
}

/* Container da thumbnail com selo */
.selos-wp-wrapper,
.post-thumbnail-wrapper {
    position: relative !important;
    display: inline-block !important;
    width: 100% !important;
}

.selos-wp-wrapper img,
.post-thumbnail-wrapper img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
}

/* Forçar posicionamento relativo nos containers pai */
article .post-thumbnail,
.entry-content .post-thumbnail,
.post-thumbnail,
a.post-thumbnail {
    position: relative !important;
}

/* Selo via shortcode */
.selos-wp-shortcode.selos-wp-badge {
    margin: 0 5px !important;
    vertical-align: middle !important;
    position: relative !important;
}

/* Responsividade */
@media screen and (max-width: 768px) {
    .selos-wp-badge {
        font-size: 10px !important;
        padding: 4px 10px !important;
    }
    
    .selos-wp-thumbnail.selos-wp-badge {
        font-size: 9px !important;
        padding: 4px 8px !important;
        top: 5px !important;
        left: 5px !important;
    }
}

/* Estilo para lista de posts */
.archive .post-thumbnail-wrapper,
.archive .selos-wp-wrapper,
.blog .post-thumbnail-wrapper,
.blog .selos-wp-wrapper,
.search .post-thumbnail-wrapper,
.search .selos-wp-wrapper {
    margin-bottom: 15px !important;
}

/* Compatibilidade com temas populares */
article .selos-wp-badge,
.entry .selos-wp-badge,
.post .selos-wp-badge {
    display: inline-block !important;
}

/* Animação suave ao aparecer */
@keyframes selosWpFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selos-wp-badge {
    animation: selosWpFadeIn 0.3s ease-in-out !important;
}

/* Debug mode - torna selo visível mesmo com conflitos */
body.selos-wp-debug .selos-wp-badge {
    outline: 2px solid red !important;
    background-color: #ff0000 !important;
    color: #ffffff !important;
    z-index: 99999 !important;
}

/* Garantir que o selo apareça sobre qualquer elemento */
.selos-wp-badge {
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}
