/**
 * Gen-Z Style Badges CSS
 * Vibrant and eye-catching badges for tools and features
 */

/* Base badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: white;
}

/* Badge positions */
.badge-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.badge-ribbon {
    position: absolute;
    top: 15px;
    right: -32px;
    transform: rotate(45deg);
    width: 120px;
    text-align: center;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Badge variants */
.badge-trending {
    background: linear-gradient(45deg, #ff3e6c, #ff5e1a);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-trending::before {
    content: '🔥';
    margin-right: 4px;
    font-size: 0.9rem;
}

.badge-new {
    background: linear-gradient(45deg, #8e44ad, #3498db);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-new::before {
    content: '✨';
    margin-right: 4px;
    font-size: 0.9rem;
}

.badge-popular {
    background: linear-gradient(45deg, #06d6a0, #1b9aaa);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-popular::before {
    content: '👑';
    margin-right: 4px;
    font-size: 0.9rem;
}

/* Animated badges */
.badge-pulse {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.badge-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: shimmer 3s infinite;
    z-index: -1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(30deg);
    }
    100% {
        transform: translateX(100%) rotate(30deg);
    }
}

/* Badge with counter */
.badge-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Tag badges */
.tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 2px;
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    transition: all 0.2s ease;
}

.tag-badge:hover {
    background-color: rgba(var(--primary-rgb), 0.2);
    transform: translateY(-2px);
}

/* Tooltip badges */
.tooltip-badge {
    cursor: pointer;
    position: relative;
}

.tooltip-badge .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 5px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.7rem;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
}

.tooltip-badge:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Usage example class */
.tool-card-with-badge {
    position: relative;
}