/* Badges customizáveis — EAD Cursos
 * Aplicados sobre .course-card-badge / .course-preview-badge já posicionados
 * (position: absolute) pelo tema. NÃO sobrescrever `position` aqui — `absolute`
 * já é "positioned", então ::after { inset: 0 } continua válido. Antes
 * definíamos `position: relative` aqui, o que resetava o absolute e fazia a
 * badge "sumir" da posição correta (ficava no fluxo natural).
 * Novos efeitos são aditivos: basta criar .ead-badge-effect-<nome> abaixo.
 */

.ead-badge {
    overflow: hidden;
    isolation: isolate;
    letter-spacing: .3px;
    text-transform: uppercase;
    font-size: 11px;
    padding: 5px 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    max-width: calc(100% - 24px);
    text-overflow: ellipsis;
}

/* none — chapado, sem animação */
.ead-badge-effect-none {
    /* defaults da classe pai */
}

/* pulse — batimento discreto, médico */
.ead-badge-effect-pulse {
    animation: eadBadgePulse 1.8s ease-in-out infinite;
}

@keyframes eadBadgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
    50% { transform: scale(1.06); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28); }
}

/* glow — halo suave ao redor */
.ead-badge-effect-glow {
    animation: eadBadgeGlow 2.4s ease-in-out infinite;
}

@keyframes eadBadgeGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.0), 0 2px 6px rgba(0, 0, 0, 0.18); }
    50% { box-shadow: 0 0 18px 2px rgba(255, 255, 255, 0.45), 0 2px 10px rgba(0, 0, 0, 0.25); }
}

/* shine — brilho atravessa a badge a cada ~3.5s */
.ead-badge-effect-shine::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 48%, transparent 66%);
    transform: translateX(-110%);
    animation: eadBadgeShine 3.6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes eadBadgeShine {
    0%, 40% { transform: translateX(-110%); }
    70%, 100% { transform: translateX(110%); }
}

/* stripe — padrão listrado em diagonal sutil */
.ead-badge-effect-stripe {
    background-image: linear-gradient(45deg,
        rgba(255, 255, 255, 0.10) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.10) 50%,
        rgba(255, 255, 255, 0.10) 75%,
        transparent 75%,
        transparent) !important;
    background-size: 14px 14px;
    background-blend-mode: overlay;
    animation: eadBadgeStripe 22s linear infinite;
}

@keyframes eadBadgeStripe {
    to { background-position: 200px 0; }
}

/* ribbon — fita de canto (extensível; aqui é uma decoração lateral discreta) */
.ead-badge-effect-ribbon {
    border-radius: 0 999px 999px 0;
    padding-left: 16px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%);
}

.ead-badge-effect-ribbon::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(0, 0, 0, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    .ead-badge-effect-pulse,
    .ead-badge-effect-glow,
    .ead-badge-effect-stripe {
        animation: none;
    }
    .ead-badge-effect-shine::after {
        animation: none;
        display: none;
    }
}
