
/* Achievements-stilar */

.achievements-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.badge.unlocked {
    display: flex;
    align-items: flex-start;
    background-color: #f8f9fa;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

    .badge.unlocked:hover,
    .badge.unlocked:focus-within {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    /* Lägg till en subtil "glöd"-effekt baserat på achievement-grupp */
    .badge.unlocked[aria-labelledby*="thrifter"]:before,
    .badge.unlocked[aria-labelledby*="swap-seeker"]:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #33C3F0, #9b87f5);
    }

    .badge.unlocked[aria-labelledby*="trusted-taste"]:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #F97316, #D946EF);
    }

    .badge.unlocked[aria-labelledby*="weekly-wanderer"]:before,
    .badge.unlocked[aria-labelledby*="the-local"]:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #8B5CF6, #0EA5E9);
    }

    .badge.unlocked[aria-labelledby*="welcome-aboard"]:before,
    .badge.unlocked[aria-labelledby*="badge-beginner"]:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #10B981, #6EE7B7);
    }

.badge-icon {
    margin-right: 1rem;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.badge-info {
    flex: 1;
}

.badge-title {
    margin-top: 0;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.badge-description {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.badge-level {
    display: inline-block;
    background-color: #9b87f5;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.badge-date {
    display: block;
    font-size: 0.75rem;
    color: #adb5bd;
    margin-bottom: 0.25rem;
}

.badge-points {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1A1F2C;
    background-color: #E5DEFF;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
}

.no-achievements {
    background-color: #f8f9fa;
    padding: 1.5rem;
}

/* Responsiva anpassningar */
@media (max-width: 767.98px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .badge.unlocked {
        padding: 0.75rem;
    }
}

/* Animationer för att öka intresset */
@keyframes unlock {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.badge.unlocked.new {
    animation: unlock 0.6s ease-out forwards;
}

/* Lägg till specifika ikonfärger för olika badgetyper */
.badge-icon[src*="level"] {
    filter: drop-shadow(0 0 2px rgba(139, 92, 246, 0.5));
}

.badge-icon[src*="recommend"] {
    filter: drop-shadow(0 0 2px rgba(249, 115, 22, 0.5));
}
